Inside OpenChat

Inside OpenChat

Taekjoo Kim
LINE Plus OpenChat Dev Software Engineer
https://linedevday.linecorp.com/jp/2019/sessions/A1-3

Be4518b119b8eb017625e0ead20f8fe7?s=128

LINE DevDay 2019

November 20, 2019
Tweet

Transcript

  1. 2019 DevDay Inside OpenChat > Taekjoo Kim > LINE Plus

    OpenChat Dev Software Engineer
  2. Designing a Messaging Service 3

  3. Agenda > Introduction To OpenChat > Background > Design for

    Scalability • Scalable Storage • Effective Delivery • Endurable Server > Summary > Future Works 4
  4. 5

  5. Entrance 6

  6. Discovery 7

  7. Discovery 8

  8. Join 9

  9. Join 10

  10. Chat 11

  11. Chat 12

  12. Background 13

  13. OpenChat’s Strategy 14 14

  14. OpenChat’s Strategy 15 15

  15. OpenChat’s Strategy 16 Family Friends Mutual 16

  16. 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
  17. Requirements Increase Member Size Feature Chat Feature Community Support Enhancement

    18
  18. Scalability 19

  19. Technical Challenges 20

  20. Technical Challenges 21

  21. Technical Challenges 22

  22. Technical Challenges Storage Storage Storage Storage Storage Storage 23

  23. Technical Challenges Storage Storage Storage Storage Storage Storage 24

  24. Design for Scalability Scalable Storage Endurable Server Effective Delivery 25

  25. 1) Scalable Storage 26

  26. Technical Challenges 27

  27. Technical Challenges 28

  28. Solution With Sharding 29

  29. Pre-Sharding Easy to operate when expanding or shrinking hosts Easy

    to integrate with the existing tools 30
  30. 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
  31. 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
  32. Pre-Sharding - Expansion Shard Shard Shard Shard Shard Shard Shard

    Shard Shard Shard Shard Shard Shard Shard Shard Shard 33
  33. Implementation Preshard Model Preshard Manager Preshard DataSource 34

  34. Implementation Preshard Model Preshard Manager Preshard DataSource 35

  35. In Reality MySQL Expansion in 2018 36

  36. 2) Effective Delivery 37

  37. Event OpenChat Server Storage ! ! ! 38

  38. Technical Challenges 39

  39. Solutions A. Deliver events when necessary 40

  40. Solutions A. Deliver events when necessary B. Reduce the number

    of events 41
  41. Solutions A. Deliver events when necessary C. Adjust the delivery

    frequency B. Reduce the number of events 42
  42. An Example 43

  43. A. Deliver Events When Necessary 44

  44. A. Deliver Events When Necessary 45

  45. A. Deliver Events When Necessary 46

  46. B. Reduce the Number of Events 47

  47. B. Reduce the Number of Events 48

  48. B. Reduce the Number of Events 49

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

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

  51. C. Adjust the Delivery Frequency Subscription 52

  52. C. Adjust the Delivery Frequency Subscription Server Push 53

  53. 54

  54. 55

  55. 56

  56. Effective Delivery 57

  57. In Reality 58

  58. 3) Endurable Server 59

  59. Technical Challenges OpenChat Server Talk Server OBS 60

  60. Technical Challenges OpenChat Server Talk Server OBS 61

  61. Solution Being Asynchronous 62

  62. Layers in a Server OpenChat Server Serving
 Layer Business
 Layer

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

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

    Storage
 Layer Client
 Layer 65
  65. OpenChat Server Implementation Serving
 Layer Business
 Layer MySQL RPC Talk

    Server HBase Redis 66
  66. Implementation 67

  67. In Reality MySQL Bug In Dec 2017 68

  68. In Reality MySQL Bug In Dec 2017 69

  69. Design for Scalability Scalable Storage Endurable Server Effective Delivery 70

  70. Future Works Scalable Storage Endurable Server Effective Delivery 71

  71. Future Works Scalable Storage Endurable Server Effective Delivery 72

  72. Thank You 73