EventBus in a Sinatra app
Published: Oct 27, 2014 I had a sinatra app (the Be My Eyes app), that I thought had a bit too much code in the route file. So I investigated how to make that better. What I came up with was that it would be great to have some kind of EventBus, where I could send events out and respond in a very decoupled manner. It would be nice to be able to run the event handlers asynchronous, but that was not a hard requiriment from the beginning. I searched on github and came up with event_bus by Kevin Rutherford. I asked on the lrug mail-list about peoples experience with event_bus. Not a lot of people had tried it out, be at least one person could recommend Kevins work, so I took the plunge and installed the gem. (Furthermore an I could see that a “sister” gem exists that will handle events in sidekick, so the asynchronous part got a checkmark as well) ...