-
Notifications
You must be signed in to change notification settings - Fork 1
Add S3I Event System #9
Comments
short summary of the current draft: S3I Event System ConceptThere are two different types of events, All event messages are routed via a RabbitMQ Topic Exchange named Named EventsAll A Example for {
"ownedBy": "USER_UUID",
"name": "Awesom Thing Name",
"type": "component",
"allEndpoints": [
"ENDPOINT_ID"
],
"events": {
"newMeasurement": {
"description": "Contains the latest measurement including computed displacement",
"schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "newMeasurement",
"description": "JSON Schema for content field of this EventMessage",
"properties": {
"force": {
"type": "number"
},
"displacement": {
"type": "array",
"items": {
"type": "number"
}
}
}
}
}
}
} Sequence: Receive Named Event Messages
Custom EventsA The request contains a The topic of a The event is emitted from the moment when Subscription Request example: {
"identifier": "s3i:UUIDv4",
"sender": "THING_ID",
"messageType": "customEventRequest",
"filter": "le(attributes/features/ml40::Force/force, 0)",
"attributePaths": [
"attributes/features/ml40::Force/force"
]
} Subscription Response example: {
"identifier": "s3i:UUIDv4",
"sender": "THING_ID",
"messageType": "customEventReply",
"topic": "THING_ID.eventTopic",
"ok": true,
} Sequence: Receive Custom Event Messages
Event MessageThe event messages are equal for both types of events. An event message is a subclass of the
{
"identifier": "s3i:UUIDv4",
"sender": "THING_ID",
"messageType": "eventMessage",
"topic": "THING_ID.eventTopic",
"timestamp": 10000, //millisecondsSinceEpocInt
"content": {
//EVENT_CONTENT
}
} |
The S3I Event System is an important feature of the S3I. It enables things/services to "observe" another thing without the cloud storage (ditto) and allows customized event messages which are not directly related to a specific value (like an emergency) and could store customized values.
The text was updated successfully, but these errors were encountered: