• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Question regarding client and server synchronization in URLyBird networked mode.

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have a question and it may just be something that I've either created because of my implementation of the URLyBird project or perhaps it's just one of those undocumented issues that needs to be flushed out. I did some searching around the forum but didn't find anything and I hope this isn't a duplicate.

What I was wondering is in the networked mode, when you have 1 server running but 2 clients, if one of the clients books a room, how does the other client's GUI get updated?

I was thinking of doing some simple heartbeat that goes back to the server every to get the update data - but maybe this doesn't need to be considered? Of course, even with the heart beat approach theres still a chance that the CSR will try to reserve a room in the heartbeat window. But that can be solved with just a dialog to the user that the message .

My approach contains a service layer which returns exceptions like "NoSuchRoom" or "RoomAlreadyReserved" just incase the client and the server do get out of sync. In that case the client can get these exceptions and relay them accordingly to the user.

I really tried to figure out if this was scope creep, but the assignment clearly states that you have to deal with multiple clients locking a single server. So if theres multiple clients accessing the same data, theres going to be a chance of this happening.

Any guidance is appreciated.

//Matt
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I simply didn't update the gui of the other client. When this client tries to book the room (because it seems available according to the gui), it will get a RoomAlreadyReserved exception.
 
Matt Lobo
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wow that was a fast response.

Thanks!
 
please buy this thing and then I get a fat cut of the action:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic