Validations
Candidate, election relationship, ballot-box state, and time window are validated before persistence.
Election platform
Election platform with Angular, Spring Boot, and PostgreSQL used in an election at Etec de Guarulhos.
Technical vision
Vox keeps validation, vote persistence, and ballot-box closing inside the same transaction to avoid invalid concurrency.
100% success over 10,000 requests and 100 concurrent accesses on AWS EC2 t2.micro
Candidate, election relationship, ballot-box state, and time window are validated before persistence.
PESSIMISTIC_WRITE serializes requests on the same ballot box.
STOMP and WebSocket communicate platform updates.
Execution flow
Vox keeps validation, vote persistence, and ballot-box closing inside the same transaction to avoid invalid concurrency.
CONCURRENT REQUESTS -> LOCK -> COMMIT -> NEXT
The platform validates candidate, election, ballot box, and time window.
PESSIMISTIC_WRITE serializes requests on the same ballot box.
Validation, vote persistence, and ballot-box closing remain inside the same transaction.
Engineering decisions
PESSIMISTIC_WRITE prevents invalid concurrent votes on the same ballot box.
Validation, vote persistence, and ballot-box closing stay in the same transactional boundary.
STOMP and WebSocket support realtime communication.
Risk controls
Candidate, election, ballot-box, and time-window validations protect the flow.
Serialization through PESSIMISTIC_WRITE avoids conflicts at the critical voting point.
Stack
Outcome
More than 500 voters participated in an election at Etec de Guarulhos; on AWS EC2 t2.micro, the test had 10,000 requests, 100 concurrent accesses, 100% success, 0 failures, and 106 req/s.