reactive manifesto - developing real-time leaderboards
TRANSCRIPT
![Page 1: Reactive Manifesto - Developing Real-time Leaderboards](https://reader037.vdocuments.site/reader037/viewer/2022110107/58ac11b01a28ab33178b5b17/html5/thumbnails/1.jpg)
Reactive ManifestoDeveloping Real-time Leaderboards
Binoy ShahTechnical ArchitectWashington Post (Games)
![Page 2: Reactive Manifesto - Developing Real-time Leaderboards](https://reader037.vdocuments.site/reader037/viewer/2022110107/58ac11b01a28ab33178b5b17/html5/thumbnails/2.jpg)
What is The Reactive Manifesto
http://www.reactivemanifesto.org/
Strive to be: Responsive Resilient Elastic Asynchronous
![Page 3: Reactive Manifesto - Developing Real-time Leaderboards](https://reader037.vdocuments.site/reader037/viewer/2022110107/58ac11b01a28ab33178b5b17/html5/thumbnails/3.jpg)
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
![Page 4: Reactive Manifesto - Developing Real-time Leaderboards](https://reader037.vdocuments.site/reader037/viewer/2022110107/58ac11b01a28ab33178b5b17/html5/thumbnails/4.jpg)
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
![Page 5: Reactive Manifesto - Developing Real-time Leaderboards](https://reader037.vdocuments.site/reader037/viewer/2022110107/58ac11b01a28ab33178b5b17/html5/thumbnails/5.jpg)
Leaderboards – Dense Ranking
![Page 6: Reactive Manifesto - Developing Real-time Leaderboards](https://reader037.vdocuments.site/reader037/viewer/2022110107/58ac11b01a28ab33178b5b17/html5/thumbnails/6.jpg)
Leaderboards - Initial PerformanceRDBMS 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,0007662 7731
30,000,00045,000 43,000
So are we doomed??
![Page 7: Reactive Manifesto - Developing Real-time Leaderboards](https://reader037.vdocuments.site/reader037/viewer/2022110107/58ac11b01a28ab33178b5b17/html5/thumbnails/7.jpg)
Our hero…
Redis NoSQL Server
![Page 8: Reactive Manifesto - Developing Real-time Leaderboards](https://reader037.vdocuments.site/reader037/viewer/2022110107/58ac11b01a28ab33178b5b17/html5/thumbnails/8.jpg)
Leaderboards - Solution
What is Redis? REmote DIctionary Server Open source (http://redis.io) since 2009 Advanced in-memory key-value data-structure
server
![Page 9: Reactive Manifesto - Developing Real-time Leaderboards](https://reader037.vdocuments.site/reader037/viewer/2022110107/58ac11b01a28ab33178b5b17/html5/thumbnails/9.jpg)
Leaderboards - Solution
Available in-memory data structure in Redis: Hashes P List Sets Sorted Sets P Key Value
![Page 10: Reactive Manifesto - Developing Real-time Leaderboards](https://reader037.vdocuments.site/reader037/viewer/2022110107/58ac11b01a28ab33178b5b17/html5/thumbnails/10.jpg)
Leaderboards – DB vs Redis Load Test 30 million scores, 100k players, 100 leaderboards
![Page 11: Reactive Manifesto - Developing Real-time Leaderboards](https://reader037.vdocuments.site/reader037/viewer/2022110107/58ac11b01a28ab33178b5b17/html5/thumbnails/11.jpg)
Leaderboards - Stack
Leaderboards AWS Stack
![Page 12: Reactive Manifesto - Developing Real-time Leaderboards](https://reader037.vdocuments.site/reader037/viewer/2022110107/58ac11b01a28ab33178b5b17/html5/thumbnails/12.jpg)
Leaderboards…The TechLeading edge technology stack:• Scala• Java 8• Play Framework• Redis 3.0 NoSql DB• JSON ( RESTful APIs )• AngularJS• Bootstrap ( JS Library • Oracle 11g
![Page 13: Reactive Manifesto - Developing Real-time Leaderboards](https://reader037.vdocuments.site/reader037/viewer/2022110107/58ac11b01a28ab33178b5b17/html5/thumbnails/13.jpg)
Leaderboards…The TechLeaderboard Stack [ Deployment Architecture ]
![Page 14: Reactive Manifesto - Developing Real-time Leaderboards](https://reader037.vdocuments.site/reader037/viewer/2022110107/58ac11b01a28ab33178b5b17/html5/thumbnails/14.jpg)
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
![Page 15: Reactive Manifesto - Developing Real-time Leaderboards](https://reader037.vdocuments.site/reader037/viewer/2022110107/58ac11b01a28ab33178b5b17/html5/thumbnails/15.jpg)
Key TakeawaysDesign for simplicity
Simplicity is key to being responsiveDevelop iteratively and incrementally
Development process is responsive, it can scale well to changing requirements
Optimize your application in phasesLoad test application with worst case scenario in mind
Forges path for scaling and being more elasticStress test your application
Shows you bottlenecks in the system and help in optimizing the bottleneck
![Page 16: Reactive Manifesto - Developing Real-time Leaderboards](https://reader037.vdocuments.site/reader037/viewer/2022110107/58ac11b01a28ab33178b5b17/html5/thumbnails/16.jpg)
Questions