Also, I think the requirement that at most only one program will access the file probably means the server program is the only one to access the file, but the multiple clients have to be able to access the file concurrently...
Originally posted by Andrew Monkhouse:
No - in that case, multiple client will have to be able to access the server concurrently. This is a pedantic point but it is important. Since only your server has to access the physical file, you do not need to worry about locking the file to prevent other clients using it.
Originally posted by Jon Entwistle:
[qb] That's how I read it at first: that only one client at a time can access the file.
Please tell me if I am wrong but I think that this is where you might be having problems conceptualy with this - the client actualy never accesses the file. The only thing any client does is to ask the server to access the file on its behalf - it is up to the server to manage these requests from any number of concurrent clients, which it must do without violating the record (i.e. cookie) locking contract and without corrupting the file or any shared variables.
Look! It's Leonardo da Vinci! And he brought a tiny ad!
Two software engineers solve most of the world's problems in one K&R sized bookhttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton