On 05/12/2011, at 9:45 AM, Simon Russell wrote:

> You actually want to do callbacks it would seem, so em-synchrony isn't
> actually necessary -- that's actually designed to hide the callbacks,
> and make it seem more like straightforward single-threaded code.

No, no. I do want to hide all callbacks and make the code look like the 
sequential set of commands.
I also want to be able to swap it out for a single-threaded implementation as a 
backup if something goes wrong.


> It is actually possible to run an EventMachine event loop inside
> Passenger (or other process-based servers) -- you just need to start
> up the event loop in a separate thread on app initialisation.  

But wouldn't it raise "non-local return error" when used with Rails as Richard 
explained previously?

> It might only be useful if you actually are doing multiple HTTP
> backend requests that can be done in parallel;
> It won't actually make your server any more capable of
> serving more requests at once, it just might make the requests faster
> to serve.

That's the whole point of this buggy wuggy dance.
Most likely there will be at least 3 HTTP requests. So parallelising this 
should improve the response times.


-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en.

Reply via email to