[Tutor] Multi-User file system

Kent Johnson kent37 at tds.net
Sun Nov 2 13:27:17 CET 2008


On Sun, Nov 2, 2008 at 2:32 AM, Jim Morcombe <jmorcombe at westnet.com.au> wrote:
> Would pySQLite be a reasonable choice for this?

>From the SQLite docs at http://sqlite.org/whentouse.html:
- A good rule of thumb is that you should avoid using SQLite in
situations where the same database will be accessed simultaneously
from many computers over a network filesystem.
- SQLite uses reader/writer locks on the entire database file. That
means if any process is reading from any part of the database, all
other processes are prevented from writing any other part of the
database.

>> I want to have a couple of files that can be updated simultaneously be
>> several users.  I don't want to go to the effort of having the users set up
>> a RDMS and would like to control everything from Python.  I am after
>> something like shelve, but with record locking.  Is there such a thing?

If you want record-level locking I think you will have to use some
kind of server. You might be able to set up a simple server using say
CherryPy for a web server or XML-RPC or Pyro. Or perhaps convert the
app to be web-based using Django or TurboGears or another web
framework.

Kent


More information about the Tutor mailing list