Table of Contents |
---|
Jira | ||||||
---|---|---|---|---|---|---|
|
Description/Scope
There are 3 datastore related endpoints exists on the proxy controller.
- /v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-operational:
- $ref: 'ncmp.yml#/getResourceDataForPassthroughOperational'
- /v1/ch/{cm-handle}/data/ds/ncmp-datastores:operational:
- $ref: 'ncmp.yml#/getResourceDataOperational'
- /v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-running:
- $ref: 'ncmp.yml#/resourceDataForPassthroughRunning'
Parameters used by each endpoint
Endpoints/Params | datastoreName | cmHandleInPath | resourceIdentifierInQuery | optionsParamInQuery | topicParamInQuery
| includeDescendantsOptionInQuery |
---|---|---|---|---|---|---|
/v1/ch/{cm-handle}/data/ds/ ncmp-datastore:passthrough-operational | ||||||
/v1/ch/{cm-handle}/data/ds/ ncmp-datastores:operational | ||||||
/v1/ch/{cm-handle}/data/ds/ ncmp-datastore:passthrough-running |
Info |
---|
It would be better to have just one handling all the cases like /v1/ch/{cm-handle}/data/ds/{ncmp-datastore-name} where {ncmp-datastore-name} can be set to ncmp-datastore:operational or ncmp-datastore:passthrough-operational or ncmp-datastore:passthrough-running |
Open questions
# | Question/Issue | Decision/Notes |
---|---|---|
1 | If want to have full backward compatibility than we will have ':' in the URL, alternative way: just remove "ncmp-datastore:" prefix | Its not problem as it is more important to stay backward compatible |
Proposed solutions
Use just a switch to execute the appropriate function from the old functions
Use Factory pattern alone
Use Builder pattern to set config for the Factory (Thanks Andras for the idea)
Make handler Builder (Solution will be proposed by Andras)
...
Advantages | Disadvantages |
---|---|
All the advantages of the Builder Pattern and Factory used together | All the disadvantages of the Builder Pattern and Factory used together |
No factory is needed the handle function will be reused from the above | Not really a builder nor a Factory so maybe a bit hard to grasp at first |
Decision & Rationale
The number 4 will be implemented which is mix of Builder and Factory