I have a rails app that integrates to a Legacy MS SQLServer based system. I need to create some kind of publish subscribe where by the Legacy SQLServer generates events, and the Rails app subscribes to the events.
The events I need to generate will be caused by users of the Legacy Application, Observers won’t help. Basically I need to detect a table insert caused by the Legacy App and broadcast that to the rails app.
I can set up TRIGGERS on the Legacy SQLServer that can ultimately call something via xp_cmdexec.
I figure some kind of Ruby based pub/sub gem where a ruby executable on the SQLServer box (In Back Office) can publish the events, and the Rails (in the Cloud) app can subscribe to them. Performance is not a concern, average of 10 to 30 table inserts PER DAY! I control the firewall, so I can get any protocol through.
I have lot’s of the Legacy SQLServer tables defined in the rails app through the SQLServer adapter, but the rails app doesn’t generate the table inserts I’m interested in.
I’ve seen hookr, ants, ruby-mqtt, then I started seeing many many more :<
Anybody have a recommendation?
If responsiveness is not the primary concern, it may be easiest to have the Rails app poll for new records every so often. If the database has timestamps or at least autoincrement IDs you can be sure to process only the new ones. Otherwise you’ll have to use a record count.