Re: "Events" in Informix?
Posted in 2004
S Madison Pruet wrote: > Would using MQ in conjunction to IDS address this need? > > "Philippe Requil'" <Philippe@falcon.be.Nospamplease> wrote in message > news:4157b500$0$4144$ba620e4c@news.skynet.be... > >>I use the freeware Interbase database. The Interbase database provides an >>"event", which allows applications to respond to actions and database >>changes made by other concurrently running applications, without having to >>resort to polling the database on a regular basis, or communicating > > directly > >>with the other applications. >> >>Is this also possible with an informix database? >> The answer is yes if you're using 9.x. There are a couple of ways to implement this but the gist is... You create an MQ Event handler within the engine. You register a listener thread of your app with the MQ engine. When an event hits, a triger places a message on the queue and then MQ sends the event out. You can also do this outside of MQ but you'd have to do some coding work, and then you'd have to decide how you wanted to broadcast the event. (JMS? Proprietary?) I'd recommend this if MQ is too slow an option. This isn't a bad idea... Suppose you were receiving tick data in real time. You were then storing the data within the database for analysis. Lets say that when you stored the values, you calculated the "greeks" to store with them. Now lets say you wanted to alert the trader that when a certain threshold occured, you would push this data out from the database. (There's more to this, but you get the idea .... ;-) Or lets say that you were running a really tight ship and you wanted to re-order inventory immediately when you hit your nth remaining element. (Where n is determined to be calculated on the avg ship/delivery time since re-order and the avg rate of sales...) You could have the POS database send a restock order to your warehouse to be added to the next pick slip. (Or if you don't have a warehouse distribution chain, you could send it to your supplier.) I guess in the second scenario, you could extend it to a "lights out" operation. Like an automated vending machine that tell you what they need to fill up on... Or a web based business that resells products and has them drop ship directly from the factory. (And they hold no inventory.) I'm sure there are others, but you get the idea.... This isn't new, its been bounced around before. ;-) But hey, what do I know? I'm not supposed to be technical anymore. ;-)