Re: [sqlite] Network concurrency question
The long and short of it is that SQLite uses the os File-Locking APIs for concurrency. Network File systems vary wildly in the reliability of their implementations of these APIs. If you already have a server application why not simply force all database access through that? On Thu, Sep 25, 2008 at 12:04 PM, Gerry Snyder <[EMAIL PROTECTED]> wrote: > Darrell Lee wrote: >>> >>> >> Here is my situation: the maximum number of clients that would be >> reading the SQLite database is 6, of that 6 the maximum number of >> clients that might be trying to write to the SQLite db is 3. In you >> guys experience, on a scale of 1-10 , 10 being the most likely to >> happen, what are the chances of the database becoming corrupt if it is >> on a network share? >> >> Thanks, >> > If your data are critical isn't a 1 unacceptable? And if not, isn't 10 okay? > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Network concurrency question
Darrell Lee wrote: >> >> > Here is my situation: the maximum number of clients that would be > reading the SQLite database is 6, of that 6 the maximum number of > clients that might be trying to write to the SQLite db is 3. In you > guys experience, on a scale of 1-10 , 10 being the most likely to > happen, what are the chances of the database becoming corrupt if it is > on a network share? > > Thanks, > If your data are critical isn't a 1 unacceptable? And if not, isn't 10 okay? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Network concurrency question
[EMAIL PROTECTED] wrote: > I would like to use SQLite from a network share. I would like to create a > server app that would do all of the writing to the database except for > certain tables, one table per client,the clients would write to their own > table only. The client drops it's data/instructions into it's own table, > the server app would scan all client tables for new data/instructions and > then write the data to the main tables of the database. Would this work > without concurrency issues? > > Another question I have is do I understand correctly that an SQLite > database, on a network share, has no problems with many readers, the > problem starts with many writers. Is this correct? > > Thanks, > TD > > Here is my situation: the maximum number of clients that would be reading the SQLite database is 6, of that 6 the maximum number of clients that might be trying to write to the SQLite db is 3. In you guys experience, on a scale of 1-10 , 10 being the most likely to happen, what are the chances of the database becoming corrupt if it is on a network share? Thanks, -- Darrell Lee Advanced Data Systems, Inc. 119 Honeysuckle Drive Greenville. SC 29609 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Network concurrency question
> Another question I have is do I understand correctly that an SQLite > database, on a network share, has no problems with many readers, the > problem starts with many writers. Is this correct? > > Thanks, > TD Yes, you'll have problems with many writers since each network file system implementation differs from operating system to operating system. I believe there was a recommendation in the documents about implementing your own VFS layer in these cases if you need multiple writers in a network share. Might want to take a look at: http://www.sqlite.org/faq.html#q5 -- // -- Enrique Ramirez Irizarry Lead Developer Indie Code Labs http://www.indiecodelabs.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Network concurrency question
On Mon, Sep 15, 2008 at 11:49:48PM -0400, [EMAIL PROTECTED] scratched on the wall: > I would like to use SQLite from a network share. I would like to create a > server app that would do all of the writing to the database except for > certain tables, one table per client,the clients would write to their own > table only. The client drops it's data/instructions into it's own table, > the server app would scan all client tables for new data/instructions and > then write the data to the main tables of the database. Would this work > without concurrency issues? Doubtful. Since the database is one file, it doesn't matter if the clients keep to their own tables. You still have multiple systems trying to write to the same networked database. Now if each client had a completely separate database, that *might* work, but you'd still have concerns about the remote clients and local server accessing the individual databases at the same time. > Another question I have is do I understand correctly that an SQLite > database, on a network share, has no problems with many readers, the > problem starts with many writers. Is this correct? When "many" equals "1 or more", yes. Writes need to be completely exclusive. Even if all the writing is done locally, the networked readers may not be kept out of the way for the critical sections of the write operation. My guess is that the write operation would be correct, but the reads may crash or get bad data. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Our opponent is an alien starship packed with atomic bombs. We have a protractor." "I'll go home and see if I can scrounge up a ruler and a piece of string." --from Anathem by Neal Stephenson ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Network concurrency question
I would like to use SQLite from a network share. I would like to create a server app that would do all of the writing to the database except for certain tables, one table per client,the clients would write to their own table only. The client drops it's data/instructions into it's own table, the server app would scan all client tables for new data/instructions and then write the data to the main tables of the database. Would this work without concurrency issues? Another question I have is do I understand correctly that an SQLite database, on a network share, has no problems with many readers, the problem starts with many writers. Is this correct? Thanks, TD myhosting.com - Premium Microsoft® Windows® and Linux web and application hosting - http://link.myhosting.com/myhosting ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users