Type-Safe PubSub and Registry for Gleam Actors

2025-08-23
Type-Safe PubSub and Registry for Gleam Actors

Glyn is a library providing a type-safe PubSub and registry for Gleam actors, with support for distributed clustering. Built on the Erlang syn library, it offers two complementary actor communication systems: PubSub for broadcasting events and a registry for direct command routing. Glyn seamlessly integrates with Gleam's actor model using selector composition patterns. Explicit decoders are required for type safety when sending messages between nodes in a cluster. The code examples demonstrate defining message types, creating decoders, and using PubSub and the registry for actor communication. Multi-channel actor integration is also showcased, enabling more complex communication scenarios.

Development