Even though it is the same channel, when i call the create method (let's say i hit refresh on my browser, and the channel is created at page load) my Channel Api quota for created channels rises...
On Jul 27, 7:01 am, Moishe <[email protected]> wrote: > Answers below: > > On Jul 26, 10:21 am, Ice13ill <[email protected]> wrote: > > > 1. I know that after two hours, the given token for creating the > > channel expires and onClose() and onError() are called. When this > > happends, does the POST request to the path to disconnect servlet is > > sent ? (/_ah/channel/disconnected/) > > Yes, it will. It might not be at exactly the time of expiration but it > will be within a couple of minutes. It's possible that if you request > a new token and re-open the socket within that gap that the > disconnected and then connected calls will be skipped. > > > 2. if i create a channel with the same clientID twice, will that be > > considered a new channel (given token is different) or will the token > > be the identical ? (and also the same channel) > > You will get a new token (every call to create a channel, even with > the same client id, will result in a new token -- among other reasons, > the token encodes the expiration time, so it will obviously change on > every call). The channel will be the same, though; if you have two > clients connected with tokens generated from the same client id, they > will both receive messages sent to that client id. However no > guarantees are made of support of multiple connected clients; if you > open a new client, other clients connected via tokens generated with > the same client id may be (probably will be) disconnected. > > > 3. What would be the best method for keeping track of a large number > > of created channels ? (clients IDs for example) > > I use the datastore with a memcache layer on top in apps I've written. > You could have eg. a table of user_ids (from the users API) > representing "connected users". > > -Moishe -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
