关于appengine的聊天应用程序
我愿意在App Engine上实施聊天网站。但我发现App Engine不允许我使用服务器推送。 (因为它将在30秒后杀死响应)。
I am willing to implement a chat website on App Engine. But I found that App Engine will not allow me to go with server push. (as it will kill the response after 30 sec).
-
那么可以使用另一种可以使用
的方法吗?轮询会导致糟糕的用户
体验吗?用户
的含义是否需要等待一段时间才能从服务器中检索新消息?
So whats the other method that can be used? Will polling cause bad user experience? Meaning will the user have to wait for some time to retrieve new messages from the server?
什么是理想的轮询
interval?
What will be the ideal polling interval?
如果你使用非常小的轮询间隔,我的带宽是否会耗尽?我会遇到性能问题吗?
If you use very small polling intervals, will my bandwidth get exhausted? Will I suffer performance problems?
这是一个很老的问题,但我正在寻找类似的答案。我认为渠道API
( http ://code.google.com/appengine/docs/java/channel/ )更适合此任务。根据我的理解,XMPP很适合与应用程序交互,但不能与其他用户交互。 Channel API通过HttpRequest实现推送通知。我刚刚在这里找到了一个聊天室的例子: https://bitbucket.org/keakon/channelchat
This is a quite old question now, but I was looking for a similar answer. I think the Channel API
(http://code.google.com/appengine/docs/java/channel/) is much better suited for the task. For what I understand, XMPP is good to interact with the app, but not with other users. Channel API implement push notifications via HttpRequest. I just found an example of a chat room here: https://bitbucket.org/keakon/channelchat