Phoenix Tracker vs. Presence

Let's look at the difference between Tracker and Presence.

We'll cover the following

Presence

Phoenix Presence is an implementation of Tracker that provides helper functions for working with Channels. Its implementation of handle_diff/2 broadcasts changes locally using PubSub when a process joins or leaves the Tracker. Clients listen for change messages and process them to keep a client-side version of the Tracker state. The official Phoenix JavaScript library includes a Presence class that handles the messages automatically for us. The following figure shows the flow of Presence updates:

Get hands-on with 1000+ tech skills courses.