Liking cljdoc? Tell your friends :D

wagoe.realtime.shell.service

Realtime service implementation (Shell layer).

Orchestrates WebSocket messaging between core logic and adapters. Implements the imperative shell in the FC/IS architecture pattern.

Responsibilities (Shell/I/O):

  • WebSocket connection lifecycle (open, close)
  • JWT authentication (delegates to user module)
  • Message routing (publishes envelopes onto the message bus)
  • Connection registry management
  • Pub/sub topic management
  • Logging and error handling

Does NOT contain:

  • Business logic (lives in core.*)
  • Database operations (no persistence needed for WebSockets)
  • Message validation logic (lives in core.message)
Realtime service implementation (Shell layer).

Orchestrates WebSocket messaging between core logic and adapters.
Implements the imperative shell in the FC/IS architecture pattern.

Responsibilities (Shell/I/O):
- WebSocket connection lifecycle (open, close)
- JWT authentication (delegates to user module)
- Message routing (publishes envelopes onto the message bus)
- Connection registry management
- Pub/sub topic management
- Logging and error handling

Does NOT contain:
- Business logic (lives in core.*)
- Database operations (no persistence needed for WebSockets)
- Message validation logic (lives in core.message)
raw docstring

create-realtime-serviceclj

(create-realtime-service connection-registry
                         jwt-verifier
                         &
                         {:keys [pubsub-manager logger error-reporter bus]})

Create realtime service for WebSocket messaging.

Options: :pubsub-manager IPubSubManager (optional, for topic support) :logger logger instance (optional) :error-reporter error reporter (optional) :bus IMessageBus (optional; defaults to a fresh InMemoryMessageBus for single-node use)

On construction the service registers a node-local delivery-fn with the bus (start-subscriber!). Pass a shared bus to two services to relay between them.

Create realtime service for WebSocket messaging.

Options:
  :pubsub-manager  IPubSubManager (optional, for topic support)
  :logger          logger instance (optional)
  :error-reporter  error reporter (optional)
  :bus             IMessageBus (optional; defaults to a fresh
                   InMemoryMessageBus for single-node use)

On construction the service registers a node-local delivery-fn with the bus
(start-subscriber!). Pass a shared bus to two services to relay between them.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close