views:

100

answers:

2

I am willing to implement a chat website on appengine.But i found that appengine will not allow me to go with server push.(as it will kill response after 30 sec).

  1. So whats the other method that can be used?Will polling cause bad user experince??Meaning will the user have to wait for some time to retrive new messages from server??

  2. What will be the ideal pollling interval??

    3)If u use very less polling interwall will by badwidth get exhausted??Will i sufer performace problem??

+2  A: 

Can't you just use XMPP instead of a website? It would be a much better approach. Polling certainly isn't going to scale very well and will definitely not give a good user experience.

XMPP with appengine

Robin
XMPP on GAE is excellent. I'm using it at the moment to implement an admin console/admin alert interface for a music app. It's blazingly fast and didn't seem to use much bandwidth. The free quota (http://code.google.com/appengine/docs/quotas.html#XMPP), however, probably wouldn't go very far for a popular web application.
mdm
@Robin:Thanks for replying.Actually i want to implemet a website like omegle.com.This Webisite doesnt require the user to have uservname and passwd.Is it necessary in XMPP that the user is a registered user in order to use xmpp.Also is it required that the other member shold be in his buddy list to chat with him??
akshay
A: 

I've heard of people working around that by holding the connection (i.e. sending no response) until it dies then reestablishing it. 30 seconds is not that much though.

If done this way it would still feel more responsive to the user than polling every 30 secs.

About the bandwith usage: Depending on the payload "typical" HTTP requests can range from a few hundred bytes to some kBytes especially with cookies.

With an average size of let's say 5kB (pessimistic) every 30 sec that would sum up to around 14 MB per 24 hrs. Maybe you can cut down the size by setting a path in your cookies so they don't get send for these connections. Maybe you don't need to send the whole payload again every 30 secs.

zockman