HTML5 Server-Side Events with Passenger 3.x, Rails 3.2, Ruby 1.9.3

409 views
Skip to first unread message

Dan

unread,
May 22, 2013, 11:40:06 PM5/22/13
to phusion-...@googlegroups.com
Hello,

I was wondering if it's possible to implement HTML5 server-side events (SSE) with a Rails 3.2 app deployed to Passenger 3.x.  I saw there is CRAMP gem (http://cramp.in/) that looks like it supports SSE, but not sure about the Rails/Passenger compatibility and how to set it up.  I appreciate any help that can be provided.

Thanks.
Dan

Dan

unread,
May 23, 2013, 7:46:10 PM5/23/13
to phusion-...@googlegroups.com
FYI - I'm using Passenger with Apache...

Hongli Lai

unread,
May 29, 2013, 11:45:29 AM5/29/13
to phusion-passenger
Whether Server Side Events are properly supported depends on the web
server. So far we've not tested it. We know that Phusion Passenger 4.0
+ Nginx 1.4.0 works with WebSockets though.
> --
> You received this message because you are subscribed to the Google Groups
> "Phusion Passenger Discussions" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to phusion-passen...@googlegroups.com.
> To post to this group, send email to phusion-...@googlegroups.com.
> Visit this group at
> http://groups.google.com/group/phusion-passenger?hl=en-US.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Phusion | Ruby & Rails deployment, scaling and tuning solutions

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)

Dan

unread,
May 29, 2013, 7:44:11 PM5/29/13
to phusion-...@googlegroups.com
What are you using for Websockets - Rails 4?  Trying to find something that works for Rails 3.2...

Tinco Andringa

unread,
May 29, 2013, 7:47:11 PM5/29/13
to phusion-...@googlegroups.com
Hi Dan,

You can use something like websocket-rails (https://github.com/DanKnox/websocket-rails) to work with websockets, Rails itself does not come with an websocket API.

Kind regards,
Tinco

Dan

unread,
May 29, 2013, 7:57:39 PM5/29/13
to phusion-...@googlegroups.com
Thanks for the response! Unfortunately it sounds like that wouldn't work through Passenger with Apache. I would have to switch to standalone mode...

Dan

unread,
May 30, 2013, 9:27:31 AM5/30/13
to phusion-...@googlegroups.com
I did read some articles about embedding Sinatra within rails, and using that for Server-Side events.


Maybe I'll try that out, see if it's compatible with Passenger/Apache.

Hongli Lai

unread,
May 30, 2013, 10:58:41 AM5/30/13
to phusion-passenger
Please let us know what the results are.
Reply all
Reply to author
Forward
0 new messages