Barnacle is a gossip library for Ruby.
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
lib
spec
.document
.gitignore
.rspec
Gemfile
Gemfile.lock
LICENSE.txt
PROTOCOL.txt
README.rdoc
Rakefile

README.rdoc

barnacle

Barnacle is a gossip library for Ruby.

Peer -> Pier -> Barnacle. get it?

Barnacle handles discovery and message passing.

Quickstart

Take a look at examples/chat.rb, and start it up on two machines. On the second machine you start up, use the IP of the first one as the first argument. Now fire it up on any other machines, point it anywhere in the network, and watch the magic happen!

Usage

Node Lifecycle

  • Discover peers, join the graph.

  • Replace slow peer links with faster links.

  • Maintain connectivity!

  • Configurable maximum number of links.

  • Pass messages to other peers.

  • Take care of any loops.

  • Specify a subset of nodes, or send to everybody.

TODO

- Actually finish it, and bring in the tests
- Better logging
- Race condition around two nodes connecting to each other
- Modularize messaging protocol
- Rewrite traversal so it's more efficient
 - Have different traversal strategies
- GC the message sent list with timestamps
- Disconnections
- Customizable service name for dnssd