Skip to content

jimjh/octopi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Octopi

One octopus, two octopi.

Installation

This package depends on go's unofficial websocket implementation. To install the websockets package, execute the following:

$> go get code.google.com/p/go.net/websocket

Development

  1. Clone the repository
$> git clone git@github.com:jimjh/octopi.git
  1. Ensure that your $GOPATH contains the go directory in this repository.
# ~/.bash_profile
export GOPATH="/path/to/git/repo/go"

Testing

For unit tests, run

$> cd go; make test

For integration tests, run

$> tests/basictests.sh
$> tests/transitiontests.sh

Run

All paths below are relative to the go directory.

To start a broker,

$> go install octopi/run/broker
$> bin/broker -conf config/leader.json

To start a register,

$> go install octopi/run/register
$> bin/register -conf config/register.json

To start followers,

$> go install octopi/run/broker
$> bin/broker -conf config/follower1.json

Note that the leader/follower relationships are only for startup purposes. Once the system is running, all brokers should join as followers. If the leader dies, one of the followers will be elected to become the leader.

About

A buggy, hacky, distributed publish-subscribe messaging system for websockets written in Go under three weeks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published