4 ArchitectureAuxiliary
Ralph Schaer edited this page 2026-10-30 16:08:52 +01:00

Auxiliary Architecture

This diagram shows the supporting components around transport handling and session management.

Important responsibilities in this area include:

  • decoding WAMP frames from the negotiated serializer
  • accepting HELLO without realm-based routing or realm metadata in established sessions
  • negotiating authentication challenges and AUTHENTICATE handling
  • assigning and tracking WAMP session identifiers
  • attaching the effective principal, auth metadata, transport/session identifiers, and peer roles to messages
  • publishing lifecycle events such as session establishment and disconnect

These auxiliary pieces are shared by the higher-level broker and dealer pipelines.

sequenceDiagram
    participant C as Client
    participant T as Transport session handling
    participant A as WampAuthenticationProvider
    participant E as Spring application events
    C->>T: HELLO with roles and optional auth methods
    alt Requested authentication method supported
        T->>A: challenge(HELLO)
        T->>C: CHALLENGE
        C->>T: AUTHENTICATE
        T->>A: authenticate with saved challenge state
    else No authentication methods requested
        T->>T: Use transport principal or anonymous identity
    end
    T->>E: WampSessionEstablishedEvent
    T->>C: WELCOME with session ID and router features
    C->>T: Application messages
    T->>T: Attach metadata and send to inbound channel
    C->>T: Disconnect
    T->>E: WampDisconnectEvent

This diagram shows successful establishment. Unsupported requested methods or failed verification produce ABORT; invalid session sequencing produces a protocol error. Servlet WebSocket and long-poll adapters delegate to WampSessionSupport; the reactive WampWebSocketHandler owns its session flow. Disconnect events drive registry cleanup, session meta events, and testament publication.

See Authentication, Transports, and Events for the public extension points and transport-specific behavior.