Hasty Briefsbeta

Glyn: Type-safe PubSub and Registry for Gleam actors with distributed clustering

2 days ago
  • #Distributed Systems
  • #Gleam
  • #Actor Model
  • Glyn provides type-safe PubSub and Registry for Gleam actors with distributed clustering support.
  • Built on the Erlang syn library.
  • PubSub enables broadcasting events to multiple subscribers.
  • Registry allows direct command routing to named processes.
  • Integration with Gleam's actor model using selector composition patterns.
  • Requires explicit decoders for message types to ensure type safety in distributed environments.
  • Messages are sent as Erlang terms, not JSON encoded.
  • Example includes defining message types (Event and Command) and corresponding decoders.
  • Demonstrates PubSub usage with event publishing and subscription.
  • Shows Registry usage for registering processes and sending commands.
  • Illustrates composing multiple message channels in a single actor for powerful message handling.
  • Includes example of handling different message types (commands, events, direct messages) in an actor.
  • Project is licensed under the MIT License.