educative.io

Whats app design

In the topic of supporting sending messages to groups, It is mentioned that:

the group message handler follows the same process as a WebSocket server and delivers the message to each user.

But what exactly does that mean? Does it mean that the group message handler maintains a cache (like the web socket servers) that maps users to sockets they are connected so it knows where to send message for a user?

What if one or more users are offline in the system? Would it have to store the message in the Mnesia database cluster?