On 10/31/07, Bill Gatliff [EMAIL PROTECTED] wrote:
Trevor Talbot wrote:
If your platform has a file modification notification mechanism, you
may be able to sleep on that instead. Of course the problem with this
approach is that it's only a coarse-grained something changed
notification,
Trevor Talbot wrote:
It's a pre-commit hook, so it has the same problem as the triggers. I
haven't tried modifying the code to add a post-commit hook, but
sqlite3_commit_hook() is actually a good place to start: in main.c it
sets db-xCommitCallback, which is called by vdbeCommit() in
vdbeaux.c.
Bill Gatliff wrote:
Guys:
I'm a relatively-new SQLite user, but I'm luuuvin' it! :)
My application is a mobile platform with a GUI that wants to display
frequently-updated data in a database. The GUI is a separate process
from the one providing the data, and is one of several consumers
Bill Gatliff wrote:
The problem I'm seeing is that the GUI process is getting stale data
in its SELECT, unless it does a brief sleep between the sem_wait() and
the sqlite3_exec(). Specifically, the value returned is the value
immediately before the UPDATE. It's as if the trigger in the
John Stanton wrote:
Perhaps your application sjould post its signal after the COMMIT has
executed. A pause to give time for the COMMIT is a fragile approach.
It is indeed! And just for the record, it's an approach that deserves
absolutely no consideration by any system you want to depend
Bill,
You have an interesting situation, and a general one since you have data
distributed across a network. I would be tempted to define a remote
procedure call using TCP/IP or whatever and use that to notify database
changes. Use a message passing approach.
BTW, in a new system you
John Stanton wrote:
Bill,
You have an interesting situation, and a general one since you have
data distributed across a network. I would be tempted to define a
remote procedure call using TCP/IP or whatever and use that to notify
database changes. Use a message passing approach.
The
Guys:
I'm a relatively-new SQLite user, but I'm luuuvin' it! :)
My application is a mobile platform with a GUI that wants to display
frequently-updated data in a database. The GUI is a separate process
from the one providing the data, and is one of several consumers of that
data.
I
On 10/31/07, Bill Gatliff [EMAIL PROTECTED] wrote:
My application is a mobile platform with a GUI that wants to display
frequently-updated data in a database. The GUI is a separate process
from the one providing the data, and is one of several consumers of that
data.
I prefer not to poll
Trevor Talbot wrote:
On 10/31/07, Bill Gatliff [EMAIL PROTECTED] wrote:
I prefer not to poll for changes, because the system is
performance-constrained. So instead, I'm using an AFTER UPDATE trigger
in the data-generating process to launch a C function that posts to a
semaphore. The GUI
Have the trigger function set a flag or put an item in a work queue
after it updates the database. After the commit, check/clear the flag
or empty the work queue, raising the semaphore if necessary.
--- Bill Gatliff [EMAIL PROTECTED] wrote:
My application is a mobile platform with a GUI that
11 matches
Mail list logo