File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes communication between clients via servlet...HELP!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "communication between clients via servlet...HELP!!!" Watch "communication between clients via servlet...HELP!!!" New topic
Author

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

westwindode west
Greenhorn

Joined: Dec 15, 2002
Posts: 17
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

Joined: Dec 03, 2003
Posts: 5
can u plz explain the entire scenario once again, Im little confused.
john smith
Ranch Hand

Joined: Mar 04, 2004
Posts: 75
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

Joined: Dec 15, 2002
Posts: 17
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: communication between clients via servlet...HELP!!!