Re: Database notification
- From: "frebe" <fredrik_bertilsson@xxxxxxxxxxx>
- Date: 28 Apr 2005 23:43:48 -0700
> No, triggers start stored procedures on the server side, but nothing
on
> the client side.
Yes, that stored procedure can send a message (like JMS
publish/subscribe) to the client. I don't know what kind of languages
MySQL supports for stored procedures. If it doesn't support java, you
might consider switching to a database that support java.
> JDBC doesn't provide this kind of mechanism. You have
> to use a timer in each client and check for changes in the database
at
> certain intervals (for instance every 10 secs or so).
Polling is a solution, but a rather primitive one.
> It helps if you
> add a table with last modification timestamps, for instance one per
> table, so that your client needs to perform only simple checks.
You would still need triggers that updates the new timestamp table. If
you use this approach I would recommend a table like this,
log(id, tablename, columnname, timestamp)
and a trigger on every other table in your database that inserts a
record in this one.
Fredrik Bertilsson
http://butler.sourceforge.net
.
- Follow-Ups:
- Re: Database notification
- From: Mark Matthews
- Re: Database notification
- References:
- Database notification
- From: jwillans
- Re: Database notification
- From: frebe
- Re: Database notification
- From: Paul van Rossem
- Database notification
- Prev by Date: Re: Database notification
- Next by Date: Re: Database notification
- Previous by thread: Re: Database notification
- Next by thread: Re: Database notification
- Index(es):
Relevant Pages
|
|