Originally posted by Robin Underwood:
Modify() does seem to have a bug that it assumes that the first field on each record (flight number) is unique. But there didn't seem to be a better alternative. The writeRecord method is private. To avoid changing the Data class, I am going to use modify() but also document its bug.
Yes, this assumption is kind of fishy. But since
the modification is based on the record number also, this function can still work well.
Sai:
I heard lots of people talk about lock->read->modify->unlock. What is this "read"? You mean
the search action (when user presses "search button")? Since flight search event will be handled in a different event handler than book event. You mentioned LockManager should be on server-side, where to use lock/unlock? Define FlightSearch and Book methods on the server-side and use lock/unlock there? I am kind of confused here. Thanks.