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]>
Sent: Friday, September 21, 2018 11:58 AM
To: KAJUR, HARISH V <[email protected]>; FORSYTH, JAMES <[email protected]>; 
[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 (#12574): https://lists.onap.org/g/onap-discuss/message/12574
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