Hello,every professionals!
I just downloaded my assignment(ver 1.2.3),and in it,you will see the following paragraphs about Server:
"Network Approaches
Your choice of RMI or serialized objects will not affect your grade, but no other approach is acceptable. In either case, the program must allow the user to specify the location of the database, and it must also accept an indication that a local database is to be used, in which case, the networking must be bypassed entirely. No authentication is required for database access.
Locking
Your server must be capable of handling multiple concurrent requests, and as part of this capability, must provide locking functionality as specified in the interface provided above. You may assume that at any moment, at most one program is accessing the database file; therefore your locking system only needs to be concerned with multiple concurrent clients of your server. Any attempt to lock a resource that is already locked should cause the current
thread to give up the CPU, consuming no CPU cycles until the desired resource becomes available. "
Please teach me the detail ways to implement the Server,and at the same time,I've two problems:
1)How to do to"lock a resource that is already locked should cause the current thread to give up the CPU"?
2)And how to do ... "local database is to be used, in which case, the networking must be bypassed entirely"?