-
Notifications
You must be signed in to change notification settings - Fork 17
nodel spec
Justin Parker edited this page Jul 18, 2019
·
5 revisions
Client multicasts:
{ "discovery": "*", "types": ["tcp", "http"] }
Server replies (unicasts) back:
{ "present": ["Node X", "Node Y", "Node Z"],
"addresses": ["tcp://192.168.2.10:60223", "http://192.168.2.10:8085/nodes/%NODE%/"] }
Client creates TCP connection to 192.168.2.10:60223
.
Client sends:
{ "node": "Node X",
"actions": [ "Action A", "Action B", "Action C" ],
"events": ["Event R", "Event S", "Event T" ] }
Server confirms with:
{ "node": "Node X",
"actions": [ "Action A", "Action B", "Action C" ],
"events": ["Event R", "Event S", "Event T" ] }
Client calls Action A:
{ "node": "Node X", "action": "Action A", "arg": 0 }
Clients waits for events...
Server sends:
{ "node": "Node X", "event": "Event R", "arg": true }
{ "node": "Node X", "event": "Event S", "arg": [1, 2, 3] }
See https://github.com/museumsvictoria/nodel/wiki/Simple-names
Nodel: http://nodel.io/ | White Paper