You Are Here:

Community: Developer Discussion Boards

#1 Old Thumbs up Polling issue - 2006-06-16, 07:25

Join Date: Jun 2006
Posts: 31
abhisheik
Offline
Registered User
Hi.First of all thanks for helping me out with my previous questions. I have been able to handle all previous issues with your help. I was going through the pdf that contains info about polling.But the info just describes the type of pollings.Can you please tell me how exactly does polling take place? i mean, do the clients playin the game send requests to the server to make a move or the server or the gateway decide who will make the next move n send this info to clients? i jus need a theoratical overview.No need for gettin into the code.
Thanks n Regards
Abhi Sam
Reply With Quote

#2 Old Re: Polling issue - 2006-06-19, 19:01

Join Date: Jun 2006
Posts: 25
SM Tech
Offline
Registered User
Hi Abhi Sam,

Very sorry about not posting a reply earlier. As explained, our pimary developer support is away currently and so our response has not been as quick as it normally is.

In answer to your question, SNAP Mobile clients poll the server either automatically through the use of the SNAP Event Listner or manually via retrieveAllEvents. Please see the Hello World example app in the 1.1 SNAP Mobile SDK for an example.

We *strongly* recommend the use of the event listner mechanism. Using the manual retrieveAllEvents is only recommended in certain circumstances such as on devices which can only use HTTP and can only make 1 open connection at a given time. Since most devices can use direct TCP sockets now, the use of this interface is becoming depricated.

So what does polling do? Well, the SNAP Mobile API is basically done through a HTTP request / response mechanism. Every time a client wants to send something to another player, gameroom, friend, etc... they must send a command. OK. Basic.

So what is polling? Polling is used so a client can get the asynchronous info other players or the servers send them. e.g. friend/buddy chat messages, game data, enter/leave gameroom messages, etc... Asyncronous events are sent to a client from the respective Online Service (e.g. SNAP or IMPS). The asynchronous data is sent to the clients Virtual SNAP Mobile Client in the gateway layer of the architecture. The polling mechanism allows a client to connect to the Virtual SNAP Mobile client on the gateway to see if there is any asynchronous data waiting for them. If the client is using the defualt wait-poll mechanism in the event listner thread, the poll request will remain open to the server until either 1 event has been received or N seconds (currently 20 by defaul) has passed, which ever comes first. This allows the fastest return to the client of new events.

The gateway does not get involved in any game logic except for matchmaking. All such issues as who goes when, why, are left to the game.

My best advice is to invoke the snapEventListner immediatly after login by your application. Remember to remove it just *before* you logout.

Does this answer your question?
If not, I will be checking the boards later today.

Thanks for your understanding,
Matt
Tech Lead & SDK Manager SNAP Mobile
Reply With Quote

#3 Old Arrow Re: Polling issue - 2006-06-20, 06:29

Join Date: Jun 2006
Posts: 31
abhisheik
Offline
Registered User
Well thanks a lot sir.Your answer pertaining to polling sounded good. Now i understood what is polling. But the question that still remains is that if polling is for clients to find out any state change,etc in the server or the other clients then still, how does a client find out in a game that it is my turn next? If the communication is asynchronous then wont it happen that all client players will try sendin data at the same time, without knowin if it is their turn or not and assuming that it is their turn.Thats what i really need some help on.
Reply With Quote

#4 Old Arrow Re: Polling issue - 2006-06-20, 06:32

Join Date: Jun 2006
Posts: 31
abhisheik
Offline
Registered User
This is in continuation to my last post.Is The Ok command that you talked of for sending the data like a token ring approach? i mean that is there a token that is to be grasped by the client using OK command and then only will he send the data??
Regards
Abhi Sam
Reply With Quote

#5 Old Re: Polling issue - 2006-06-20, 19:21

Join Date: Jun 2006
Posts: 25
SM Tech
Offline
Registered User
Hi,

In your last set of posts you asked:

"how does a client find out in a game that it is my turn next?"

This question is one of basic game logic. We do not provide game or programming support, we only support the SNAP Mobile
technology.

SNAP Mobile does not direct game play. It provides a transport platform upon which games can be played online. Issues such as turn management are left to the developer.

In addition, I am not sure of what you mean by a token in this regard. The gameplay functionality of SNAP Mobile acts as a direct packet router, routing game and chat packets to some or all users within a specified gameroom or lobby. There is no token system to indicate who goes when and how. Each client acts independently and within the structure of the game being played.

A client can/will receive game packets from the server using the polling mechaniscm. A client can/will receive status messages from other clients and from the system using the polling mechanism. It is up to the game logic to determine what to do with these messages.

Cheers,
Matt
Reply With Quote

#6 Old Thumbs up Re: Polling issue - 2006-06-21, 07:39

Join Date: Jun 2006
Posts: 31
abhisheik
Offline
Registered User
Ok sir.thanks a lot.You really gave some relevant info.
Regards
Abhi
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Nokia 9500: browsing issue ? cache issuse ? coberle General Browsing 0 2005-10-12 17:31
DATA SYNC ISSUE - Even in single threaded Symbian Apps nitinkumar General Symbian C++ 0 2005-02-25 11:30
Security code issue for 6230 kababoom General Discussion 1 2004-08-19 06:39
6220/6820 WV Chat client not polling bogdano Smart Messaging 2 2004-05-26 10:22
Solved: USB IRDA issue with 3360 and 6360 for Win98 & Win2K Vicman PC Suite API and PC Connectivity SDK 1 2003-05-07 06:34

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d127641X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZgamesQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