Skip to main content

Module factory

Module factory 

Source
Expand description

Room construction for rooms that are new to the runtime directory.

RoomManager owns idempotent lookup, directory publication and creation diagnostics. This module contains the cold-path allocation step used after lookup misses, before the new room is visible to other runtime entrypoints.

A factory-created room receives fresh process-local placement, the immutable runtime policy selected at boot and the shared runtime metrics catalog. It does not register the room or emit creation events.

Same-room worker placement is not decided here. The factory gives a room its stable instance id and primary router id, while RoomManager::join_user assigns workers from packet-loop heartbeat delays when sessions arrive.

Structsยง

RoomAdmissionPolicy
admission limits that stay fixed for one room lifetime
RoomConfig
external room config passed in from the http or runtime edge
RoomFactory ๐Ÿ”’
Cold-path constructor for rooms that are new to the directory.
RoomInit ๐Ÿ”’
RoomRuntimeAllocator ๐Ÿ”’
Monotonic placement counters assigned by the current process.
RoomRuntimePolicy
stable runtime policy bundle shared by the room and its state model