How dockersamples/example-voting-app works
Example Voting App collects browser votes, processes them asynchronously, stores one vote per voter, and streams aggregated results to a live results page. The principal flow is voter → Flask voting app → Redis queue → .NET worker → PostgreSQL → Node.js results server → browser. The README documents the Python, Redis, .NET, PostgreSQL, and Node.js roles; sampled source confirms the queue, database, and Socket.IO interactions. The tree also includes a seed-data utility, but it is not part of the runtime workflow. Deployment manifests are omitted; unsampled UI and deployment details are represented only where their paths are supported.
Main entry points: server.js Results server · app.js Results interface · app.py Voting web app · Program.cs Vote worker
Components 9
Vote collection
- Voting web app
vote/app.py
Vote processing
- Vote worker
worker/Program.cs
Live results
- Results server
result/server.js - Results interface
result/views/app.js - Socket.IO client
result/views/socket.io.js
Data services
- Vote queue
- Votes database
Other components
- Voter
- Results viewer
Connections 9
- Voter → Voting web app: submits vote
README.md - Voting web app → Vote queue: enqueues vote
vote/app.py - Vote queue → Vote worker: pops vote
worker/Program.cs - Vote worker → Votes database: writes vote
worker/Program.cs - Results server → Votes database: queries totals
result/server.js - Results server → Results interface: emits scores
result/server.js - Results interface → Socket.IO client: uses client library
- Socket.IO client → Results server: connects socket
- Results viewer → Results interface: views results
README.md