finds.dev← search

// the find

phoenixframework/phoenix_pubsub

★ 762 · Elixir · MIT · updated May 2026

Distributed PubSub and Presence platform for the Phoenix Framework

The distributed PubSub layer that ships with Phoenix, handling both message broadcast and presence tracking across clustered Elixir nodes. If you're building real-time features on Phoenix — chat, live dashboards, multiplayer anything — this is the piece doing the work under the hood. Also usable standalone without full Phoenix.

1. Presence tracking via CRDT-based delta generation (`tracker/delta_generation.ex`, `tracker/state.ex`) — nodes sync presence state without a central coordinator, and conflicts resolve correctly under partition. 2. The sharding design in `tracker/shard.ex` means presence doesn't become a single-process bottleneck at scale. 3. PG2 adapter (`pubsub/pg2.ex`) uses Erlang's built-in process groups for cluster membership — no external broker like Redis required for distribution. 4. Test coverage is genuinely thorough, including clustered integration tests that spin up real BEAM nodes; the `test/support/cluster.ex` tooling is worth borrowing for your own distributed tests.

1. Completely Elixir/BEAM-specific — if you need to fan out to non-BEAM services (Node.js websocket servers, Python workers), you're adding a bridge yourself. 2. The README is four paragraphs; a new user who wants to understand the Tracker's consistency model or the sharding math has to read the source. 3. At 762 stars this is undersold for what it does, which also means sparse third-party tutorials; debugging a split-brain presence issue will leave you alone with the code. 4. No built-in persistence — broadcast to a topic with no current subscribers and the message is gone, which surprises people coming from Kafka or Redis Streams who expect durable delivery.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →