From: Robert Klemme Date: 2013-04-29T16:22:04+09:00 Subject: Re: use of ruby httpd in select() --e89a8f646af9b91c6304db7abd7b Content-Type: text/plain; charset=ISO-8859-1 On Sat, Apr 27, 2013 at 9:56 AM, Saku Ytti 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 -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ --e89a8f646af9b91c6304db7abd7b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable



On Sat, Apr 27, 2013 at 9:56 AM, Saku Ytti <saku@ytti.fi>= wrote:
Either I'm blind or none of the popular = (puma, unicorn, thin) httpds
support giving =A0you out IO object and catering to the request when
you're good and ready.

What d= oes "when you're good and ready" mean here? =A0Are you asking= for the IO to not passed as long as "you" is not ready to take r= equests?
=A0
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 =A0from 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 loo= p"? =A0It's not really clear to me what you want. =A0First, I thou= ght you wanted to use RACK with Ruby but now I'm not sure any more. =A0= Can you elaborate what you are trying to achieve?

Cheers

robert


--
remember.= guy do |as, often| as.you_can - without end
http://blog.rubybestpractice= s.com/
--e89a8f646af9b91c6304db7abd7b--