Re: locking on a record level
Jean-Claude Wippler <[email protected]>
| Newsgroups | gmane.comp.db.metakit |
|---|---|
| Message-ID | <[email protected]> |
Eric, > having read the documentation I think I know the answer to this > question (which is no) but I want to ask you make sure I'm not missing > something anyway. > > I need a database which can be accessed from multiple processes, lock > on a record level, and survive. :-) > > The data isn't very much or sophisticated. In effect, all I really > need is a very large dictionary (in Python terms) with the ability to > read, write, delete, lock any record from any process. Indeed, at the file level the answer is no. However, you could use MK as server, look at Brian Kelley's Metaserve: http://staffa.wi.mit.edu/people/kelley/ That in itself is not a locking solution, but it's a pre-requisite. What you then need to do is add a property to maintain a row lock client id (or put it in a separate view as <client,row#> lookup, if you prefer). Plus the code to test-and-set a lock atomically so there can be no race conditions. Oh, and plus the code to cleanup locks when clients "pass out" unexpectedly (release of socket close could be enough). -jcw _____________________________________________ Metakit mailing list - [email protected] http://www.equi4.com/mailman/listinfo/metakit