Spaceport is a decentralized service registry for nodejs. There is no central server to maintain or register with. Processes communicate peer-to-peer over multicast (similar to zeroconf/mdns).
Spaceport works great when you have any processes that need to talk to one another but you don't want to predefine their locations or ports.
** This module only works with node 0.10+ **
npm install spaceport
To create a new service and announce its presence.
// port can be specified programmically if assigned by the systemvar service = spaceport;// the service will now announce it is available and capable of responding to requestsservicestart;// to stop the service and announce it should not longer be availableservice;
To listen to a particular service.
// create a browser to tell us when this service comes onlinevar browser = spaceportstart;// service is availablebrowser;
see the wiki for additional details: https://github.com/defunctzombie/node-spaceport/wiki