ErlyJuggernaut is an implementation of Juggernaut in erlang.
ErlyJuggernaut's API is similar to that of the original implementation, it is partly compatible to Juggernaut's client. As the development of socket.io-erlang became suspended, socket.io isn't used.
This project starts at spawnfest 2012, where I learnt a lot about Erlang from #erlounge.
Instead of node.js and socket.io, ErlyJuggernaut uses:
- cowboy for socket server, substituting node.js
- bullet for client-side abstraction to websocket and fallback transports, substituting socket.io
Make sure erlang and redis is installed.
Start Redis:
redis-server
Compile and start ErlyJuggernaut:
make
./start.sh
Install Juggernaut ruby gem
gem install juggernaut
Publish some data
$ irb
require "juggernaut"
Juggernaut.publish("channel1", "Some data")
Juggernaut.publish(["channel1", "channel2"], ["foo", "bar"])
For publishing from other clients, please refer to the Juggernaut page
- Add a subscription queue so that we don't need to unbind and rebind the handlers when there is a connection lost