Slide 1

Slide 1 text

This presentation is provided on a strictly private and confidential basis for information purposes only. 看 KKBOX 怎麼走 通知中心這條路 presented by Hash Lin 2018/08/02

Slide 2

Slide 2 text

Who am I ● KKBOX Product Platform Develop Devision(PPDD) Programmer ● Full-Stack Programmer ● Love Community, PHP, Open Source

Slide 3

Slide 3 text

Agenda ● What’s Notification Center ● How we use Notification Center ● Case study

Slide 4

Slide 4 text

What’s Notification Center ● Announcement ● New Release ● Listen-with Artist online ● Subscritpion ● Billing Announcement ● ...

Slide 5

Slide 5 text

Notification Center history ● MySQL ● more… more… more… ○ Kind of message ○ Users ○ Faster

Slide 6

Slide 6 text

Why Redis ● Flexible Data Structure ● Some powerful command ○ INCR ○ ZADD ○ LPUSH ○ ZREVRANGE ○ … ● Twitter

Slide 7

Slide 7 text

Data Structure

Slide 8

Slide 8 text

Redis Replication Structure

Slide 9

Slide 9 text

Monitor

Slide 10

Slide 10 text

Monitor

Slide 11

Slide 11 text

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...

Slide 12

Slide 12 text

Case 2. Failover bandwidth problem

Slide 13

Slide 13 text

Conclusion ● What’s Notification Center ● How we use Notification Center ● Case study

Slide 14

Slide 14 text

Contact me ● hashman @ Github ● Hash Lin @ Facebook ● [email protected]