Google Web Toolkit 自动刷新网格
我实现了一个应用程序,其中有一个网格,每次有人更改此网格上的某些内容时,它都会自动为打开网格的其他人更新网格(类似于谷歌文档所做的那样)。
我尝试使用 gwt-rpc 每 2 秒发送一个请求来实现此功能,如果有新内容,应用程序只需发送已更改的内容。但是当我上传到GAE服务器时,我得到了一些不好的结果。
因此,我决定分析谷歌文档的实现,发现它保持开放连接近一分钟,并在每次有人更改某些内容时发送一些新信息。我想知道是否可以在 GWT 上做这样的事情。我现在尝试使用请求工厂来做到这一点,但我想我会面临同样的问题。
有什么想法吗?
I implementing an application that has a grid in it and everytime someone changes something on this grid it automaticaly updates the grid for others who has the grid opened (something like what the google docs does).
I tried implementing this using gwt-rpc sending a request every 2 seconds and if there is something new the application just send what has changed. But I had some bad results when uploaded to the GAE server.
So I decided to analyze the google docs implementation and a saw that it keeps a open connection for almost one minute and send some new information everytime someones changes something. I would like to know if it's possible to do something like this on GWT. I'm trying to do it now using the request factory but I think I'll face the same problems.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于您使用的是 GAE,因此您可能需要查看Channel API。
还有 gwt-gae-channel,它是 Channel 的 GWT 包装器API 的 JavaScript 客户端。
Since you use GAE you might want to look at Channel API.
There is also gwt-gae-channel, which is a GWT wrapper around Channel API's javascript client.
您可以查看 GWT 人员对使用推送技术的看法使用 GWT
You might check out what the GWT folks gave to say about using push technology with GWT