jars
v2.18.0
Published
JSON-RPC over Redis
Downloads
133
Readme
Jars
JSON-RPC over Redis
Install
npm install jars
Usage
How it works
- Services listen for RPC requests using Redis lists
- Clients receive responses using Redis pub/sub
Calculator
SERVER: BLPOP jars.rpc.calculator
CLIENT: SUBSCRIBE jars.reply.foo
CLIENT: LPUSH jars.rpc.calculator {id:1,method:"sum",params:[1,2],meta:{replyChannel:"foo"}}
SERVER: PUBLISH jars.reply.foo {id:1,status:"ack"}
SERVER: BLPOP jars.rpc.calculator
SERVER: PUBLISH jars.reply.foo {id:1,result:3}
Author
Andreas Brekken [email protected]
License
MIT