Scribble careless drawings with friends, privately
Synchronize drawings from Griffonnage using Socket-io.
// install dependencies and post-build app
$ npm install
// run in development mode
$ npm run dev
// run in production mode
$ npm run build
$ npm run start
docker build -t griffonnage/griffonnage-sync:latest .
docker run --rm --env-file .env -p 9000:9000 griffonnage/griffonnage-sync:latest
Some technical requirements are involved if you plan on deploying this synchronization server as a cluster of nodes.
Please referer to the Socket-IO Documentation on the matter for extensive explanations.
Due to some long-polling operations required by Socket-IO, you need a "sticky session" mechanism in your load-balancing system.
For instance, if using Heroku you must enable their Session Affinity feature for your app:
$ heroku features:enable http-session-affinity -a <app-id>
$ heroku features -a <app-id>
When scaling Socker-IO to multiple nodes, a message broker is required in order to pass messages between nodes seamlessly. Fortunately, Socker-IO as an "adapter" mechanism and an official Redis Adapter.
The Redis adapter is already integrated into this app, but disabled by default.
To enable it, simply set the REDIS_URI
environment variable:
REDIS_URI=redis://localhost:6379/0
Licensed under GNU Affero General Public License v3.0 (AGPLv3)
Copyright (c) 2020 - present Romain Clement