Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
* Sinatra stream(:keep_open) not holding connections open
@ 2012-12-05  1:19 W. Andrew Loe III
       [not found] ` <CA+-9oNeKevgZOvKUPs-3VF7qstn8BcNw3_Py0M50h-j5-GzvOA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: W. Andrew Loe III @ 2012-12-05  1:19 UTC (permalink / raw)
  To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw

I'm running Rainbows with EventMachine and struggling to get it to
keep the connections open.

First, here is my code: https://gist.github.com/c33598db8a113b574165

This application works on Thin.

The main loop handles the HTTP request and creates a Celluloid Actor
that hangs out waiting on messages from Redis, when it receives a
message it dispatches it to the stream which EM then pushes out to the
client. Eventually the client will disconnect (this is Server-Sent
Events) and the Actor is torn down.

I want to run under Rainbows! for the hot upgrades and to re-use all
of the wonderful scripts I have for managing my Rails/Unicorn stack.
What I see is the GET handler executed, the Actor spawned, then the
connection is closed and the Actor is terminated. The browser then
reconnects. It doesn't ever have the opportunity to dispatch a message
the Actor doesn't even connect to Redis before it is terminated.
Response times are something like 0.0011 seconds, nothing is being
done.

I'd prefer not to pull in Sinatra::Async, I'd like to know why it
works with Thin out-of-the-box, but not Rainbows!
_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-01-19  1:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-05  1:19 Sinatra stream(:keep_open) not holding connections open W. Andrew Loe III
     [not found] ` <CA+-9oNeKevgZOvKUPs-3VF7qstn8BcNw3_Py0M50h-j5-GzvOA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-12-05  1:44   ` Eric Wong
     [not found]     ` <20121205014454.GA24401-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2012-12-05  2:16       ` W. Andrew Loe III
     [not found]         ` <CA+-9oNd1EFqsniPkkPTwu5opTCinbM7-2KHoXov7+y3LE4s4Tg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-12-05  3:18           ` Eric Wong
     [not found]             ` <20121205031848.GA32757-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2012-12-05  6:09               ` W. Andrew Loe III
     [not found]                 ` <CA+-9oNfR9zM4phTShBsyjweAZBBYWF5egHw7MU8gcBf3f=fAJw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-19  0:21                   ` W. Andrew Loe III
     [not found]                     ` <CA+-9oNdXyYrnyu3dfMuu7ULE7rhT_Rm48BCU_KaJUwsrmcj9-g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-19  1:01                       ` W. Andrew Loe III
     [not found]                         ` <CA+-9oNedbb17X=6Eum0bOG3zEryrhnurvXui4Ye7TcRLrAFcUg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-19  1:09                           ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/rainbows.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).