1 active realtime session actor directory
forgejo-actions edited this page 2026-07-15 12:43:13 +00:00

Active Realtime Session Actor Directory

The active realtime session actor directory owns active session handles, typed mutation operations, indexes, queue depth, chat lookup, and zone membership.

How It Works

Active sessions are stored behind handles and mutated through ActiveRealtimeSessionOperation. Directory indexes track session token, character id, normalized name, and zone membership. Queue depth and capacity explain whether outbound commands can be accepted.

How To Use It

Use typed operations instead of direct mutable access. Use move_zone whenever a session changes zone so indexes stay consistent. Inspect admission, pending, and active counts separately when debugging capacity.

Invariants

Indexes must agree with handle state. Taking a handle removes it from active indexes. Failed apply_operation means the operation did not mutate session state. Queue capacity failures should be visible as operational pressure, not ignored.

Debugging

Invariant issues usually mean a session was mutated without the directory operation path. Queue depth spikes point to egress pressure. Chat lookup failures often mean normalized-name or active-session indexes drifted.

Examples

When a player transfers zones, call the directory move operation so token and character indexes keep pointing at the same handle while zone membership changes.