BTW Sybase Replication Server is pretty awesome at handling database
changes and letting you get notified; though its commercial. I'm not
sure if there's a good open source alternative though. I wonder if
this tool is useful...
http://opensource.replicator.daffodilsw.com/

On 25/01/2008, James Strachan <[EMAIL PROTECTED]> wrote:
> If you want to monitor loads of tables, you could use a trigger to
> populate a single 'whats updated' table, so you only have one table to
> poll, rather than loads; this should keep load off of the main data
> tables as they are then only accessed when something changes.
>
>
> On 25/01/2008, Guillaume Nodet <[EMAIL PROTECTED]> wrote:
> > You need to make sure the query for changes is indexed and fast for the DB.
> > As bruce suggested, you could add a boolean column that would indicate that
> > the row has been changed (it can be populated using a trigger),
> > then you just have to index it and query the columns that have this boolean
> > true.
> > You could even call a stored procedure from servicemix so that the modified
> > records
> > are returned and set back to false at the same time (instead of having
> > servicemix
> > update them later).
> >
> > On Jan 24, 2008 11:16 PM, cchalmers <[EMAIL PROTECTED]> wrote:
> >
> > >
> > > Hi Bruce,
> > >
> > > thx for your reply.
> > > Well basically were setting up a small test application to prove and gain
> > > knowledge of an Event Driven Architecture. Its based on a simple
> > > application
> > > whereby someone can make a travel booking via a web page. The data is
> > > persisted in a mysql database. I then want to alter the data using a sql
> > > script meaning the flight would be delayed. This should trigger an event
> > > afterwhich  I want the application to notify all passengers on the flight
> > > via email or sms. Our setup uses Grails for the web-pages, servicemix as
> > > esb
> > > and mysql as database.
> > >
> > > I could poll the database every so often from the esb looking for records
> > > that have been changed but am apprehensive about the load on the database
> > > should there be lots of records in a real life situation. I was interested
> > > in using triggers from the database but how to pass an  event from a db
> > > through to servicemix? I would be interested in you thoughts on that one.
> > >
> > > Appreciate your help
> > >
> > > Colin
> > >
> > >
> > >
> > >
> > > bsnyder wrote:
> > > >
> > > > On Jan 19, 2008 2:21 PM, cchalmers <[EMAIL PROTECTED]> wrote:
> > > >>
> > > >> Hi,
> > > >>
> > > >> Together with a colleague I've just started a small project to build up
> > > >> knowledge concerning EDA and have currently chosen ServiceMix as the
> > > >> implementation tool. Bear with me as a lot of this is new new to me.
> > > >>
> > > >> The case we're trying to implement is a travel booking-system.
> > > Employees,
> > > >> customers and airlines can be persisted after-which a customer can make
> > > a
> > > >> booking etc.
> > > >>
> > > >> One of the things we want to prove is that when data changes in the
> > > >> database
> > > >> that an event is generated and action undertaken. For example if the
> > > >> flight
> > > >> data changes we want to send an sms to the passengers about the time
> > > >> change.
> > > >>
> > > >> I read that others are connecting to databases via the spring jdbc
> > > >> template.
> > > >> The question is how an event as generated concerning the changed data?
> > > As
> > > >> far as I see it there are two paths:
> > > >>
> > > >> 1. Continually polling the database from servicemix looking for changed
> > > >> records which would have to have a last-modified data and then
> > > generating
> > > >> an
> > > >> event
> > > >> 2. Working with triggers in the database which would somehow have to
> > > send
> > > >> an
> > > >> event to servicemix so that the sms can be sent.
> > > >>
> > > >> Is there a third (or more) option which I'm unaware of and is standard
> > > in
> > > >> servicemix?
> > > >> Perhaps I'm misunderstanding the EDA concept and how servicemix
> > > achieves
> > > >> this?
> > > >
> > > > Your understanding is correct; there are basically two ways to
> > > > determine if data in a database has changed:
> > > >
> > > > 1) Poll the database with an external application, or
> > > > 2) Configure a trigger in the database to notify an external application
> > > >
> > > > Of course, the implementation of #1 above can be implemented in many,
> > > > many different ways. There are advantages and disadvantages to each
> > > > and the oly way to find a solution that will work for you is by using
> > > > specifics about your environment and your use case.
> > > >
> > > > Bruce
> > > > --
> > > > perl -e 'print
> > > > unpack("u30","D0G)[EMAIL 
> > > > PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> > > > );'
> > > >
> > > > Apache ActiveMQ - http://activemq.org/
> > > > Apache Camel - http://activemq.org/camel/
> > > > Apache ServiceMix - http://servicemix.org/
> > > > Apache Geronimo - http://geronimo.apache.org/
> > > >
> > > > Blog: http://bruceblog.org/
> > > >
> > >
> > > --
> > > View this message in context:
> > >
> > http://www.nabble.com/ServiceMix---EDA---Database-tp14975289s12049p15076425.html
> > > Sent from the ServiceMix - User mailing list archive at Nabble.com.
> > >
> > >
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Blog: http://gnodet.blogspot.com/
> >
>
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source Integration
> http://open.iona.com
>


-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Reply via email to