Galaxya
embeddable peer 2 peer service discovery and configuration service
- Galaxya helps one process or machine discover another, using gossip
- Galaxya helps one process prepare for discovery of processes that do not exist yet.
Example
start galaxya from command line (starts on port 25120)
seed
npm install -g galaxya
> galaxya
service1.js
var galaxya = seeds: '127.0.0.1:25120' galaxyastart { galaxya}
service2.js
var galaxya = port: 25121 seeds: '127.0.0.1:25120' }galaxyastart { galaxya}
client.js
var galaxya = port: 25123 seeds: '127.0.0.1:25122' galaxyastart { var services = galaxya //services might be // [ // { port: 12345, name: 'foo', version: '1.0.0', data: { my: 'service', data: 1 }}, // { port: 12345, name: 'foo', version: '0.0.6', data: { my: 'service', data: 1 }} // ] // discover new foo services (in the future!) var discovery = galaxya discovery discovery // this also works galaxya}
namespacing
// service1.js galaxya galaxya // serviceClient.js var discovery = galaxya discovery
Availability
// serviceClient.js var discovery = galaxya discovery
TODO
- document the 1 to many mapping between gossiper to services topology
- add auto network space assignment
- is trie really the right structure for the underlying index?
- allow for gossiper per machine architecture
- discoverService callback, first time only or always?
- add consensus algorithm