2. What is The Reactive Manifesto
http://www.reactivemanifesto.org/
Strive to be:
Responsive
Resilient
Elastic
Asynchronous
3. Philosophy: Convention over configuration
Lightweight & Stateless
Asynchronous & Non-blocking
Message Driven [Actor based core framework]
Resilient & Ops - Friendly
Write code in Java and/or Scala
Integrates well with Spring [OMG!!]
Simple API
Play Framework
4. Realtime Game play & Leaderboards
Millions of players
Millions of Player scores x 1000's of Games
Individual Player Rank [Dense Rank]
Various Leaderboard rankings
• Per quiz
• Per category
• Global
Leaderboards
6. Leaderboards - Initial Performance
RDBMS Performance for calculating player Dense rank
# of Player Scores Response Times (ms)
Oracle
Response Times (ms)
MySQL
User Experience
500,000 720 690
1,000,000 3454 3645
10,000,000
7662 7731
30,000,000
45,000 43,000
So are we doomed??
8. Leaderboards - Solution
What is Redis?
REmote DIctionary Server
Open source (http://redis.io) since 2009
Advanced in-memory key-value data-structure server
14. Leaderboards – Live and Kicking !!
Introduced for 'Politics & Pints' section articles
Switched on as default feature of all Quiz games
Logged in players can view participate and view
Leaderboards
15. Key Takeaways
Design for simplicity
Simplicity is key to being responsive
Develop iteratively and incrementally
Development process is responsive, it can scale well to changing requirements
Optimize your application in phases
Load test application with worst case scenario in mind
Forges path for scaling and being more elastic
Stress test your application
Shows you bottlenecks in the system and help in optimizing the bottleneck