A simple distributed application running across multiple Docker containers.
Run the following command inside the directory:
docker compose up -d
The app will be running at [hostip:5000], and the results will be at [hostip:5001].
- A front-end web app in Python which lets you vote between two options
- A Redis queue which collects new votes
- A Java worker which consumes votes and stores them inβ¦
- A Postgres database backed by a Docker volume
- A Node.js webapp which shows the results of the voting in real time
The voting application only accepts one vote per client. It does not register votes if a vote has already been submitted from a client.
This isn't an example of a properly architected perfectly designed distributed app... it's just a simple example of the various types of pieces and languages you might see (queues, persistent data, etc), and how to deal with them in Docker at a basic level.