The “connectivity” service enables Ditto to establish and manage client-side connections to external service endpoints. You can communicate with your connected things/twins over those connections via Ditto Protocol messages. The connectivity service supports various transport protocols, which are bound to the Ditto Protocol via specific Protocol Bindings.
If you don’t have the option to transform your payload to a Ditto Protocol Message on the client-side, the connectivity service offers a flexible and customizable payload mapping on top.
Model
The model of the connectivity service is defined around the entity Connection
:
Signals
Other services can communicate with the connectivity service via:
- commands: containing commands and command responses which are processed by this service
- events: containing events which are emitted when entities managed by this service were modified
Persistence
The connectivity service uses Akka persistence and with that Event sourcing in order to persist changes to and restore persisted connections.
Tasks
- create/remove connections (by persisting them)
- connect/disconnect to endpoints
- restore existing connections upon restart/failover
- translate incoming Ditto Protocol messages to commands and translate command responses back to Ditto Protocol response messages
- map custom message protocols to the Ditto Protocol