Objective
As of current implementation in cps core, after the update operation, entire configuration is sent as Kafka Notification. we are proposing to send only changed configuration as delta report in notification. It will help to understand what configuration exactly changed for the anchor.
Issues & Decisions
# | Issue | Notes | Decision |
---|---|---|---|
1 | Do we need to update existing update notification to send delta notification or delta notification along with existing notification. | ||
Event Schema
For delta notification we can use the existing cps data update event schema (cps-data-update-event-schema.json).
# | ||
---|---|---|
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", } |
Controlling Notification
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:
|
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.