reactive manifesto - developing real-time leaderboards

16
Reactive Manifesto Developing Real-time Leaderboards Binoy Shah Technical Architect Washington Post (Games)

Upload: binoy-shah

Post on 21-Feb-2017

350 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Reactive Manifesto - Developing Real-time Leaderboards

Reactive ManifestoDeveloping Real-time Leaderboards

Binoy ShahTechnical ArchitectWashington Post (Games)

Page 2: Reactive Manifesto - Developing Real-time Leaderboards

What is The Reactive Manifesto

http://www.reactivemanifesto.org/

Strive to be: Responsive Resilient Elastic Asynchronous

Page 3: Reactive Manifesto - Developing Real-time Leaderboards

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

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

Leaderboards – Dense Ranking

Page 6: Reactive Manifesto - Developing Real-time Leaderboards

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

Our hero…

Redis NoSQL Server

Page 8: Reactive Manifesto - Developing Real-time Leaderboards

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

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

Leaderboards – DB vs Redis Load Test 30 million scores, 100k players, 100 leaderboards

Page 11: Reactive Manifesto - Developing Real-time Leaderboards

Leaderboards - Stack

Leaderboards AWS Stack

Page 12: Reactive Manifesto - Developing Real-time Leaderboards

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

Leaderboards…The TechLeaderboard Stack [ Deployment Architecture ]

Page 14: Reactive Manifesto - Developing Real-time Leaderboards

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

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

Questions