Take the 2-minute tour ×

First, I'm sorry because I know this question has been asked many times but I'm still looking forward to finding the answer to my problem.

I'd want to implement a Real-time chat for my Rails app but I can't really host the server which handles the sockets. I've tried Faye but it needs a server. I've also heard of pusher but it's limited to 20 users at a time on the chat and I can't really be sure they won't be more.

I've thought of irc but I think I can't really embed it into a rails app, maybe it needs sockets...

So here's my problem, can I implement a real-time chat without owning a server ? What can you advice me ?

Thank you for your answers.

share|improve this question
There's a lot of great solutions, but none that will work without a server to host them on. –  Andrew Nov 15 '11 at 1:02
This question should be in stackoverflow and not here. –  pedrorolo Dec 5 '12 at 13:57
add comment

4 Answers

up vote 4 down vote accepted

You can't implement real-time chat without having a server capable of coordinating it in real time. Typical shared host web server setups are not suitable for this sort of thing -- they usually don't have the right sorts of things installed and typically don't have the umph to handle the traffic in any case. So typically you'll need to secure at least your own VPS especially if you care about performance and reliability.

share|improve this answer
add comment

If you want to try something new, you can use :

For you, cramp might be useful. I have created a basic demo for a peer to peer chat. It is not for production, but you can find out enough information :

em-wesocket Chat Demo

It is done with em-websocket and socket.io.

In this demo, I am not using redis but with redis you can achieve more scalability and persistence.

Cramp or nodejs will work for you.

share|improve this answer
Cramp seems very promising for Ruby developers. –  garbage collection Oct 15 '12 at 18:03
add comment

Why are you not able to host it yourself? Is it the cost of hosting?

You could try Socket.IO running on Node.JS, hosted on a free Heroku account. The HTML would remain in your rails app, but the "web socket server" (technically a long-polling server in the case of Heroku) would be running on a free Heroku account.

Other than that, I'm not sure what you are asking. In order to host a website, you need a web host. In order to host a chat server, you need a server to host it on.

share|improve this answer
add comment

You can try out PubNub :

PubNub is considered a Web Push Engine able to push (or stream) any textual data in real-time data push to any types of clients across the Internet. PubNub solves all the complexity of pushing data in a scalable, secure, efficient, reliable and portable way. On the client side, APIs are provided so that it is very easy to build Bidirectional Data Push Apps (transforming your existing client or creating a new one from scratch). A powerful HTML5 library makes it possible to push data updates to Mobile Phones, Tablets and Web Pages in real-time data push through a zero-install client.

share|improve this answer
add comment

Your Answer


