Some demos about UpRing.
- clone this repository, or download its source code
- run
npm install
in this repository directory - run
npm install pino -g
This has been tested on node v6.9.4.
- tmux
- nginx
Adjust ./demo-kv.sh
to your liking, and run it.
curl -X POST -d 'hello upring' localhost:3043
curl -v localhost:3044
# on another shell
curl localhost:3042?live=true # use SSE to send updates
# one more shell
curl -X POST -d 'by Matteo' localhost:3043
# kill one of the peers
# and try again
You can also use the nginx instance that has been spawned as http://localhost:8082, it is configured to load balance across all the peers.
Check http://localhost:8042 what is happening with upring-control.
upring-pubsub and multines.
- tmux
- nginx
Adjust ./demo-chat.sh
to your liking, and run it.
Point your browser to http://localhost:8082 for the load balancer,
or to http://localhost:3042, http://localhost:3043,
http://localhost:3044 instances. Wildcards #
and
+
works as well.
You can kill any of the peers, and the messages will keep flowing.
Check http://localhost:8042 what is happening with upring-control.
MIT