Use of ruby httpd in select()

Either I’m blind or none of the popular (puma, unicorn, thin) httpds
support giving you out IO object and catering to the request when
you’re good and ready.

With exception of webbrick, it seems to support it fine. But I don’t
think you can then use any of the rack web frameworks then.

Consider I have some ruby daemon running in background and I want some
way to talk to it runtime from other software. Maybe canonical
solution is named pipe or domain socket.

But is there way for you to run modern ruby web stack in your daemon,
catering to it in select() (replacing your daemons current sleep in
its main loop)

On Sat, Apr 27, 2013 at 9:56 AM, Saku Y. [email protected] wrote:

Either I’m blind or none of the popular (puma, unicorn, thin) httpds
support giving you out IO object and catering to the request when
you’re good and ready.

What does “when you’re good and ready” mean here? Are you asking for
the
IO to not passed as long as “you” is not ready to take requests?

With exception of webbrick, it seems to support it fine. But I don’t
think you can then use any of the rack web frameworks then.

Consider I have some ruby daemon running in background and I want some
way to talk to it runtime from other software. Maybe canonical
solution is named pipe or domain socket.

Answer to this general question: DRb

But is there way for you to run modern ruby web stack in your daemon,

catering to it in select() (replacing your daemons current sleep in
its main loop)

What do you mean by “sleep in its main loop”? It’s not really clear to
me
what you want. First, I thought you wanted to use RACK with Ruby but
now
I’m not sure any more. Can you elaborate what you are trying to
achieve?

Cheers

robert