let's chat about chat - ricon 2014

Download Let's Chat about Chat - RICON 2014

Post on 21-Jun-2015

251 views

Category:

Software

4 download

Embed Size (px)

DESCRIPTION

In League of Legends, just as in any competitive team game, communication is essential to success. Therefore, when building Chat for the game we had to make sure that the new service would be absolutely rock solid in every respect. This includes not only guaranteed message delivery and consistent presence propagation across the system, but also maintenance of the created social network graph. In this talk I would like to present how we achieved linear scalability for Chat, improved its overall fault tolerance, and got ready for the new features we wanted to ship. I will also discuss in detail why we migrated our data from MySQL to Riak and how we used CRDTs to deal with conflicting object updates.

TRANSCRIPT

  • 1. LETS CHATABOUT CHATMichal Ptaszek, @michalptaszekRiot Games

2. WHATS PLANNED1 2 34 5GAME CHAT RIAK LESSONSLEARNEDQ&A 3. WHAT IS LEAGUE OF LEGENDS?2009LAUNCHTEAMORIENTED100+CHAMPSMODERNFANTASY 4. MESSAGING SERVICEPRESENCE SERVICESOCIAL GRAPH SERVICECHATWHAT IS IT? 5. CHATWHAT IS IT? 6. CHAT BY THE NUMBERS67 millionmonthlyplayers27 milliondailyplayers7.5 millionconcurrentplayers1 billioneventsrouted perserver, perday 7. CHAT AT 10K FEETSTABLE, SCALABLE CHAT SERVICEPROTOCOL DATASERVER STORE 8. CHAT AT 10K FEETSTABLE, SCALABLE CHAT SERVICEDATAPROTOCOL SERVER STORE 9. PROTOCOL: XMPPDecentralizedArchitectureOpennessExtensibilityAvailability ofClientLibrariesSecurity WideAdoption 10. CHAT AT 10K FEETSTABLE, SCALABLE CHAT SERVICEDATAPROTOCOL SERVER STORE 11. SERVER: EJABBERD 12. TECHNOLOGY: ERLANG/OTPErlang is...Which gives us...A functional languageBuilt with concurrency anddistribution in mindAble to scale extremely wellCapable of reloading code on the flyA declarative style of programmingAn easier way to build ourdistributed applicationsMore time to focus on codingLess downtime 13. SERVER: EJABBERD - PHILOSOPHYARCHITECTUREFAULTTOLERANCELET ITCRASH 14. SERVER: EJABBERD - ARCHITECTURESecondaryRiak ClusterRiak RiakEjabberd Ejabberd LB 15. CHAT AT 10K FEETSTABLE, SCALABLE CHAT SERVICEPROTOCOL SERVER DATASTORE 16. RIAKRIAK: ARCHITECTURESCALE LinearlyscalableNo growthheadachesFAULTHigherTOLERANCE No SPoF uptimeSCHEMA-LESSFasterfeatureiterationsMoreshippedfeatures 17. ARCHITECTUREDATA STORE: RIAK Riak RiakRiakEjabberd EjabberdEjabberd 18. RIAK: CONFLICT RESOLUTIONCRDT 19. RIAK: CONFLICT RESOLUTIONCRDT 20. FRIENDS LISTSRIAK: DATA TYPES 21. IGNORE LISTSRIAK: DATA TYPES 22. OFFLINE MESSAGESRIAK: DATA TYPES 23. LAST ONLINE TSRIAK: DATA TYPES 24. Sourcecluster #1MDC REPLICATIONDATA STORE: RIAKSinkclusterSourcecluster #2Sourcecluster #3 25. RIAK STATSRIAK: MONITORING 26. RIAK CLUSTERRIAK: MONITORING 27. KEEP YOUR OBJECTS SMALLLESSONS LEARNED 28. AVOID SIBLINGS CREATIONLESSONS LEARNED 29. ALWAYS LOAD TEST YOUR CODELESSONS LEARNED 30. THINGS WILL FAILLESSONS LEARNED 31. CHAT IS DOING GREAT!SCALE AND PERFORMANCECHAT IS EVOLVINGCURRENTSITUATION 32. THANK YOU!ANY QUESTIONS?