WebSocket experiment
JavaScript CSS Ruby HTML
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
client Upgrading Ruby libraries Jun 5, 2017
server Upgrading Ruby libraries Jun 5, 2017
.gitignore adding .rvmrc Nov 12, 2011
LICENSE.txt license Nov 20, 2011
README.md license Nov 20, 2011

README.md

Animal Chat

Animal Chat is a massive multi user on live web chat developed using the HTML5 WebSocket technology.

It is just a programming experiment to taste how the WebSocket technology works, how to implement it and how is its performance.

The conclusions

The result can't be more satisfactory:

  • Very easy and intuitive API based in events
  • Good Ruby support in the server side with EventMachine WebSocket
  • Very Good performance, with my very poor Internet connection the response is almost immediate.

Demo

Animal Chat demo

How to play with it in local

Clone the repo

git clone git@github.com:fguillen/AnimalChat.git

Prepare the server

cd AnimalChat/server/
bundle install
./bin/animal_chat_server 127.0.0.1  # run the server

Open the client

cd AnimalChat/client
open index.html

Status

For the experiment concerns this project is already in production status. I don't think is gonna be improvements in this project.

Next step is gonna be build a game :).

More technologies used

BackBone.js

It is also my first time with BackBone.js and I have to say I'm not going to develop any other spaghetti JS code any more. MVC rules, event driven development rules.

Jasmine.js

I have tried to make the JS tests using Qunit which simplicity I love, but the fail error messages were very ambiguous and I had to move all the tests to Jasmine which I don't like to much the sugar syntax Rspec style but its messages are more helpful.

Sinon.js

Incredible helpful JS mock library.