4. Core Components
Each core Mobius HTTP Gateway component mirrors fundamental HTTP concepts: domain separation, service identification, resource mapping, and independent transaction handling.
4.1 HttpDestination
Represents a logical routing domain, analogous to a "namespace" or a grouping of services. Groups Servers and Links under a single operational entity.
Fields:
- destinationID (ObjectId) — Unique identifier
- destinationName (String) — Human-readable name
- isEnabled (Boolean) — Whether this Destination is active
4.2 HttpServer
Represents a service endpoint associated with a Destination. Binds incoming Links to a service name that maps to application logic.
Fields:
- serverID (ObjectId)
- destinationID (ObjectId)
- name (String) — Display name
- serviceName (String) — Critical field used for callback lookup at runtime
- isEnabled (Boolean)
Important: The serviceName acts as the dynamic routing key, allowing multiple logical services per Destination.
4.3 HttpLink
Defines an individual HTTP connection mapping. Specifies URL, method, host, and other HTTP parameters to match incoming requests.
Fields:
- linkID, destinationID, serverID
- url, method, remoteHost, remotePort, localHost, localPort
- isServer (Boolean) — Indicates if Link is for inbound traffic
- isTls (Boolean)
- isEnabled (Boolean)
- mimeType, xmlRootName — Content-type handling
- httpRequestExpiryTimeout, maxChannels — Traffic control and expiration
- Inbound (isServer = true) Links are matched by the WrappedServlet against incoming requests.
4.4 HttpCallbackInterface
Represents developer-supplied logic for handling a request routed by serviceName. Provides dynamic service logic for processing incoming HTTP payloads.
Key method:
- onMessage(...) handles parsing, validation, and business logic execution.
Each Callback is bound to a (destinationID, serviceName) pair, ensuring fine-grained dynamic routing.
4.5 HttpConfiguration
Represents optional global HTTP settings. Configure network-level parameters and secure transport settings.
Fields:
- Default max concurrent channels
- Default request expiry timeout
- TLS certificate, chain, and private key configuration
- Keep-alive behavior settings
These settings allow tuning HTTP server behavior for different deployment and security needs.
4.6 HttpServerData
Represents the runtime memory structure. Caches and accelerates routing and dispatch.
Contains:
- activeLinks (Map of linkID → HttpLink)
- serversMap (Map of serverID → HttpServer)
- registeredCallbacks (Map of (destinationID, serviceName) → HttpCallbackInterface)
- undertow (running Undertow instance)
Note: All lookups during request processing happen within HttpServerData — database reads are avoided in the critical request path.
Start innovating with Mobius
What's next? Let's talk!