Basic distributed Orderbook example, using Grenache RPC client/server
npm i -g grenache-grape
npm install --save grenache-nodejs-http
npm install --save grenache-nodejs-link
grape --dp 20001 --apw 30001 --aph 30002 --bn '127.0.0.1:20002'
grape --dp 20002 --apw 40001 --aph 40002 --bn '127.0.0.1:20001'
node client.js
The client get a copy of the OrderBook from the other nodes, the other nodes execute the trades when a new order is placed.