educative.io

Transient Message Store is missing in the detailed design

The mechanism to support offline messages suggested by the author seems inadequate. It’s not able to solve the below use case

  1. User A sends a message to User B when user B is offline.
  2. According to the current system design, the chat server will simply send failure message to client A and will embed the retry mechanism to failed messages. However, this is not the case with actual Facebook messenger. This design assumes that in order to send and receive messages both users have to be online.
  3. Rather than adding a retry mechanism what we can do is push it in the database and mark it as undelivered (using some flag), send sent notification user A , when User B logs in we push all the undelivered messages to the user B.
1 Like