Why CloudEvents?
A message needs an identity, a source, a type, and data. DASP uses an existing standard for those parts.
CloudEvents is an open, widely used specification for event messages. It is a CNCF graduated project, with SDKs across languages. Systems such as Azure Event Grid, Amazon EventBridge, and Knative support it.
A common envelope
The envelope is the set of fields around the message data. Common fields let tools identify, route, and inspect events across systems. DASP can use that tooling without inventing another envelope.
CloudEvents does not require a cloud service. DASP clients and hosts can run locally.
Read one message
This example asks a counter to add 3. Select the field groups to see which layer defines each part.
Standard attributes identify the event and describe its data. The type value is chosen by DASP.
CloudEvents : what is this message format?
CloudEvents is an open, widely used standard for event messages. DASP uses its common envelope for event identity, source, type, and data. DASP adds the session and recovery rules.
Why DASP uses CloudEvents →{"specversion": "1.0","id": "trace-command","source": "urn:example:client:one","type": "dasp.v1.command","datacontenttype": "application/json","data": {
"session_id": "session-counter",
"command_id": "command-add-1",
"name": "counter.add",
"input": {
"amount": 3
}
},"requestid": "request-add"}| Layer | Responsibility |
|---|---|
| CloudEvents | Event identity, producer context, type, and data format |
| DASP | Session, command identity, admission, outcome, and recovery |
| Application profile | Command names, inputs, outputs, and completion rules |
specversion: "1.0" is the CloudEvents version. The v1 in dasp.v1.command is the DASP event-type version. They are separate.
What the envelope does not promise
A valid CloudEvent does not prove that a command was accepted or completed. It does not save history or make retries safe. Those are DASP behavior requirements.
DASP also limits the values and shapes it accepts. A general CloudEvents library can help handle the envelope; it cannot replace DASP validation.
See the CloudEvents envelope rules for exact requirements, or follow a command to see the envelope in use.