Why not just use the SMB file locks if you are using the SMB networking?
Daniel Önnerby wrote:
Well.. I do not mean that I will use the socketserver to run queries
against it.
What I mean is that the database is opened by the applications from a
windows share. The socketserver is only used to ask permission to write
to the database and notifying the other applications that an update has
been made.
My thought was that this will not require much implementation on the
application. Just adding a call to the socketserver before every INSERT
or UPDATE, and that call will wait until the permission has been granted
by the socketserver. Once the INSERT/UPDATE has been made, another call
is made to the socketserver to unlock the database. The socketserver
will then notify the other clients that an update has been made.
Best regards
Daniel
John Stanton wrote:
That should work quite well. We use such a strategy to implement
remote, multi user access to Sqlite databases. the user is
unconcerned about locking or contentions.
In our case we made the server run on port 80 (HTTP) and use regular
HTTP protocol so that it easily penetrates firewalls. The server in
our case can either be a CGI process on a regular WWW server or use a
purpose developed multi-threaded daemon which gives better performance.
We make the data transport format XML for uniformity. For example if
the usage requirement were to become too intensive for sqlite we can
switch the shared database to being PostgreSQL without affecting the
clients.
Daniel Önnerby wrote:
Hi all!
At the company I work we have a windows application that use sqlite
for the document format and this works great. We are now thinking
about if it would be possible to have multiple users to access the db
simultaneously from different computers (like a enterprise edition :)
). I have read everything about the multithreading issues and I know
that sqlite is not designed to work like this. But I have an idea on
how I might solve this in our case and would like to ask the
community if you think this is a god idea (or if it would work at all):
My idea is to create a small socketserver on the local network that
the application holds an open connection to. When someone wants to
write (lock) to the DB you always need to ask the socketserver if
this is ok. The server will not keep any track of the database
itself. The only purpose of the server is so that no one tries to
write simultaneously. The server will also notify the applications
when a modification has been made (on unlock).
So.. could this work???
Best regards and thanks for the best (and smallest) SQL database ever
made.
Daniel
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------