Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX: about Locking instruction

 
oneal shark
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
in my instruction

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


Does this means I must not use lock unlock in standalone mode,
if so how about the update(recno, data[], lockCookie) method, do I need write another one for standalone mode operation? since it need lockCookie.

I don't want to lose my money from the deviation of requirement.

thanks for your reply
 
Eben Hewitt
Author
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't interpret that as meaning I must not lock if in non-networked mode. But it would reduce overhead if your app recognized that you were in non-networked mode and did not lock as a consequence.

"At a minimum you must be concerned X" != "You must do only and precisely X". That is, X is a subset of things with which you might be concerned.

That's how I interpreted it, but defensively didn't lock the records in non-networked mode, since it is not necessary to do so.
 
Charlie Goth
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Eben Hewitt:

That's how I interpreted it, but defensively didn't lock the records in non-networked mode, since it is not necessary to do so.


In my requirements I'm pretty sure there is something about standalone mode using the same code as the client and server, with the networking removed. So if you lock on the server but not in the standalone version, it may be a problem.
 
oneal shark
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Eben,
As you said:
Originally posted by Eben Hewitt:

That's how I interpreted it, but defensively didn't lock the records in non-networked mode, since it is not necessary to do so.


how about update method, I noticed there is a lockCookie needed for this method, or I need to write another method?

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic