Tracking Presence on a Channel
Let’s track which users are watching a video. This problem may seem easy on the surface, but it’s a notoriously difficult computer science problem when multiple servers are involved. The users may be stored in different places, and we’ll need to access them. We’ll also need to clean up the data when users disconnect. If the connections between servers fail, we’ll need to make some decisions about how to calculate and present exactly who is present.
Luckily, we won’t have to solve any of these problems because we can rely on Channel Presence to solve them for us. When we’re done, we’ll have no single point of failure and no single source of truth, an excellent attribute for a distributed solution. Since the entire ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access