Member Junction
    Preparing search index...

    The identity of the server instance that hosts this engine, and of its current boot. The engine stamps IHostInstanceIdentity.GetHostInstanceID into the HostInstanceID of every MJ: AI Agent Session Bridges row it creates, and its orphan reconcile (AIBridgeEngine.ReconcileOrphans) closes the rows that IHostInstanceIdentity.IsPriorBoot says an earlier boot of this instance left.

    An instance must be something only one live process can be at a time, so that a row stamped by another boot of it was left by a process that has ended. MJServer's instance is a host and the port it serves on; it injects the identity its MJ: AI Agent Sessions rows carry (hostname:port:pid:bootId). The identity is injected (AIBridgeEngine.SetHostInstanceIdentity) so this server-tier engine has no dependency on MJServer (a layering inversion) and tests can supply a fixed one; a DefaultHostInstanceIdentity applies until then.

    /plans/realtime/realtime-bridges-architecture.md §10 (host affinity + janitor).

    interface IHostInstanceIdentity {
        GetHostInstanceID(): string;
        GetInstancePrefix(): string;
        IsPriorBoot(hostInstanceID: string): boolean;
    }

    Implemented by

    Index

    Methods

    • Whether a HostInstanceID was stamped by another boot of this instance, a process that has ended. False for this boot's id, for any other instance's, and for null. The reconcile closes a row only when this is true, so the check must be exact: a SQL LIKE reads a _ in a host name as any character.

      Parameters

      • hostInstanceID: string

        A bridge row's HostInstanceID.

      Returns boolean