• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Server method synchronization and RMI

 
Douglas Kent
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems to me that implementing the client-server architecture using RMI renders the synchronization of various Data methods useless, because each instance of the servant will be synchonizing on it's own code. That's if you create a new instance for each call. Would the way around this be to create the server as a "Singleton" design and simply hand back references to the single instance with each call? Thoughts?
 
Jerry Pulley
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Douglas,
I'd recommend multiple remote client objects (1 per client) attaching to a single Data object (maybe via some intermediary). The many clients will meet at some single point (DatabaseManager, in my design); that's where you'll need synchronization. There are probably other ways of doing it, this one just seemed the cleanest to me.
Jerry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic