Reputation: 93146
I've heard that you have to use non-blocking code throughout the application to be able to harness true power of EventMachine.
Does this mean I can't run Ruby on Rails with EventMachine?
Upvotes: 3
Views: 2969
Reputation: 1202
You can also have an eventmachine run loop running in another thread (similar to this: http://railstips.org/blog/archives/2011/05/04/eventmachine-and-passenger/) along with Rails and can defer work to that.
Upvotes: 1
Reputation: 61
I know this question is a bit old, but for anyone interested in using eventmachine and RoR, I'd highly recommend checking out Ilya Grigorik's Async Rails Project https://github.com/igrigorik/async-rails he and a few other people have done a great job creating an example fully event RoR App. Plus there is a lot of resources that he links to, to learn more about what's really going on behind the scenes.
Upvotes: 3