Skip to content

upringjs/upring-demos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

upring-demos

Some demos about UpRing.

Prerequisites

  1. clone this repository, or download its source code
  2. run npm install in this repository directory
  3. run npm install pino -g

This has been tested on node v6.9.4.

Key Value Store

upring-kv

Requirements

  • tmux
  • nginx

To start

Adjust ./demo-kv.sh to your liking, and run it.

Example

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.

Publish Subscribe system (chat)

upring-pubsub and multines.

Requirements

  • tmux
  • nginx

To start

Adjust ./demo-chat.sh to your liking, and run it.

Demo Script

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.

License

MIT

About

Some demos about UpRing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages