What would be the best way to create a JS chat client with GWT? The bit that I'm having trouble with is the persistence and transfer of the messages. Should I store the messages in a DB and check the db for new messages? Is there a much better way to do this?
What would be the best way to create a JS chat client with GWT? The bit that I'm having trouble with is the persistence and transfer of the messages. Should I store the messages in a DB and check the db for new messages? Is there a much better way to do this?
Share Improve this question asked Mar 16, 2010 at 21:13 Matthew HMatthew H 5,8798 gold badges51 silver badges82 bronze badges2 Answers
Reset to default 3Like jah suggested, you definitely want to use Comet/Server Push/Reverse AJAX/many other names. I've piled your options for GWT in another post.
If you want a quick start, look at the NGiNX_HTTP_Push_Module - they have an easy to understand chat example. You'll have to write some handling of the protocol yourself, but it's a rather simple task.
If you're using Java too on the backend, the easier solution will be rocket-gwt or etd.
You could either have connected clients continuously poll the server for new messages or you could have a look at Server Push: http://code.google./p/google-web-toolkit-incubator/wiki/ServerPushFAQ
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745168976a4614806.html
评论列表(0条)