Hi,
I have just started using Channel API and it look to work fine. But there
are few things i would like to know/clear/understand about my design.

My Design:
Currently when my site's page load it creates a token at server and injet
into HTML page, GWT then read the token and start listening to this channel.
I create the token at server side using request.getSession().getId(); and
then save it in to datastore(LiveChannels entity) for later use to send the
message back to client. I dodnt use the Cache as Cache may drop/remove some
ids if it gets full/reach limit.

I have created GWT RPC function which is called whenever user move away from
that page(Event : onWIndowClose()), this function is closeConnection() and
in this function i remove req.getSession().getId() from
datastore(LiveChannels entity). Also i am keeping the connection date in
this entity so that i can run regular tasks and see if some client have been
connected for more then 2 hours and remove them from this entity and later i
may implement Ping functionality from client every N minute and remove if
some entity have not been pinged in last N minutes.

Now whenever i have new messag to send to all client i read all LIveChannel
entries from datastore(this will increase as number of user increases, say
in future it can be easily around 50000) and send message to them. I can see
its working on my 3 computer and 12 browser combination running at the same
time.

My question:
1) Is it the right way to distribute the message to each client. My app
requirment is that everybody(online user) should receive the same message(i
hope for some time my clients wont reach more then 8000 clients and then i
can enable the billing)
2) how do i go ahead and do the load testing, connect  8000 clients.
3) I am removing the tokens for all client which are being closed or going
to other pages and i wont send any message to them in future, but is the
Channel API connection is still alive on server, means if 8000 clients
connected and 7000 closed the browser and my closeConnection function called
properly then i will have only 1000 LiveChannels, so will i be able to make
more connections or i need to wait for 2 hours when 7000 connections will
expire/timeout
4) Is this design efficient to handle large number of clients 50000+ and if
not how can we achieve it.

Thanks in advance
Ravi

-- 
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 google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to