Design WhatsApp or Wechat Flashcards

1
Q

What questions to ask interviewer?

A

Ask about features: want service available on phones, 1:1 messaging with just text (baseline)

1) One : One text
2) Sent/received/read
3) Push notifications

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

One to One design/bottleneck

A

Bob -> Server -> Alice (three components can be asynchronous). Storage optimization = only store in server what is in progress of being delivered

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Server architecture

A

Server has number of queues, used to store messages. Once message is received, its removed from queue. Problem is first message goes to server 1 but Bob is offline, second message goes to server 2 (if server 1 queue is full or something) so Bob may get messages in wrong order

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Sent/received/read feature

A

Server replies to Alice with “sent” notification. Same with “received” when Bob receives message. Bob could send acknowledgment “message” with ID -> doesn’t matter which server it goes through for “read”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Push notifications feature

A

push notifications are fire / forget. Once server gets ack from Bob that he got push notification, server can delete it. Possibly have separate server just to log push notifications?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly