Hi Shan,
I'm working on URLyBird 1.2.1, and I agree with you in that Deadlock detection is out of the scope - I will mention in my choices.txt how it could be implemented (i.e. what classes should be modified etc)
I believe with client crashes Andrew is referring to the following scenario (which is possible with my spec, but maybe not yours depending on which assignment you are working on)
Scenario
Client A wants to book a hotel room. This consists of reading, locking, updating and then releasing the lock on the record. The difference between a thick and thin client is [i]where[\i] the methods that perform these operations are called from.
[b]Thick client Assumptions[\b]
CRUD operations (read(), update(), delete() etc) and locking (lock(), unlock() ) methods are exposed on the server-side API
Problem scenario
Client A connects to the server
Client A locks record 1 (with the intention to update the details)
Client A crashes (without releasing the lock)
Client B attempts to lock record 1, but never can because the lock will never be released by Client A
[b]Thin client Assumptions[\b]
CRUD operations and locking methods are NOT exposed on server-side API. Instead the API exposes business operation methods only, such as bookRoom()
The previous problem scenario can not occur in this case, because instead of the client performing multiple method calls (lock, update, unlock) with the potential of crashing at any point in between the calls, the client now simply calls bookRoom() and this [i]server-side[\i] method calls the lock, update, and unlock methods.
If the client crashes during these method calls it doesn't matter, as the server-side business method executes independently of the client and performs all the locking and unlocking, and so will never leave the record in an undertermined state.
Regarding the multiple notification - I'm not too sure what you mean by this. If it means using the new locking API and multiple condition objects to ensure a
thread is only notified if the record it is waiting for is released, then yes I have done this. I have seen on this board that it appears Sun doesn't penalise you if you don't do this, but with Andrew's book it really is quite easy to add, and I like to play safe when it comes to "must" requirements in the specs
I hope this helps,
Daniel
[ August 08, 2006: Message edited by: Daniel Bryant ]