• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

A mechanism to push the changes between clients  RSS feed

 
Greenhorn
Posts: 9
  • 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.
 
Sheriff
Posts: 11604
178
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • 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
  • 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.
 
There's a way to do it better - find it. -Edison. A better tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!