I just started the assignment and have been thinking about the overall architecture design and have some concerns. The requirements says:
"if two clients attempt to perform the sequence lock, read, modify, write, unlock concurrently, then both modification attempts will be handled correctly."
"To connect with your server,
you should create a client program. This implementation should include a class that implements the same public methods as the suncertify.db.Data class, although it will need different constructors to allow it to support the network configuration. "
I understand the "lock, read, modify, write, unlock" sequence to ensure data integrity. But I think this should be done on the server side instead of the client side. The server should publish a business method like "bookFlight" and hide the lock(), unlock(), modify()... from the client. This approach could avoid the "orphan" locks problem by the client-side locking approach due to potential network glitch.
My concern is whether I will be penalized for not following Sun's instructions? Has anyone passed with this approach?
Thank.