0.3.2 • Published 11 years ago

autonode v0.3.2

Weekly downloads
4
License
-
Repository
github
Last release
11 years ago

autonode

Create a node that starts a tcp server on a port, but if the address is in use, connect to that port instead.

Also, if the current server goes down, another node will become the server.

NOTE: this only works for a cluster on a single machine.

Example

This is the code for both the server and the client.

var autonode = require('autonode')

autonode(function (stream) {
  // called when a connection is made, whether
  // this node turns out to be the client or the server.
}).listen(PORT)

Naturally you will need to use a decentralized communication protocol. checkout crdt or scuttlebutt

License

MIT

0.3.2

11 years ago

0.3.1

11 years ago

0.3.0

11 years ago

0.2.1

11 years ago

0.2.0

11 years ago

0.1.0

11 years ago

0.0.0

12 years ago