Normandy.Behaviours.SessionStore.ETS (normandy v1.0.0)

View Source

ETS-backed SessionStore — fast, in-node. A GenServer owns a private ETS table and serializes every mutation through its mailbox, so concurrent appends/forks to the same session_id cannot clobber each other (the read-modify-write of a session's %AgentMemory{} is exclusive). The handle is the owner pid.

Each session's AgentMemory is stored under {:session, session_id} and its opaque turn state under {:turn_state, session_id}. The table is private to the owner; start one store per logical session space. Not yet consumed by the turn loop (Phase 4 wires it as the writer).

Summary

Functions

Returns a specification to start this module under a supervisor.

Start a fresh ETS-backed store; returns its handle (the owner pid).

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

new(opts \\ [])

@spec new(keyword()) :: pid()

Start a fresh ETS-backed store; returns its handle (the owner pid).

start_link(opts \\ [])

@spec start_link(keyword()) :: GenServer.on_start()