I
Iñaki Baz Castillo
Hi, I run Unicorn which is a Rack http server using N forked worker process=
es.=20
I need the following:
=2D When a worker processes a HTTP request it must notify some data to othe=
r=20
independent Ruby process XXX (different than Unicorn).
=2D This communication must be non-blocking, this is, the Unicorn worker pr=
ocess=20
sends the notification and doesn't wait for response from the process XXX, =
so=20
the Unicorn worker can, at the moment, generate the HTTP response and send=
=20
back to the client, getting free to handle new HTTP requests.
=2D The ruby process XXX should use some kind of queue system to store=20
notifications and handle them. In fact, it should take them periodically an=
d=20
send via TCP (but not HTTP) to other server.
Which is the best approach to design such communication? perhaps using=20
something as EventMachine for the XXX process and Unix/TCP socket=20
communication between Unicorn processes and XXX process? any other alternat=
ive=20
or suggestion?
Thanks a lot.
=2D-=20
I=C3=B1aki Baz Castillo <[email protected]>
es.=20
I need the following:
=2D When a worker processes a HTTP request it must notify some data to othe=
r=20
independent Ruby process XXX (different than Unicorn).
=2D This communication must be non-blocking, this is, the Unicorn worker pr=
ocess=20
sends the notification and doesn't wait for response from the process XXX, =
so=20
the Unicorn worker can, at the moment, generate the HTTP response and send=
=20
back to the client, getting free to handle new HTTP requests.
=2D The ruby process XXX should use some kind of queue system to store=20
notifications and handle them. In fact, it should take them periodically an=
d=20
send via TCP (but not HTTP) to other server.
Which is the best approach to design such communication? perhaps using=20
something as EventMachine for the XXX process and Unix/TCP socket=20
communication between Unicorn processes and XXX process? any other alternat=
ive=20
or suggestion?
Thanks a lot.
=2D-=20
I=C3=B1aki Baz Castillo <[email protected]>