From Hanna Habashy's comments,
I think that client A is allowed (and shoud be) to read any records from DB while client B has locked a record and got ready to update (write to) DB. Of course, while client B is physically updating (writing to) DB, client A needs to wait after client B finishes update(..) due to sync'ed file pointer access concern.
I implemented the same way as what Guvenc Gulce described above. When client A fills in his client ID (from your snapshot view in GUI) and book a room (in my URLybird assignment), he may not necessarily get booked since the room could get booked by someone else while client A is viewing the search result.
Do those experienced ranchers here like Andrew, Peter den Haan, or Phillippe have any smarter thoughts?
- Steve W.