Re: [sqlite] LAN and exclusive lock
On 21 Oct 2009, at 5:58pm, Jan wrote: > thx bruce, but I am addicted to open-source. If you want an open source server/client SQL engine, designed from the ground up to work correctly when accessed from many computers at once, I recommend MySQL. It is easier, faster and more efficient to just use MySQL as it is designed than it is to try to turn SQLite into a networked concurrent client system. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] LAN and exclusive lock
I'm addicted to amazingly powerful solutions done in minutes; using the one-stop-shopping Lowe's Hardware of data solutions has its own addictive powers. Depends on how you value your time. On Oct 21, 2009, at 9:58 AM, Jan wrote: > thx bruce, but I am addicted to open-source. > > Bruce Robertson schrieb: >> You might try Filemaker. That's what is was designed for. Make >> everything so easy. >> >> On Oct 21, 2009, at 8:10 AM, Jan wrote: >> >>> Thank you John. Seems postgres might be a better choice. Although it >>> is >>> so nice to work with sqlite cause non of this user/administration >>> "crap" >>> is necessary. > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] LAN and exclusive lock
thx bruce, but I am addicted to open-source. Bruce Robertson schrieb: > You might try Filemaker. That's what is was designed for. Make > everything so easy. > > On Oct 21, 2009, at 8:10 AM, Jan wrote: > >> Thank you John. Seems postgres might be a better choice. Although it >> is >> so nice to work with sqlite cause non of this user/administration >> "crap" >> is necessary. > > ___ > 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] LAN and exclusive lock
You might try Filemaker. That's what is was designed for. Make everything so easy. On Oct 21, 2009, at 8:10 AM, Jan wrote: > Thank you John. Seems postgres might be a better choice. Although it > is > so nice to work with sqlite cause non of this user/administration > "crap" > is necessary. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] LAN and exclusive lock
Thank you John. Seems postgres might be a better choice. Although it is so nice to work with sqlite cause non of this user/administration "crap" is necessary. John Elrick schrieb: > Jan wrote: >> Hi, >> >> Although I read in a recent post by drh that it is not recommended to >> use sqlite in a local network I would like to ask if the following >> approach would work: >> >> A database in the local network needs to be accessed by about 20 people. >> I suppose the max. number at the same time will be 4-5. Only one is able >> to write to the database at the same time. The one who wants to write to >> the database acquires an exclusive look with "PRAGMA >> locking_mode=EXCLUSIVE" if locking_mode is currently NORMAL. AFAIR all >> others should then still be able to read, but not to write. >> >> Is that correct and more or less save? Does anyone have experience with >> sqlite on a networkdrive? >> > > In my experience, adding multi-user capability to an application > increases the complexity by at least an order of magnitude. If you have > 20 people who need access there are two options (IMO): > > 1. Web based application. In this case the database itself has one and > only one consumer, the web server. If you can keep the access to a > single thread, you have multi-user with no greater complexity than > single user -- albeit the user will have to stare at a web browser if > some long running process interferes. > 2. Client/Server. Again, the database has only one consumer, the local > server, which manages all the complex details. MySQL, Firebird, and > PostgreSQL are open source/free/low cost examples of this type of > system, however, the tricks that will work for a local database (lists > and grids are a big offender here) will NOT work effectively in a C/S > environment. > > > John > ___ > 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] LAN and exclusive lock
Jan wrote: > Hi, > > Although I read in a recent post by drh that it is not recommended to > use sqlite in a local network I would like to ask if the following > approach would work: > > A database in the local network needs to be accessed by about 20 people. > I suppose the max. number at the same time will be 4-5. Only one is able > to write to the database at the same time. The one who wants to write to > the database acquires an exclusive look with "PRAGMA > locking_mode=EXCLUSIVE" if locking_mode is currently NORMAL. AFAIR all > others should then still be able to read, but not to write. > > Is that correct and more or less save? Does anyone have experience with > sqlite on a networkdrive? > In my experience, adding multi-user capability to an application increases the complexity by at least an order of magnitude. If you have 20 people who need access there are two options (IMO): 1. Web based application. In this case the database itself has one and only one consumer, the web server. If you can keep the access to a single thread, you have multi-user with no greater complexity than single user -- albeit the user will have to stare at a web browser if some long running process interferes. 2. Client/Server. Again, the database has only one consumer, the local server, which manages all the complex details. MySQL, Firebird, and PostgreSQL are open source/free/low cost examples of this type of system, however, the tricks that will work for a local database (lists and grids are a big offender here) will NOT work effectively in a C/S environment. John ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] LAN and exclusive lock
Pavel Ivanov schrieb: I'm not sure you want to do that. No, actually not. Thanks for clarification. jan ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] LAN and exclusive lock
Disregarding network drive issue "PRAGMA locking_mode=EXCLUSIVE" means that once your writer requires PENDING or EXCLUSIVE lock nobody else will be able to read the database anymore until writer closes connection to it. In other words without this pragma with relatively small transactions in writer nobody will be able to read database during small periods of time while writer commits transactions. But with this pragma you will throw away all readers after the first commit. I'm not sure you want to do that. Pavel On Wed, Oct 21, 2009 at 3:44 AM, Jan wrote: > Hi, > > Although I read in a recent post by drh that it is not recommended to > use sqlite in a local network I would like to ask if the following > approach would work: > > A database in the local network needs to be accessed by about 20 people. > I suppose the max. number at the same time will be 4-5. Only one is able > to write to the database at the same time. The one who wants to write to > the database acquires an exclusive look with "PRAGMA > locking_mode=EXCLUSIVE" if locking_mode is currently NORMAL. AFAIR all > others should then still be able to read, but not to write. > > Is that correct and more or less save? Does anyone have experience with > sqlite on a networkdrive? > > Thank you > Jan > ___ > 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