A distributed chatroom with support for real-time collaborative drawing. Think MS Paint meets Google Docs!
- run as a single instance or as multiple clustered nodes
- consistent, persistant state
- dynamically add/remove nodes at any time
- out of the box service discovery and load balancing with zero configuration
Download and install Docker for Mac or Windows.
Run in this directory:
$ docker-compose up
Point your browser to http://paintchat.localhost:8080/
tip: open in multiple tabs for realtime collaborative drawing
Running docker-compose up
will create 3 containers on your machine:
- paintchat: a paintchat server node
- traefik: a traefik instance for dynamic load balancing
- cassandra: a cassandra db instance for data persistence
You can run multiple instances of the paintchat
service together as a cluster. Add additional nodes using the docker-compose scale
command:
$ docker-compose scale paintchat=3
This will increase the total number of paintchat
nodes in the cluster to 3. To confirm, click the Dashboard button in the toolbar - you should now see that the cluster size has increased from 1 to 3.
You can reduce the cluster size in the same way:
$ docker-compose scale paintchat=1
This will reduce the number of paintchat
instances in the cluster to 1.
note: traefik will detect changes to the topology of the system and adjust its list of upstream hosts automatically - no configuration required!