Adapter Architecture
How Demiton interacts with external systems through adapters.
Adapters provide the integration boundary between the Demiton platform and external systems.
All communication with external systems occurs through adapters.
This ensures that:
• system interaction is consistent
• API complexity is isolated
• runtime behavior remains deterministic
Adapter Responsibilities
Adapters perform several responsibilities.
Authentication
Adapters manage authentication with external systems.
Examples include:
• OAuth 2.0 tokens
• API keys
• service account credentials
Protocol Handling
Adapters interact with system protocols such as:
• REST APIs
• OData APIs
• SQL connections
• SFTP endpoints
Protocol logic is isolated from the workflow runtime.
Response Normalization
External systems return data in different formats.
Adapters normalize these responses into a standard structure.
Each adapter response returns a Sovereign Envelope.
Envelope structure:
records
metrics
trace
narrative
metadata
schema_v
This ensures consistent behavior across workflows.
Adapter Factory
Adapters are instantiated using the Adapter Factory.
Example:
get_adapter(connection_type, credentials, system_type, environment)
The factory resolves the correct adapter implementation.
Resolution priority:
- system_type
- connection_type
- deterministic failure
Adapters must never be instantiated directly.
Adapter Design Rules
Adapters follow several design constraints.
Adapters must:
• remain stateless
• return a standardized envelope
• avoid writing to platform databases
Adapters must not:
• execute workflow logic
• mutate runtime state
• store sensitive data
These rules maintain separation between integration and execution layers.
Adapter Discovery
Adapters expose available datasets through a discovery process.
Discovery returns resource descriptors including:
• dataset name
• supported capabilities
• parameters
• field schema
These resources are stored in the platform resource registry.
Adapter Security
Adapters must follow strict security practices.
Examples include:
• secure credential storage
• TLS communication
• controlled authentication flows
Credentials must never appear in logs.
This ensures safe interaction with external systems.
---