On Jan 24, 2008 3: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.
Well, it turns out that there are some major drawbacks to having a trigger call an external script or application. Take a look at this Usenet exchange about this very topic: http://www.usenet-forums.com/mysql-database/102566-calling-perl-script-mysql-trigger.html Please note that Bill Karwin is a noted MySQL expert who serves on a MySQL and has a lot of experience with MySQL. Just Google 'Bill Karwin MySQL' and you'll see what i mean. The list of items from Bill Karwin in the post above is more than enough reason for me not to recommend using a trigger to call out to an external application. That doesn't mean that I wouldn't use triggers to populate another table with an integer value that is easy to query with low overhead to prompt an external application to be able to easily query it and grab the result. More or less a boolean to indicate that notification processing needs to occur. A quick little query like that could be easily kicked off from the servicemix-quartz component. 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/
