JSON-RPC over Redis
npm install jars
- Services listen for RPC requests using Redis lists
- Clients receive responses using Redis pub/sub
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}
Andreas Brekken andreas@brekken.com
MIT