Table of Contents |
---|
...
# | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
1 | id | UUID of the event | |||||||||
2 | source | urn:cps:org.onap.cps | |||||||||
3 | schema | urn:cps:org.onap.cps:data-updated-event-schema:v1 | |||||||||
4 | type | org.onap.cps.data-updated-delta-event | |||||||||
5 | content | { "operation": "UPDATE",
} |
...
It is important to control the delta notification for better performance. we need to decide on below options to control delta notification.
Option | Pros and Cons | Decision |
---|---|---|
Send delta notification for the update operation when update request contains optional query parameter to receive notification. | Pros:
Cons:
| |
Configure dataspace/anchor in yaml file to allow delta notification. | Pros:
Cons:
| |
while creating dataspace/anchor, configure to send delta notification. | Pros:
Cons:
| We decided to try this approach. detailed implementation provided below. |
Implementation of controlling delta notification
...
delta notification can be disabled for an anchor in anchor update API.
additional header in create/update anchor request
Parameter | Description |
---|---|
Set-Detla-Notification | true/false. |
Additional table to persist delta notification
Table Name: AnchorForDeltaNotification
Field | type |
---|---|
Anchor Id | Integer |
Implementation details
- For data nodes update operation, generate delta report by comparing previous and current configuration after successful update.
- Process data update delta event and send notification as described in event schema above.