-
Story
-
Resolution: Won't Do
-
High
-
None
This spike is related to CPS-1171 and is intended to propose solution(s) for bottleneck in CpsDataPersistenceServiceImpl.
A/C
- Publish Wiki with alternatives (pro-and cons table etc)
- possibly include PoCs on most likely alternatives
- Agree preferred option with Team and Stakeholders
- Agree and document preliminary KPI (how to measure) with ahilap and kieranmccarthy
Scope
- CPS-RI Interface: org.onap.cps.spi.impl.CpsDataPersistenceServiceImpl
- getDataNode()
- queryDataNodes()
Out-of-scope
- Conversion of data in service or rest layers
- Changing DB
Time-box
2-3 weeks
Data retrieval is taking more time with huge amount of data. Details to reproduce the issue are below:
APIs Used:
$ curl -k -H "Content-Type: application/json" -H "Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=" --request POST http://localhost:8883/cps/api/v1/dataspaces?dataspace-name='E2EDEMO'
$ curl -H "Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=" --request POST 'http://localhost:8883/cps/api/v1/dataspaces/E2EDEMO/schema-sets' --form 'file=@"ran-network.zip"' --form 'schema-set-name="ran-network"'
$ curl -H "Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=" --request POST 'http://localhost:8883/cps/api/v1/dataspaces/E2EDEMO/anchors?schema-set-name='ran-network'&anchor-name='11''
curl -w "@curl-format.txt" -H "Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=" --request POST 'http://localhost:8883/cps/api/v1/dataspaces/E2EDEMO/anchors/11/nodes' --header 'Content-Type: application/json' -d @ran-network-initial-data.json -i
{ "time_redirect": 0.000000, "time_namelookup": 0.000026, "time_connect": 0.000207, "time_appconnect": 0.000000, "time_pretransfer": 0.000250, "time_starttransfer": 0.196365, "time_total": 16.358302, "size_request": 251, "size_upload": 2736105, "size_download": 0, "size_header": 304 }$ curl -w "@curl-format.txt" -u cpsuser:cpsr0cks! -X 'GET' 'http://localhost:8883/cps/api/v1/dataspaces/E2EDEMO/anchors/11/node?xpath=%2fran-network&include-descendants=true' -H 'accept: application/json' -i
{ "time_redirect": 0.000000, "time_namelookup": 0.000025, "time_connect": 0.004892, "time_appconnect": 0.000000, "time_pretransfer": 0.004989, "time_starttransfer": 336.465170, "time_total": 336.961859, "size_request": 229, "size_upload": 0, "size_download": 1044550, "size_header": 314 }