Skip to Main Content
Mastering Elixir
book

Mastering Elixir

by André Albuquerque, Daniel Caixinha
July 2018
Intermediate to advanced content levelIntermediate to advanced
574 pages
14h 7m
English
Packt Publishing
Content preview from Mastering Elixir

Tracking users statuses using Presence

To finish this chapter, we'll take a quick look at how we can add a list of online users to our application, and in the process demonstrate how easy it is to accomplish this using Phoenix Presence. This feature was released in Phoenix 1.2 and is built on top of Phoenix PubSub and Channels. Phoenix Presence allows us to register process information on a topic, which is replicated transparently inside a cluster.

One of the special feature of Presence is that there's no single point of truth, and consequently there's no single point of failure. Whereas, in other programming languages, you'd likely use a database (or some other central component) to store the status of each user, Phoenix Presence implements ...

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.
Start your free trial

You might also like

Testing Elixir

Testing Elixir

Andrea Leopardi, Jeffrey Matthias

Publisher Resources

ISBN: 9781788472678Supplemental Content