> if your application is the one making changes, can't it just notify itself at 
> the same time?
Actually, come to think of it, it probably could. *facepalms self*.
The application is going to expose a web interface which the user
interacts with (this is how the database gets changed in the first
place). The p2p engine is then responsible for propagating the changes
throughout the network. Both engines are in the same application, so
this should be possible. Thanks

> What, precisely, do you poll ?
A few mutually exclusive tables in the database to check for changes.
This involves selecting every record initially, storing the value of
the field that is going to change, and then selecting every record
again at regular intervals and comparing the values returned against
the stored values. If they are different, viola, we have a change.
Not efficient at all.

Thanks for your help guys, much appreciated

On Wed, Nov 25, 2009 at 1:55 AM, Igor Tandetnik <[email protected]> wrote:
> Erin Drummond wrote:
>> @Igor: I think you misunderstood. I only have one connection to the
>> database (provided by the JDBC driver). I only care about and use that
>> one connection (no other applications access the database). I was
>> wondering if database trigger could be used to notify the application
>> (for example, have a trigger (via CREATE TRIGGER etc) that gets
>> triggered when a table is updated).
>
> Yes, you can have a trigger calling a user-defined function. Though it's not 
> clear why you would need to go to these lengths: if your application is the 
> one making changes, can't it just notify itself at the same time?
>
> Before you ask, I have no idea how or whether one can create a user-defined 
> function with Java binding.
>
> Igor Tandetnik
>
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to