Juggernaut implemented in Erlang using cowboy, bullet and eredis
Erlang JavaScript CoffeeScript Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
client_example
priv/ssl
src
LICENSE
LICENSE_bullet
LICENSE_cowboy
LICENSE_juggernaut
Makefile
README.md
rebar
rebar.config
start.sh

README.md

ErlyJuggernaut

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.

Libraries used

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

Other libraries used:

Installation

Make sure erlang and redis is installed.

Start Redis:

redis-server

Compile and start ErlyJuggernaut:

make
./start.sh

Publishing Data from Ruby

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

TODO

  • Add a subscription queue so that we don't need to unbind and rebind the handlers when there is a connection lost