This content originally appeared on DEV Community and was authored by Aman Saxena
This is a submission for the Redis AI Challenge: Beyond the Cache.
What I Built
I built a real-time voting system using Go (Gin) and Redis 8, designed to handle live user interactions during high-traffic events like sports matches, elections, or social debates.
Create & manage polls with multiple options and expiry time.
Key Features
- JWT-based authentication for users with role-based access (admin vs. regular users).
- Vote tracking per user to prevent multiple submissions.
- Real-time vote count updates using Redis Pub/Sub.
- Admin-only controls to close or delete polls.
- Fetch all polls with vote stats via a dedicated API.
- Designed to scale horizontally with Redis Sets, Hashes, and Streams (planned).
- Integration with genAI for real-time questions for polls, according to the events.
Repo
link :- https://github.com/saxenaaman628/redis-voting-system(in progress)
How I Used Redis 8
- Redis Hashes for Poll Metadata & Vote Counts
- Redis Sets for Preventing Duplicate Votes
- Redis Pub/Sub for Real-time Vote Updates
- TTL on Poll Hashes
Contributors
@paaart
Jigyasa
This content originally appeared on DEV Community and was authored by Aman Saxena