A Seneca.js transport plugin that uses the SWIM gossip algorithm for automatic configuration of the microservice network.
For a detailed example, see Iteration 05 of the nodezoo workshop.
seneca-mesh
This module is a plugin for the Seneca framework.
If you're using this module, and need help, you can:
- Post a github issue,
- Tweet to @senecajs,
- Ask on the Gitter.
If you are new to Seneca in general, please take a look at senecajs.org. We have everything from tutorials to sample apps to help get you up and running quickly.
Install
npm install seneca-balance-clientnpm install seneca-mesh
The seneca-mesh plugin depends on the seneca-balance-client plugin.
And in your code:
Test
To run tests, simply use npm:
npm run test
Quick Example
Base node, so that other nodes have a known reference point to join the network.
base.js
// start first!// $ node base.js
service-foo.js
// this service handles foo:1 messages // $ node service-foo.js
service-bar.js
// this service handles bar:1 messages // $ node service-bar.js
The foo and bar services call each other, but neither requires configuration information!
Examples
You can review the source code of these example projects to see seneca-mesh in action:
Contributing
The Senecajs org encourages open participation. If you feel you can help in any way, be it with documentation, examples, extra testing, or new features please get in touch.
License
Copyright (c) 2015, Richard Rodger and other contributors. Licensed under MIT.