You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 25 Next »


References

// put in related JIRA tickets and the reference here.

Assumptions

#

Issue

Notes

Decisions

1





Issues & Decisions

#

Issue

Notes

Decisions

1

Schema of the outcome response message (Schema 5)

Open Questions:

  1. What headers do we need?
  2. Do we need all Accepted, Rejected, Pending targets?

Overview

// End to end solution in plaintext can be put in here.

  1. NCMP will receive the Subscription Request from EDM in the form of an Event.
  2. NCMP will be responsible for the below operations. ( Consumer Code for EDM Event )
    1. Since NCMP already knows the structure of the incoming subscription request it will map the incoming request to java object.
    2. Persist the request in the subscription-registry model which we already introduced.
  3. NCMP ( Producer Code and Record the published time ) 
    1. Enrich the request with the additional properties and a proper dmiRequestId ( subscriptionId+subscriptionName+dmiServiceName)
    2. Save the dmiRequestId in the distributed map along with the current-time. ( we can call it published time ) . This will be useful at a later point in time.
    3. Now forward the subscription request to the dmi-plugins based on the incoming target cmHandles we have. ( Since we have the information that which dmi-plugin is responsible for which cmHandle , we can figure this out ).
      1. At this level we could have forwarded the event to multiple dedicated topics.
  4. DMI-Plugin
    1. It will have a consumer code to listen from a particular topic.
    2. It will translate the event so that it is able to extract the important information from the event.
    3. DMI-Plugin is responsible to talk to the underlying Nodes it is managing inorder to register the subscription ( i.e provide the predicate information )  NOTE : We will skip this part in the onap-dmi-plugin implementation.
    4. DMI-Plugin will respond back with the response as accepted / rejected. We will have a response format which will be discussed in the dedicated place.
  5. NCMP ( Consumer for DMI-Plugin Response ) 
    1. We should continuously be checking if the published time has elapsed for that subscription response and we don't have to wait before sending the response back to the consumer. ( possibly we can discuss a solution using Hzaelcast TTL feature ) 
    2.  The incoming message will have the dmiRequestId which we can match in the map and check if the timer condition is satisfied ( i.e if the message arrives before the configured time and there are other pending requests , then we wait)
      1. if we contact multiple dmi plugins and all respond back within time then we collect the response from all of them and send a collective response and we dont have to wait for pre-configured time.
      2. if we contact multiple dmi plugins and none of them respond back within time then we respond as and when we recieve the response from them. 
      3. if we contact multiple dmi plugins and some of them respond back then we wait for preconfigured time and collect the response. We respond back with what we have till the cutoff time and then later when we receive the events we will send them through.

Subscription Architecture Diagram

EDM to NCMP

Subscription Create Event (Schema 1)

