never_had_a_name
never_had_a_name

Reputation: 93146

Ruby on Rails + EventMachine?

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

Answers (3)

Tony Pitale
Tony Pitale

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

Chris Hein
Chris Hein

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

Swanand
Swanand

Reputation: 12426

Not at all. Thin runs on EventMachine (and Rack, MongrelParser amongst a few others). And Rails apps run fine with thin.

Upvotes: 1

Related Questions