Rails and WebSockets

I’m thinking of starting on a Ruby website that uses WebSockets, and
perhaps working some on a server for it beforehand. Is good support
for asynchronous connections something I could work on adding to the
Rails core? Is it feasible? Desired? As I understand it, Rails plugins
like Juggernaut [1] aren’t going to optimally support async, since
they can’t re-architecture the way connections are handled. Should I
instead use Cramp [2] and incorporate the various features I like from
Rails into it?

Thank you for your time!

[1] - https://github.com/maccman/juggernaut
[2] - https://github.com/lifo/cramp

On 08 Feb 2011, at 04:45, John Beck wrote:

I’m thinking of starting on a Ruby website that uses WebSockets, and
perhaps working some on a server for it beforehand. Is good support
for asynchronous connections something I could work on adding to the
Rails core? Is it feasible? Desired? As I understand it, Rails plugins
like Juggernaut [1] aren’t going to optimally support async, since
they can’t re-architecture the way connections are handled. Should I
instead use Cramp [2] and incorporate the various features I like from
Rails into it?

An event driven server such as one running on NodeJS or Cramp is the
way to go imo. You could possibly run an EventMachine loop inside your
Rails app itself, but that comes with it’s own set of challenges. Use
the tools that fit the job, and when you’re talking about async
pushing to and from the client, your messaging server should be
eventdriven.

Best regards

Peter De Berdt

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs