42 ELO Leaderboard
Competitive Rankings System
High-performance ELO ranking system for 42 Heilbronn built with Go and PostgreSQL, optimized for sub-100ms queries.
Problem: The 42 Heilbronn community needed a competitive ranking system to track student tournament matches.
Solution: I built a complete ELO ranking system in Go with PostgreSQL, optimized from the ground up for performance. Go's concurrency primitives made it natural to handle simultaneous match submissions and API requests, while careful database optimization techniques ensured queries stayed fast even as the dataset grew. The backend processes real-time match updates and serves a React frontend with live leaderboards, detailed player profiles, and historical match data.
Technical Approach: The core involved implementing composite indexes on frequently-queried columns, optimizing join patterns to reduce query execution time, and using Redis for cached ranking calculations. Go's goroutines handle concurrent request processing cleanly—each match update is processed independently without blocking others. I applied profiling throughout development to identify and eliminate bottlenecks. The API is designed around the principle that performance optimization must be built in from day one, not retrofitted. Similar optimization patterns appear in other systems projects like the raytracer, where every algorithmic decision has direct performance implications.
Results & Learnings: The system achieves 30ms average response times and maintains 99.9% uptime across tournament seasons. I learned that query optimization and profiling-driven development are non-negotiable for systems that prioritize performance. Working with PostgreSQL taught me how relational database design directly impacts application speed—the right schema decisions cascade through the entire system. This project reinforced why systems programming discipline, applied to even web-facing applications, matters: thoughtful architectural choices at scale make the difference between a system that handles growth gracefully and one that crumbles under its own success.
- Stack
- Go, TypeScript, React, PostgreSQL
- Role
- Full implementation
- Demo
- Live demo
- Link
- View source