← Back to team overview

maria-discuss team mailing list archive

Re: Table Change notification to all Clients?

 

I have seen a few of these go into production. What behavior is desired?
1) user gets table name when table changes
2) user gets table name and PK for row when that row changes
3) user gets table name and all columns when row changes

Also, how reliable must the notification be? If the notification subscriber
is disconnected when the change happens will they miss a notification?
Below I use "persistent subscription" to mean that change notification is
not lost when a subscriber is disconnected.

The systems I used usually did #2 (user gets table name and PK) and then
the user can query the table to get the other columns. This can be
inefficient because of the extra queries but it was simple. These systems
also made notification subscription persistent. One example is:
https://www.facebook.com/notes/facebook-engineering/wormhole-pubsub-system-moving-data-through-space-and-time/10151504075843920

I think this type of system can make it a lot easier to integrate
MySQL/MariaDB with other systems. Row-based replication makes it much
easier.


On Tue, Nov 19, 2013 at 8:10 AM, Sergei Golubchik <serg@xxxxxxxxxxx> wrote:

> Hi, SARTrack!
>
> You might want to look at Q4M storage engine, http://q4m.github.io/
> perhaps it'll help.
>
> Or you can emulate the notification with locks or replication.
>
> But directly - no, there are no plans at the moment to implement the
> notifications like this. Of course, plans might change...
>
> On Nov 15, SARTrack Admin wrote:
> > I develop a Windows application for Search and Rescue (using Delphi
> > and MyDAC components), which gets a stream of "APRS" data packets, up
> > to 10 per second.
> > These are saved in the SQL database, but all Clients which are
> > connected to the database MUST be notified when a Table change has
> > occured, so that they then can update their internal tables. Which in
> > turn update their Maps (GPS location of moving items) and other data,
> > which MUST be up-to-date.
> >
> > Currently I am having all Clients polling the database every 5
> > seconds, which really sucks, and causes all kinds of other problems.
> >
> > Is there any chance that MariaDB will have some kind of Client
> > Notification system when a Table has changed, as some other SQL
> > databases seem to have?
> >
> Regards,
> Sergei
>
> _______________________________________________
> Mailing list: https://launchpad.net/~maria-discuss
> Post to     : maria-discuss@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>



-- 
Mark Callaghan
mdcallag@xxxxxxxxx

References