☎️ ERLANG HIVE DIFFICULTY: Adept Behavioral

The Observer of the Hive Switchboard

Gen_event streams for global awareness.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Observer
ARCANUM SCHOOL: Divination // Scrying
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// ERLANG PATTERN //
-module(the_observer).
-export([notify/2, listen/1]).

notify(EventMgr, Event) -> EventMgr ! {event, Event}.

listen(EventMgr) ->
    EventMgr ! {add_handler, self()}.

The Observer

By registering our pids with a central event manager, we tap directly into the psychic leylines and listen to the pulse of the cluster.

Runic Tags: #erlang #actors #telepathy #switchboard #observer