...
Table of Contents | ||||
---|---|---|---|---|
|
General requirements on PDP - implement the pub-sub for multiple policies per each component
- maintain the database of subscribers with the
- list of generic policy-filters (each policy-filter is the resource from the request json to /decision/v1 API) Policy Design and API Flow for Model Driven Control Loop
- subscriber_topic for Message Router of DMaaP that uniquely identifies the component instance like “policies_DCAE_tca_<service-component-name>”
- <service-component-name> uniquely identifies the component in DCAE
- if policy-update/add/remove matches any of the policy-filters, PDP would push the policy-update notification that contains the whole policy-body of each added/updated policy and policy-id of each removed policy to Message Router of DMaaP on policy -update/add/remove, the PDP would iterate through the subscribers and do its matching to any of the policy-filters on each subscriber the same way as /decision/v1 does
push/delete from PAP- select all subscribers that match to the pushed/deleted policies by any policy-filter
- for each affected subscriber retrieve all the latest snapshot of policies
- notify each subscriber_topic separately with the latest snapshot of policies by sending the message to Message Router of DMaaP with the topic=subscriber_topic
- there might be a need for some logic to identify the stale subscriptions by checking with the Message Router of DMaaP on the timestamps of the latest delivered/undelivered message per ach topic PDP has the subscription onMessage Router of DMaaP will do the following
- persistently (up to 7 days) deliver all the policy-update notifications per subscriber_topic component will listen for the subscriber_topic of the topic PDP has the subscription on
...
General requirements on Message Router of DMaaP
- persistently (up to 7 days) deliver all the policy-update notifications per subscriber_topic
- component will listen for the subscriber_topic of the policy-update notification from MR of DMaaP with long-collect-polling time like 15 seconds to grab the push notification
...
Requirements on component
Less requirements on component - policy-handler to do the subscription with PDP for the component
- on startup – subscribe to PDP with the policy-filter the component is interested in and the subscriber_topic=“policies_DCAE_tca_<service-component-name>” that that uniquely identifies the component instance
- listen for subscriber_topic of policy-update notification from MR of DMaaP with long-collect-polling time like 15 seconds to grab the push notification
Component instance would do the following- on receiving the policy-update pushed notification from DMaaP, handle the policy-update that contains the whole policy-body of each added/updated policy and policy-id of each removed policy
- on stop, unsubscribe subscriber_topic from PDP
...
More requirements on component (initial proposal)
- on startup – subscribe to PDP with the policy-filter the component is interested in and the subscriber_topic=“policies_DCAE_tca_<service-component-name>” that that uniquely identifies the component instance
- listen for subscriber_topic of policy-update notification from MR of DMaaP with long-collect-polling time like 15 seconds to grab the push notification
- on receiving the policy-update pushed notification from DMaaP, handle the policy-update that contains the whole policy-body of each added/updated policy and policy-id of each removed policy
- on stop, unsubscribe subscriber_topic from PDP
See inside the diagram for more details, data structures, and flow steps
...