Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

#IssueNotesDecision
1Do we need to update existing update notification to send delta notification or delta notification along with existing notification. 
29-Sep-2023: We decided to implement delta notification separately without changing the existing update notification. 
2Using Liquibase v. Yang Model for storing new metadata per anchor in CPS CoreNeeds discussions with architects
29-Sep-2023: We decided to use yang model to persisting delta notification subscription. No DB change is required. notification subscription information will be stored in Fragment table. 
3generic text field OK for future refinement, maybe consider json?
29-Sep-2023: subscription information will be persisted in JSON format 

Event Schema

proposal for notification schema:

...

 It is important to control the delta notification notifications for better performance. we need to decide on below options to control delta notification.

...

Pros:

  1. Dynamically control notification and per request level. 

Cons: 

  1. there could be issue with access control

...

Pros:

  1. Only allowed dataspace/anchor's delta update will be sent in notification

Cons:

  1. Not practical because we can't control the notification dynamically.  

Notifications in cps-core will be controlled at Anchor level. By default notifications will be disabled for all anchors. notification can be enabled/disabled for an anchor or all anchors of a dataspace using below REST API. 

API to

...

Pros: 

  1. control the notification dynamically.

Cons:

  1. Need to persist notification information in DB. 

...

controlling delta notification 

Delta notification can be enabled/disabled by an additional admin API for a given anchor name. By default, delta notification will be disabled for all dataspaces. New API will be added as below.list of anchors in a dataspace or all anchors in a dataspace. 

API :  PUT https://IP:PORT/cps/api/v2/dataspace/<dataspace-name>/deltanotification/<subscribe or unsubscribe>


Request Body :

["anchor01", "anchor02"]

Note: if no anchors list provided in request body than notification will be enabled/disabled for all the anchors for given dataspace. 

To Persist the information about delta notification there are two approached proposed as below for consideration. 

  1. Persist delta notification information in additional field of dataspace table.

Additional field will be added to Anchor table to persist delta notification subscription. newly added field details are as below.  

...

Persisting notification subscription 

2.  Add schema for notification subscription and add subscription information in to Fragment table when delta notification is subscribed. delete the fragment when delta notification is unsubscribed.

...