I don't know if this helps, but I'll comment anyway!

I had a similar issue in the past, and what I did was to develop a small layer with a queue system, which took care of all the database requests and executed them without risking the database integrity nor the data to be processed.

Depending on how you implement this, it might leave a user waiting for a few ms to secs after the request could be processed if there were 2 "accesses" at the same time. Its well worth it and chances are you wont have a "collision" so response times will be similar if not equal -to the human eye- Neither you'll have a huge queue list (unless X factors do take place into the equation) for instance.. huge amount of users / simultaneus accesses.




----- Original Message ----- From: "jose isaias cabrera" <[EMAIL PROTECTED]>
To: <sqlite-users@sqlite.org>
Sent: Sunday, March 11, 2007 2:14 AM
Subject: Re: [sqlite] Re: Re: How do I know what DBs I have attached?



jose isaias cabrera <[EMAIL PROTECTED]>
wrote:
Perhaps, this should be the case.  It would not be so hard to keep a
table of connections that are attached or open with a table.

You don't want an otherwise read-only connection have to write to the database. This will harm concurrency.

Oh, I agree.  The reason why I want to do it, is to not attach, if there
one attached, already.  For the exact reason that you point out.  Since
I have a few users that will update this DB at any moment, meaning that
could do it at the same time, I want to have a catch for that problem.


Well, only one connection can modify a particular database file at
the same time. It doesn't matter if you open the file directly, or
attach it to an existing connection. If two processes attempt the modifying
operation at the same time, one of them will proceed and the other
will be locked out.

Is there a way of telling the DB to UPDATE records after the actual
connection has completed its processing?  Something like UPDATE queue?

I'm not sure I understand the question. Update records after which of possibly multiple connections has completed its processing?

Yeah, that was bad.  It's getting late here and I am tired. :-(  Sorry.
Let us say that I have a few users that would connect to this DB to
update it at any moment. Say user one connects to do an update to his
data.  At millisecond later, user2 connects to do an update to his data,
and here is the question, can user say say something like,

UPDATE TAble .... after database is not busy.

Or something like that. More or less, can one commands updates in a queue?

thanks Igor for all your help.

josé


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to