Versions Compared

Key

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

...

Warning
titleDecoupling

It is very important that the SPI doesn't expose any database implementation for example database ID's



Description

Details

Decisions

1Assume flat attributes (no complex data types) but data could be stored as json object in SPI impl. for convenience/PoC

2SPI Implementation NOT using Model (service) current ENM SPI does!

3Are we going to have XPath/query builder?
  • We should decide based on what the users want to use/is easy to use
  • We don't want a query builder that eventually mimics XPaths functionality, use what is defined already XPATH sa a based but maybe supplement with a xpath-builder

4

Having a fluent interface in my opinion would be way more intuitive and practical. E.g.

//AND of two restrictions

Restriction and(Restriction firstRestriction,  Restriction secondRestriction)

//OR of two restrictions

Restriction or(Restriction firstRestriction,  Restriction secondRestriction)

//NOT of a restriction

Restriction not(Restriction restriction)

This will give any user of the API an intuitive way to build a complex query and the developer a tree to navigate and translate to SQL (or any other query language). A developer could do something the likes of myQuery.setRestriction(restriction1.and(restrcition2).and(restriction3))



5When do we get attributes?

How do control how many attributes we get back?

Maybe we dont need this because we dont have complex data attributes

We have the following options

  1. Default is no attributes 
  2. All Attributes
  3. Specify attributes - output specification (filter)
6Should we use the name node or fragment?
DataNode /Node
7Do we want to split the interface? 

Maybe we could just have a 

3 Alternatives 

  1. all in one interface
  2. Limited number of interfaces e.g Data Objects/ Data Persistence/Query
  3. Very fine grained (see below)

peristenceStore.addChild(parentDataObject, childDataObject)

Change Data SPI to DataStore - methods to add data. 

We will not have a querybuilder in SPI but the SPI will have to understand the query.

API - construct the CPS path 

SPI - deconstruct it and convert it into a query  


From an end user perspective anchor and fragment are different - we should separate them 

CpsAdmin Interface will handle the datastore and anchor

access control? extend the CpsAdmin


Module SPI - responsible for handling modules and module sets


QueryBuilder - responsibility of API

ENM SPI Study

Details about the ENM SPI can be found here: https://wiki.onap.org/pages/resumedraft.action?draftId=92998891&draftShareId=2f0190f4-bc97-47b7-bd82-6561f3606575&Spike


Proposed Future Implementation of CPS SPI

...