If the pagination is provided by A&AI, I think that is the right approach to 
take.  I am also concerned the case where there are thousands of cloud regions, 
each having tens of flavors with each flavor having tens of HPA capabilities. 
Amount of data that needs to go over HTTP could be huge. Pagination helps.

Hi Harish,
Can you provide some examples on pagination granularity supported by A&AI? As 
you see in this case, there are set of cloud-regions, and for each 
cloud-region, there could be set of flavor records. For each flavor record, 
there are set of HPA capability records.

Say that there are 1000 cloud regions.
Say that OOF wants to read 10 at a time.
How can this be done? Any examples would be good.

Thanks
Srini


From: [email protected] [mailto:[email protected]] On 
Behalf Of Venkata Harish K Kajur
Sent: Friday, September 21, 2018 9:38 AM
To: Ranganathan, Dileep <[email protected]>; FORSYTH, JAMES 
<[email protected]>; [email protected]
Subject: Re: [onap-discuss] [AAI] Optimizing querying all flavors in a cloud 
region

Hi Dileep,

Can you please provide me with more info such as the localhost_access.log of 
the request?
Is this Casablanca code?
If it is, what can be done is use pagination and have your client do multiple 
parallel requests rather than One GET ALL to speed up.

Thanks,
Harish

From: Ranganathan, Dileep 
<[email protected]<mailto:[email protected]>>
Sent: Friday, September 21, 2018 11:58 AM
To: KAJUR, HARISH V <[email protected]<mailto:[email protected]>>; FORSYTH, JAMES 
<[email protected]<mailto:[email protected]>>; 
[email protected]<mailto:[email protected]>
Subject: RE: [AAI] Optimizing querying all flavors in a cloud region

Thanks Harish.
In our use case we also need the children inside the flavors too. We are trying 
to get the HPACapabilities object from flavors.
Is there a way to speed up?

Thanks,
Dileep

From: KAJUR, HARISH V [mailto:[email protected]]
Sent: Friday, September 21, 2018 7:18 AM
To: Ranganathan, Dileep 
<[email protected]<mailto:[email protected]>>; FORSYTH, 
JAMES <[email protected]<mailto:[email protected]>>; 
[email protected]<mailto:[email protected]>
Subject: RE: [AAI] Optimizing querying all flavors in a cloud region

Hi Dileep,

I don't think an index here will help because you are not filtering on anything.
Indexes help if you are doing a lookup for a specific vertexes or set of 
vertexes based on a property.
In this case, you wanted to get all the flavors in a specific cloud region.
I would suggest then to change to doing this:

GET 
{aai_endpoint}/aai/{aai_version}/cloud-infrastructure/cloud-regions/cloud-region/{cloud_owner}/{cloud_region_id}/flavors/?depth=0&nodes-only=true

If you only care about the flavors and not the children underneath the flavors, 
then this query will significantly improve the performance of the query.
As this query is saying get me all the flavors and only the flavors excluding 
the nested children and so forth and also ignore the relationships 
(nodes-only=true).
If you only care about the flavors then this will help.

Thanks,
Harish

From: Ranganathan, Dileep 
<[email protected]<mailto:[email protected]>>
Sent: Friday, September 21, 2018 2:11 AM
To: FORSYTH, JAMES <[email protected]<mailto:[email protected]>>; KAJUR, HARISH V 
<[email protected]<mailto:[email protected]>>; 
[email protected]<mailto:[email protected]>
Subject: [AAI] Optimizing querying all flavors in a cloud region

Hi AAI team,

We have a use case where we need to query all flavors inside a cloud region. We 
are having latency in some environments which is more than 30 seconds delay. Is 
there a way we can index this and speed up performance?
GET 
{aai_endpoint}/aai/{aai_version}/cloud-infrastructure/cloud-regions/cloud-region/{cloud_owner}/{cloud_region_id}/flavors/?depth=all

Is there as similar construct like <xml-property name="indexedProps" value=""/> 
for ArrayList object flavors?

      <java-type name="Flavors">
            <xml-properties>
                <xml-property name="description" value="Collection of openstack 
flavors."/>
            </xml-properties>
            <xml-root-element name=""/>
            <java-attributes>
                <xml-element container-type="java.util.ArrayList" 
java-attribute="flavor" name="flavor" type="inventory.aai.onap.org.v14.Flavor"/>
            </java-attributes>
        </java-type>

Thanks,
Dileep



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12576): https://lists.onap.org/g/onap-discuss/message/12576
Mute This Topic: https://lists.onap.org/mt/25839741/21656
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to