Uchenna
Uchenna

Reputation: 4089

Websocket and Rails integration

I am new to the web socket framework with Rails and generally I feel I should get my hands to start working with it. I have used Faye for my private message publishing and it works nicely. So I want to ask if there is a nice tutorial out there that can show me how to use web sockets with rails. Thank you.

Upvotes: 2

Views: 738

Answers (1)

redhotvengeance
redhotvengeance

Reputation: 27886

Node.js + socket.io is probably your easiest option right now. Faye is set up to use Node.js, so you may have already have Node.js running alongside your rails app (depending on how you're using Faye). You'll just want to start using socket.io. The socket.io repo includes some very useful examples - I sugget looking at chat.

You can communicate between your rails app and Node.js server via http. Node.js lets you easily make an http server. You may also want to take a look at request.

Upvotes: 1

Related Questions