• Post Reply Bookmark Topic Watch Topic
  • New Topic

Booking - Functionality Clarification

 
Glen Iris
Ranch Hand
Posts: 172
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,

Two clients are running. Both clients (correctly) see no booked records in the database. Client 1 books a record X by placing a customer id of 12345678 against the record as the records owner. Client 2's GUI is still showing no owner for record X.

1 - Can client 2 place a customer ID of 87654321 against record X ?

My guess is no. What I think should happen is that you can only place a customer ID against a record if there is no ID against the record already, regardless of whether or not your GUI shows it.

So if this is the case - my next question is:

2 - Can client 2 return record X even if it was client 1 which booked the record?

If the answer to question 2 is, only client 1 (ie the client who booked the record) may return the record, what happens if client 1 terminates. Does that mean that record is forever booked?

G

 
Roel De Nijs
Sheriff
Posts: 10763
148
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course double bookings are not allowed. You don't want to arrive at a hotel and discover 2 couples booked the same room, no romantic weekend for you and your partner. So when client 2 wants to book an already booked record (although it seems to be available according to the GUI) an error "Room/contractor already booked. Please book another one." should be shown.

You should also make sure that the time a record is locked is as short as possible. So instead of already locking a record when the "book dialog" is shown (where you can enter the customer id), you should start the booking process (lock/update/unlock) after the user confirmed the "book dialog".

If client 1 terminates and has booked record 1, record 1 will remain booked forever (because there is no unbooking functionality). But it's quite normal a booking is booked forever (I booked a holiday at the end of October, so I hope it's still booked at the end of this month when I'm actually on holiday )
 
Glen Iris
Ranch Hand
Posts: 172
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Roel. It's just another case of the assignment requiring unrealistic functionality I guess.

Please don't go on holiday before I finish my assignment!!!who the heck is going to save me then?

Seriously buddy, thanks again and have a nice time
 
Roel De Nijs
Sheriff
Posts: 10763
148
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Glen Iris wrote:Please don't go on holiday before I finish my assignment!!!who the heck is going to save me then?

My good buddy Roberto And don't panic: in the hotel is free wifi
 
Roberto Perillo
Bartender
Posts: 2273
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, sometimes I'm just on the background, but I'm always here
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!