Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abrkn/jars
JSON-RPC over Redis
https://github.com/abrkn/jars
nodejs pubsub redis rpc
Last synced: about 1 month ago
JSON representation
JSON-RPC over Redis
- Host: GitHub
- URL: https://github.com/abrkn/jars
- Owner: abrkn
- License: mit
- Created: 2018-08-28T06:40:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-24T08:50:16.000Z (over 6 years ago)
- Last Synced: 2024-11-15T02:57:52.520Z (about 1 month ago)
- Topics: nodejs, pubsub, redis, rpc
- Language: JavaScript
- Size: 1010 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Jars
JSON-RPC over Redis
## Install
`npm install jars`
## Usage
[See tests](test.js)
## 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
## License
MIT