File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A mechanism to push the changes between clients

 
Joao Sov
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my implementation I'm using sockets for the communications because it gives me more freedom to implement my thread manager and a lot of control in my communication objects/commands.

My question is, how do I implement a mechanism to push the changes between clients?
Possible solutions:
1 - Create a socket in each client to receive the changes made by another user?
2 - Use RMI and use UnicastRemoteObject with a subscription mechanism instead of using sockets at all?
3 - Use a mechanism in which Client A requests a room that is already booked (Client B booked it) but in the interface it appears that it is still free. When Client A selects the option to book an error/warning message occurs and an update package comes from the response object.

I'm more inclined in using option 3. But still thinking in what should be the better solution.
 
Roel De Nijs
Sheriff
Posts: 9091
73
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't push changes at all. When a room is booked by another client the client will be informed that the room was already booked and he needs to book another room.

Please, do not hijack other threads for a complete different question. Just start a new thread (with an appropriate meaningful title) and you'll get an answer in (very) short notice.
 
Joao Sov
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I'm sorry. I thought that the other user was with a similar question.

Regarding the mechanism, I will follow your advice and use no mechanism at all. Many thanks for the fast reply.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic