Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

communication between clients via servlet...HELP!!!

 
westwindode west
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...
I have a question about the communication between 2 clients via servlet as follows:
Client_A updates a shared object on server. After this, how can i let client_B get this updated information immediately?
Client side only allows Javascripts and xhtml (no applet).
Thanks a lot!!! Any suggestion is appreciated, and i'm beening killed by this problem....Help!!!
Westwindode.
 
Saj
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can u plz explain the entire scenario once again, Im little confused.
 
john smith
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm assuming you are asking a question about how you keep two views of the same data synchronized between two clients? Am I right?
If you are, then the simple answer is you don't even try. If you need this sort of functionality you need a more sophisticated client than a simple web app, which will have to constantly poll the application to keep the view roughly up to date - and this is really bad design, since you will be flooding the server with largely unneccessary requests. What is better is to assume the client's view of data can be out of date, use an optimistic locking pattern inside a transaction when a client needs to manipulate the data.
 
westwindode west
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, cluck and saj...
Thanks for your replies ... I guess you are right.
for now, i'll think it over and discuss with you guys later.
jia
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic