+ All Categories
Home > Software > Let's Chat about Chat - RICON 2014

Let's Chat about Chat - RICON 2014

Date post: 21-Jun-2015
Category:
Upload: michal-ptaszek
View: 265 times
Download: 4 times
Share this document with a friend
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.
Popular Tags:
32
ABOUT CHAT LET’S CHAT Michal Ptaszek, @michalptaszek Riot Games
Transcript
Page 1: Let's Chat about Chat - RICON 2014

ABOUT CHATLET’S CHAT

Michal Ptaszek, @michalptaszekRiot Games

Page 2: Let's Chat about Chat - RICON 2014

WHAT’S PLANNED

1 2 3

GAME CHAT RIAK LESSONSLEARNED

4 5

Q&A

Page 3: Let's Chat about Chat - RICON 2014

WHAT IS LEAGUE OF LEGENDS?

2009LAUNCH

TEAMORIENTED

100+CHAMPS

MODERNFANTASY

Page 4: Let's Chat about Chat - RICON 2014

MESSAGING SERVICE

PRESENCE SERVICE

SOCIAL GRAPH SERVICE

WHAT IS IT?CHAT

Page 5: Let's Chat about Chat - RICON 2014

WHAT IS IT?CHAT

Page 6: Let's Chat about Chat - RICON 2014

CHAT BY THE NUMBERS

67 million monthly players

27 million daily

players

7.5 million concurrent

players

1 billion events

routed per server, per

day

Page 7: Let's Chat about Chat - RICON 2014

CHAT AT 10K FEETSTABLE, SCALABLE CHAT SERVICE

PROTOCOL DATA STORESERVER

Page 8: Let's Chat about Chat - RICON 2014

STABLE, SCALABLE CHAT SERVICE

DATA STORESERVERPROTOCOL

CHAT AT 10K FEET

Page 9: Let's Chat about Chat - RICON 2014

PROTOCOL: XMPP

Decentralized Architecture

Openness

Extensibility

Availability of Client

Libraries

Security Wide Adoption

Page 10: Let's Chat about Chat - RICON 2014

STABLE, SCALABLE CHAT SERVICE

CHAT AT 10K FEET

DATA STOREPROTOCOL SERVER

Page 11: Let's Chat about Chat - RICON 2014

SERVER: EJABBERD

Page 12: Let's Chat about Chat - RICON 2014

Which gives us...

TECHNOLOGY: ERLANG/OTPErlang is...

A functional language

Built with concurrency and distribution in mind

Able to scale extremely well

Capable of reloading code on the fly

A declarative style of programming

An easier way to build our distributed applications

More time to focus on coding

Less downtime

Page 13: Let's Chat about Chat - RICON 2014

SERVER: EJABBERD - PHILOSOPHY

ARCHITECTURE

LET ITCRASH

FAULTTOLERANCE

Page 14: Let's Chat about Chat - RICON 2014

SERVER: EJABBERD - ARCHITECTURE

SecondaryRiak Cluster

Ejabberd Ejabberd LB

Riak Riak

Page 15: Let's Chat about Chat - RICON 2014

STABLE, SCALABLE CHAT SERVICE

CHAT AT 10K FEET

SERVERPROTOCOL DATA STORE

Page 16: Let's Chat about Chat - RICON 2014

‣‣

RIAK

RIAK: ARCHITECTURE

SCALE Linearly scalable

No growth headaches

FAULTTOLERANCE No SPoF Higher

uptime

SCHEMA-LESSFaster feature

iterations

More shipped features

Page 17: Let's Chat about Chat - RICON 2014

ARCHITECTURE

DATA STORE: RIAK

Ejabberd Ejabberd

Riak Riak

Ejabberd

Riak‣

Page 18: Let's Chat about Chat - RICON 2014

CRDT

RIAK: CONFLICT RESOLUTION

Page 19: Let's Chat about Chat - RICON 2014

CRDT

RIAK: CONFLICT RESOLUTION

Page 20: Let's Chat about Chat - RICON 2014

FRIENDS LISTS

RIAK: DATA TYPES

○○○○

Page 21: Let's Chat about Chat - RICON 2014

IGNORE LISTS

RIAK: DATA TYPES

Page 22: Let's Chat about Chat - RICON 2014

OFFLINE MESSAGES

RIAK: DATA TYPES

Page 23: Let's Chat about Chat - RICON 2014

LAST ONLINE TS

RIAK: DATA TYPES

Page 24: Let's Chat about Chat - RICON 2014

Source cluster #1

MDC REPLICATION

DATA STORE: RIAK

Sinkcluster

Source cluster #2

Source cluster #3

Page 25: Let's Chat about Chat - RICON 2014

RIAK STATS

RIAK: MONITORING

Page 26: Let's Chat about Chat - RICON 2014

RIAK CLUSTER

RIAK: MONITORING

Page 27: Let's Chat about Chat - RICON 2014

KEEP YOUR OBJECTS SMALL

LESSONS LEARNED

Page 28: Let's Chat about Chat - RICON 2014

AVOID SIBLINGS CREATION

LESSONS LEARNED

Page 29: Let's Chat about Chat - RICON 2014

ALWAYS LOAD TEST YOUR CODE

LESSONS LEARNED

Page 30: Let's Chat about Chat - RICON 2014

THINGS WILL FAIL

LESSONS LEARNED

Page 31: Let's Chat about Chat - RICON 2014

CHAT IS DOING GREAT!

SCALE AND PERFORMANCE

CHAT IS EVOLVING

SITUATIONCURRENT

Page 32: Let's Chat about Chat - RICON 2014

THANK YOU!ANY QUESTIONS?


Recommended