I wonder how this is done in Google Docs? The approach may be a bit of overkill for a chat client though. Multiple users can edit a word processing document or spreadsheet simultaneously.
I've seen talks about how this is done conceptually. It involved the command pattern and there was a way to ship (serialized) objects from server to client. I think it used the Google Chat protocol. On Wednesday, October 17, 2012 4:31:23 AM UTC-7, Magnus wrote: > > Hello, > > I realized a simple chat within my chess application: > > When the user posts something, the posting is sent to the server and the > chat view on the client side is updated. > But when another user posts something, the user's view is not updated > automatically. > > I wonder how to realize an automatic update. From the server's point of > view it chould be realized like this: > > Whenever *some* user sends a posting, do the following: > { > List<User> l = getAllUsersThatAreCurrentlyLoggedIn(); > for (User u:l) > notifyClientOfUser(u); > } > > However, I do not know how and where to start and how to realize the > methods used above. > How can I determine the users who need to be notified? > How can I send the notification to the users? I have access to the user's > session data, but how can I make a call, where do I have to define the > service methods and where does the call come out within the client? > > Thanks > Magnus > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/kwP3rySs6PAJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.