Versions Compared

Key

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

...


Error Scenario

Expected behavior

Sign-off

1Non responding DMIs (configurable timeout)An error message listing the 'pending' CM Handle IDs and statusMessage as "partially applied subscription" with relevant statuscode.
2Non Existing or non-valid CM Handle IdsAn error message listing the 'rejected' CM Handle IDs 
3DMI Plugin without CM Event subscription supportAn error message listing the 'rejected' CM Handle IDs 
4Late Response (after timeout defined in #1) from DMIA message contain the status message as "fully applied subscription" with relevant status code.
5Create for existing subscription id

6delete for non-existing cm handle id(silently?) ignore
7delete for non-existing subscription id

8Error upon error

An error scenario on a second subscription for the same cm-handle/xpath as a previous subscription which did not complete successfully (yet)

to be discussed, see Error Upon Error Combinations


Characteristics

Maximum, Average subscription Maximum, Average XPaths per CmHandle limitkieran mccarthy order of 30

Parameter

Expectation

Notes

Sign-off

1Frequency of LCM EventsNo high volume of such events is expected
For testing purposed 1 LCM event per minute would suffice
Maximum number of cm data subscriptions


2Number of SubscriptionsMax: 200

kieran mccarthy confirmed

3
CM Handles per
Subscription

Avg: 200

Max: 500 (document only)

kieran mccarthy to confirm
Note: consider limit and future 'simple' ALL (wildcard) option when above that limit

4Xpaths per Cm HandleAvg: 10

5Status update processing time
Based on the numbers above working out the current state of each cm handle/xpath combination could be slow!
(Order of 30) seconds (NCMP side)

Parameter

Expectation

Notes

Sign-off

1Frequency of LCM EventsNo high volume of such events is expected
For testing purposed 1 LCM event per minute would suffice
2Number of SubscriptionsMax: 200

kieran mccarthy confirmed

3CM Handles per Subscription

Avg: 200

Max: 500 (document only)

kieran mccarthy to confirm
Note: consider limit and future 'simple' ALL (wildcard) option when above that limit

4Xpaths per Cm HandleAvg: 10

5Status update processing time(Order of 30) seconds (NCMP side)

Out-of-scope

...

Out-of-scope

  1. Subscription Update scenarios for an ongoing subscription.
  2. CM Notification Forwarding Check: When forwarding CM Notification NCMP will not check the content to see if the is a valid active subscription. It is assumed that the DMI Plugin as acted on the 'delete subscription' request (that request is NCMPs responsibility). And of course there wil be timing issues it also possible a CM Notification was send just after the subscription-delete was send (from client) but before the whole change had acted upon that. 
  3. Retry: NCMP will only report when actions are pending or rejected. NCMP will not implement a retry mechanism
  4. Wildcards: Wildcards or similar functionality where one string represent 0 or more xpaths is not covered as part of this requirement but it should be kept in mind as a future possibility
  5. Dynamic Topic: Topic for CM Data Notifications back to client will be hardcode for now. 
    Study should consider compatibility with an 'ALL' cm handles options

...

  • DMI record could reach in millions of instances
  • In memory solution (ie hazelcast) can handle 10s - 100s of Megabytes (add some sample calc)
    • still need persistence if we don't have enough instances
  • use many small messages reduce need for amalgamation
  • amalgamated string-based solution.... 

...

Storage & Merging

Storage

  • We have the below configuration managed by CPS-NCMP

    #cmhandledmi-plugin
    1ch-1dmi-1
    2ch-2dmi-1
    3ch-3dmi-2
    4ch-4dmi-2
    5ch-5non-responding-dmi


  1. We get a Subscription Create Request with unique subscription-id and a list of predicates(list of targets , datastore and list of filters)

    Code Block
    titleSubscription Create Request
  2. We persist the incoming request as is in our persistent store using a relevant subscription model ( this model also needs to be revised )
  3. We also maintain a distributed datastructure in Hazelcast to keep track of the request and response to the client.
    SubscriptionIddmi-pluginaffectedCmHandlesstatusA-10dmi-1["ch-1","ch-2"]PENDINGA-10dmi-2["ch-3"]PENDING
  4. Read the requests from the distributed data structure and form the request for the DMI-Plugin and publish it to the internal kafka channel.
  5. If the DMI-Plugin responds back within the configured time , so the request will either be ACCEPTED or REJECTED.
  6. if whole subscription request is ACCEPTED , update the distributed data structure and then store the subscription to the ActiveSubscriptions in cps-cache.
  7. if whole subscription request is REJECTED , update the distributed data structure and send back the response to the client.
  8. if the DMI Plugin fails to respond then the status would remain PENDING only as there is no change.
    SubscriptionIddmi-pluginaffectedCmHandlesstatusA-10dmi-1["ch-1","ch-2"]ACCEPTEDA-10dmi-2["ch-3"]REJECTEDWe store the "ActiveSubscriptions" using a new model which will look like below.
    SubscriptionIdcmHandlefilterdatastoreA-10ch-1p1/c1ncmp-datastore:passthrough-operationalA-10ch-1p2/c2ncmp-datastore:passthrough-operationalA-10ch-2p1/c1ncmp-datastore:passthrough-operationalA-10ch-2p2/c2ncmp-datastore:passthrough-operationalNow based on whatever we have in the distributed map , we will send the response to the clients and may be clear the in-memory structure if required.

Merging ( in-progress )

  1. We get a new subscription create request.
    code
    Message
    collapsetrue
    {
    "subscriptionId" : "A-10",
    "predicates" : [
      {
        "targets": [ch-1,ch-2],
        "datastore" : "ncmp-datastore:passthrough-operational",
        "datastore-xpath-filter" : ["p1/c1","p2/c2"]
        },
      { "targets": [ch-3],
        "datastore" : "ncmp-datastore:passthrough-operational",
        "datastore-xpath-filter" : ["p3/c3"]
        }
    ]
     
    }


  2. We persist the incoming request as is in our persistent store using a relevant subscription model ( this model also needs to be revised )
  3. We also maintain a distributed datastructure in Hazelcast to keep track of the request and response to the client.

    SubscriptionIddmi-pluginaffectedCmHandlesstatus
    A-10dmi-1["ch-1","ch-2"]PENDING
    A-10dmi-2["ch-3"]PENDING



  4. Read the requests from the distributed data structure and form the request for the DMI-Plugin and publish it to the internal kafka channel.
  5. If the DMI-Plugin responds back within the configured time , so the request will either be ACCEPTED or REJECTED.
    1. if whole subscription request is ACCEPTED , update the distributed data structure and then store the subscription to the ActiveSubscriptions in cps-cache.
    2. if whole subscription request is REJECTED , update the distributed data structure and send back the response to the client.
    3. if the DMI Plugin fails to respond then the status would remain PENDING only as there is no change.


      SubscriptionIddmi-pluginaffectedCmHandlesstatus
      A-10dmi-1["ch-1","ch-2"]ACCEPTED
      A-10dmi-2["ch-3"]REJECTED



  6. We store the "ActiveSubscriptions" using a new model which will look like below.

    SubscriptionIdcmHandlefilterdatastore
    A-10ch-1p1/c1ncmp-datastore:passthrough-operational
    A-10ch-1p2/c2ncmp-datastore:passthrough-operational
    A-10ch-2p1/c1ncmp-datastore:passthrough-operational
    A-10ch-2p2/c2ncmp-datastore:passthrough-operational



  7. Now based on whatever we have in the distributed map , we will send the response to the clients and may be clear the in-memory structure if required.

Merging ( in-progress )


  1. We get a new subscription create request.

    Code Block
    languagexml
    title2nd Subscription Create Message
    collapsetrue
    {
    "subscriptionId" : "B-52",
    "predicates" : [
      {
        "targets": [ch-2],
        "datastore" : "ncmp-datastore:passthrough-operational",
        "datastore-xpath-filter" : ["p2/c2" , "p3/c3"]
        }
    ]
    }


  2. We now look at the "ActiveSubscriptions"  if we already have an active subscription either for a combination of "cmhandle and xpath filter and the datastore".

    Current view of ActiveSubscriptions

    SubscriptionIdcmHandlefilterdatastore
    A-10ch-1p1/c1ncmp-datastore:passthrough-operational
    A-10ch-1p2/c2ncmp-datastore:passthrough-operational
    A-10ch-2p1/c1ncmp-datastore:passthrough-operational
    A-10ch-2p2/c2ncmp-datastore:passthrough-operational


    Check if we have ch-2 , p2/c2 and ncmp-datastore:passthrough-operational then directly add to the ActiveSubscription.Similarly check for ch-3 , p3/c3 and ncmp-datastore:passthrough-operational ( which in this case will not be directly to the active subscription)

  3. Now the state of ActiveSubscription is :

    SubscriptionIdcmHandlefilterdatastore
    A-10ch-1p1/c1ncmp-datastore:passthrough-operational
    A-10ch-1p2/c2ncmp-datastore:passthrough-operational
    A-10ch-2p1/c1ncmp-datastore:passthrough-operational
    A-10ch-2p2/c2ncmp-datastore:passthrough-operational
    B-52ch-2p2/c2ncmp-datastore:passthrough-operational


    and state of the in-memory datastructure data structure is as follows.

    SubscriptionIddmi-pluginaffectedCmHandlesstatus
    B-52dmi-1["ch-2"]PENDING



  4. Now we send the request to DMI plugin (dmi-1) with just the private properties of the ch-2 with the delta xpath.
    1. DMI Plugin could either apply the whole subscription request or reject the whole subscription. i.e respond with accepted/rejected
  5. Based on the response from DMI plugin the in-memory structure is updated and response is sent back to the clients.

    if DMI says it is accepted then : 

    SubscriptionIddmi-pluginaffectedCmHandlesstatus
    B-52dmi-1["ch-2"]ACCEPTED


    if DMI says it is rejected then : 

    SubscriptionIddmi-pluginaffectedCmHandlesstatus
    B-52dmi-1["ch-2"]REJECTED


    if we get no response within the configured time then :


    SubscriptionIddmi-pluginaffectedCmHandlesstatus
    B-52dmi-1["ch-2"]PENDING


    But we still send some response within the pre-configured time.

  6. if the above request was accepted then we should add it to the list of "ActiveSubscriptions" as well.

    SubscriptionIdcmHandlefilterdatastore
    A-10ch-1p1/c1ncmp-datastore:passthrough-operational
    A-10ch-1p2/c2ncmp-datastore:passthrough-operational
    A-10ch-2p1/c1ncmp-datastore:passthrough-operational
    A-10ch-2p2/c2ncmp-datastore:passthrough-operational
    B-52ch-2p2/c2ncmp-datastore:passthrough-operational
    B-52ch-2p3/c3ncmp-datastore:passthrough-operational


  7. If the status was accepted/rejected then after sending the response to the client we can clear the in-memory structure for subscriptionId B-52.

...