看 KKBOX 怎麼走通知這條路 @ COSCUP 2018

9fc5354f271d69e9a00f681658fadd66?s=47 Hash Lin
August 14, 2018

看 KKBOX 怎麼走通知這條路 @ COSCUP 2018

小小的鈴鐺按鈕背後隱藏了許多的秘密,分享 KKBOX 怎麼建構通知中心的大小事。
KKBOX 如何透過 Redis 來建構通知中心

9fc5354f271d69e9a00f681658fadd66?s=128

Hash Lin

August 14, 2018
Tweet

Transcript

  1. This presentation is provided on a strictly private and confidential

    basis for information purposes only. 看 KKBOX 怎麼走 通知中心這條路 presented by Hash Lin 2018/08/02
  2. Who am I • KKBOX Product Platform Develop Devision(PPDD) Programmer

    • Full-Stack Programmer • Love Community, PHP, Open Source
  3. Agenda • What’s Notification Center • How we use Notification

    Center • Case study
  4. What’s Notification Center • Announcement • New Release • Listen-with

    Artist online • Subscritpion • Billing Announcement • ...
  5. Notification Center history • MySQL • more… more… more… ◦

    Kind of message ◦ Users ◦ Faster
  6. Why Redis • Flexible Data Structure • Some powerful command

    ◦ INCR ◦ ZADD ◦ LPUSH ◦ ZREVRANGE ◦ … • Twitter
  7. Data Structure

  8. Redis Replication Structure

  9. Monitor

  10. Monitor

  11. Case 1. Read after write problem • Do not use

    different connection when write/get the same key (Singleton) • write key ‘hash’ in master • read key ‘hash’ in slave • I can’t get key ‘hash’ in slave Orz...
  12. Case 2. Failover bandwidth problem

  13. Conclusion • What’s Notification Center • How we use Notification

    Center • Case study
  14. Contact me • hashman @ Github • Hash Lin @

    Facebook • hashmanlin@kkbox.com