Subscription Create Event (Schema 1)
{
  "version": "1.0",
  "eventType": "subscriptionCreated",
  "event": {
    "subscription": {
      "clientID": "SCO-9989752",
      "name": "cm-subscription-001"
    },
    "dataType": {
      "dataspace": "ALL",
      "dataCategory": "CM",
      "dataProvider": "CM-SERVICE"
      "schemaName": "org.onap.ncmp:cm-network-avc-event.rfc8641"
      "schemaVersion": "1.0"
    },
    "predicates": {
                   “targets” :  [“cmHandle1”, “cmHandle2”, “cmHandle3”]     #  cmhandle targets
        "datastore": “passthrough-operational",
        "datastore-xpath-filter": "//_3gpp-nr-nrm-gnbdufunction:GNBDUFunction/ 
             _3gpp-nr-nrm-nrcelldu:NRCellDU/ | //_3gpp-nr-nrm-gnbcuupfunction:GNBCUUPFunction// |
            //_3gpp-nr-nrm-gnbcucpfunction:GNBCUCPFunction/_3gpp-nr-nrm-nrcelldu:NRCellCU// |
            //_3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier//”  
 
    }
}


NCMP to DMI-Plugins

Luke Gleeson 

Persisted Subscription Information (Schema 2)
{
	"clientID": "SCO-9989752",
    "subscriptionName": "cm-subscription-001"
	"isTagged" : "true" #optional
	"predicates": {
		"targetCmHandles":[
			{"cmHandleId":"cmHandle1", "status":"pending"},
			{"cmHandleId":"cmHandle2", "status":"pending"},
			{"cmHandleId":"cmHandle3", "status":"pending"}
		]
		"datastore":"passthrough-operational"
	}
	
}




// Show input and output schema

// Any logic if we want to discuss and make decision

DMI-Plugins to NCMP

Halil Cakal 

Input Schema (Schema 3) - Consumed
{
   "version":"1.0",
   "eventType":"CREATE",
   "event":{
      "subscription":{
         "clientID":"SCO-9989752",
         "name":"cm-subscription-001",
         "isTagged":false
      },
      "dataType":{
         "dataspace":"ALL",
         "dataCategory":"CM",
         "dataProvider":"CM-SERVICE",
         "schemaName":"org.onap.ncmp:cm-network-avc-event.rfc8641",
         "schemaVersion":"1.0"
      },
      "predicates":{
         "targets":[             
			{"cmHandle1": ["shape":"circle"]},
			{"cmHandle2": ["shape":"square"]},
			{"cmHandle3": ["shape":"traingle"]}          
		],
         "datastore":"passthrough-running",
         "xpath-filter":"//_3gpp-nr-nrm-gnbdufunction:GNBDUFunction/_3gpp-nr-nrm-nrcelldu:NRCellDU/ | //_3gpp-nr-nrm-gnbcuupfunction:GNBCUUPFunction// | //_3gpp-nr-nrm-gnbcucpfunction:GNBCUCPFunction/_3gpp-nr-nrm-nrcelldu:NRCellCU// | //_3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier//"
      }
   }
}




Output Schema (Schema 4) - Produced
{
   "clientId":"SCO-9989752",
   "subscriptionName":"cm-subscription-001",
   "dmiName":"ncmp-dmi-plugin",
   "cmHandleIdToStatus":{
      "CmHandle1":"ACCEPTED",
      "CmHandle2":"REJECTED"
   }
}


Notes

  1. dmiName in Output Schema is populated from application.yml of DMI-plugin.
  2. DMI-plugin subscribes to the topic to consume Input Schema given in application.yml of DMI-plugin.


application.yml of DMI-Plugin
	dmi:
		service:
			name: ${DMI_SERVICE_NAME:ncmp-dmi-plugin}
	app:
		dmi:
			avc:
				subscription-topic: ${DMI_CM_AVC_SUBSCRIPTION:ncmp-dmi-cm-avc-subscription-${dmi.service.name}}


NCMP to Client-Apps

Proposed outcome (Schema 5)

{
  "version": "1.0",
  "eventType": "subscriptionCreatedOutcome", # or subscriptionCreatedPartialOutcome
  "event": {
    "subscription": {
      "clientID": "SCO-9989752",
      "name": "cm-subscription-001"
    },
    "predicates": {
                   “rejectedTargets” :  [“cmhandle1”, “cmhandle2”, “cmhandle3”],
                   “acceptedTargets” :  [“cmhandle1”, “cmhandle2”, “cmhandle3”],
                   “pendingTargets” :   [“cmhandle4”, “cmhandle5”, “cmhandle6”],  
	}
}

Open Question: what headers do we need?

// Draw architecture diagram

// Show input and output schema

// Any logic if we want to discuss and make decision

Implementation proposal of DMI Response Timeout

Given that a Subscription Create Event has been received by the NCMP and that NCMP is going to forward that subscription to multiple DMI Plugins.

  1. The NCMP will create a new thread which will wait 30 seconds.
  2. The NCMP will add an entry to a hazelcast Map<String,Set<String>> with the clientID and subscriptionName combined as a key and the DMI Plugin names which the subscription has been forwarded to
  3. Every time a DMI responds to NCMP, NCMP persists the response. The Map entry is for the subscription is then checked
    1. if the subscription entry still exists in the Map, the NCMP removes the DMI Plugin name from the Set of the relevant Map entry.
      1. if the Set is now empty, NCMP removes the Map entry and compiles & send a full outcome response
    2. if the subscription entry does not exists in the Map, the NCMP compiles & sends a partial outcome response
  4. If the Wait thread completes the 30s countdown,
    1. if the map entry for the subscription exists in the map the thread removes the map entry from the Map. It then sends a partial outcome response
    2. if the map entry for the subscription does not exist in the map, the thread does nothing



  • No labels