Slide 1

Slide 1 text

2019 DevDay Inside OpenChat > Taekjoo Kim > LINE Plus OpenChat Dev Software Engineer

Slide 2

Slide 2 text

Designing a Messaging Service 3

Slide 3

Slide 3 text

Agenda > Introduction To OpenChat > Background > Design for Scalability • Scalable Storage • Effective Delivery • Endurable Server > Summary > Future Works 4

Slide 4

Slide 4 text

5

Slide 5

Slide 5 text

Entrance 6

Slide 6

Slide 6 text

Discovery 7

Slide 7

Slide 7 text

Discovery 8

Slide 8

Slide 8 text

Join 9

Slide 9

Slide 9 text

Join 10

Slide 10

Slide 10 text

Chat 11

Slide 11

Slide 11 text

Chat 12

Slide 12

Slide 12 text

Background 13

Slide 13

Slide 13 text

OpenChat’s Strategy 14 14

Slide 14

Slide 14 text

OpenChat’s Strategy 15 15

Slide 15

Slide 15 text

OpenChat’s Strategy 16 Family Friends Mutual 16

Slide 16

Slide 16 text

OpenChat’s Strategy 17 Family Friends Mutual Hobby Town School Game Fan club Trip Study Conference Recipe Music Sports Parttime Flee
 Market Social Business 17

Slide 17

Slide 17 text

Requirements Increase Member Size Feature Chat Feature Community Support Enhancement 18

Slide 18

Slide 18 text

Scalability 19

Slide 19

Slide 19 text

Technical Challenges 20

Slide 20

Slide 20 text

Technical Challenges 21

Slide 21

Slide 21 text

Technical Challenges 22

Slide 22

Slide 22 text

Technical Challenges Storage Storage Storage Storage Storage Storage 23

Slide 23

Slide 23 text

Technical Challenges Storage Storage Storage Storage Storage Storage 24

Slide 24

Slide 24 text

Design for Scalability Scalable Storage Endurable Server Effective Delivery 25

Slide 25

Slide 25 text

1) Scalable Storage 26

Slide 26

Slide 26 text

Technical Challenges 27

Slide 27

Slide 27 text

Technical Challenges 28

Slide 28

Slide 28 text

Solution With Sharding 29

Slide 29

Slide 29 text

Pre-Sharding Easy to operate when expanding or shrinking hosts Easy to integrate with the existing tools 30

Slide 30

Slide 30 text

Pre-Sharding Shard Shard ID Local ID Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard 31

Slide 31

Slide 31 text

Pre-Sharding Shard Shard ID Local ID Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard 32

Slide 32

Slide 32 text

Pre-Sharding - Expansion Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard Shard 33

Slide 33

Slide 33 text

Implementation Preshard Model Preshard Manager Preshard DataSource 34

Slide 34

Slide 34 text

Implementation Preshard Model Preshard Manager Preshard DataSource 35

Slide 35

Slide 35 text

In Reality MySQL Expansion in 2018 36

Slide 36

Slide 36 text

2) Effective Delivery 37

Slide 37

Slide 37 text

Event OpenChat Server Storage ! ! ! 38

Slide 38

Slide 38 text

Technical Challenges 39

Slide 39

Slide 39 text

Solutions A. Deliver events when necessary 40

Slide 40

Slide 40 text

Solutions A. Deliver events when necessary B. Reduce the number of events 41

Slide 41

Slide 41 text

Solutions A. Deliver events when necessary C. Adjust the delivery frequency B. Reduce the number of events 42

Slide 42

Slide 42 text

An Example 43

Slide 43

Slide 43 text

A. Deliver Events When Necessary 44

Slide 44

Slide 44 text

A. Deliver Events When Necessary 45

Slide 45

Slide 45 text

A. Deliver Events When Necessary 46

Slide 46

Slide 46 text

B. Reduce the Number of Events 47

Slide 47

Slide 47 text

B. Reduce the Number of Events 48

Slide 48

Slide 48 text

B. Reduce the Number of Events 49

Slide 49

Slide 49 text

C. Adjust the Delivery Frequency !!! !!! !!! 50

Slide 50

Slide 50 text

C. Adjust the Delivery Frequency !!! !!! !!! 51

Slide 51

Slide 51 text

C. Adjust the Delivery Frequency Subscription 52

Slide 52

Slide 52 text

C. Adjust the Delivery Frequency Subscription Server Push 53

Slide 53

Slide 53 text

54

Slide 54

Slide 54 text

55

Slide 55

Slide 55 text

56

Slide 56

Slide 56 text

Effective Delivery 57

Slide 57

Slide 57 text

In Reality 58

Slide 58

Slide 58 text

3) Endurable Server 59

Slide 59

Slide 59 text

Technical Challenges OpenChat Server Talk Server OBS 60

Slide 60

Slide 60 text

Technical Challenges OpenChat Server Talk Server OBS 61

Slide 61

Slide 61 text

Solution Being Asynchronous 62

Slide 62

Slide 62 text

Layers in a Server OpenChat Server Serving
 Layer Business
 Layer Storage
 Layer Client
 Layer 63

Slide 63

Slide 63 text

Layers in a Server OpenChat Server Serving
 Layer Business
 Layer Storage
 Layer Client
 Layer 64

Slide 64

Slide 64 text

Layers in a Server OpenChat Server Serving
 Layer Business
 Layer Storage
 Layer Client
 Layer 65

Slide 65

Slide 65 text

OpenChat Server Implementation Serving
 Layer Business
 Layer MySQL RPC Talk Server HBase Redis 66

Slide 66

Slide 66 text

Implementation 67

Slide 67

Slide 67 text

In Reality MySQL Bug In Dec 2017 68

Slide 68

Slide 68 text

In Reality MySQL Bug In Dec 2017 69

Slide 69

Slide 69 text

Design for Scalability Scalable Storage Endurable Server Effective Delivery 70

Slide 70

Slide 70 text

Future Works Scalable Storage Endurable Server Effective Delivery 71

Slide 71

Slide 71 text

Future Works Scalable Storage Endurable Server Effective Delivery 72

Slide 72

Slide 72 text

Thank You 73