Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [higgins-dev] IdAS interface questions

Hi, Paul.
 
Yes, inside provider we can get all the Entity information, cache it and return it by one piece at a call. Ok, when the Entity contains very big volume of information, such as Attribute with many simple values (collection), we can narrow the result by specifing only needed attributes. But how can we limit the needed info if the Entity contains some attributes with complex values which in turn can hold also complex values with their respective attributes as well as simple attributes with collections of simple or complex values wich in turn... and so on. Such Entities can be resource-intensive when loading in whole.
How can we specify loading not entire Entity but only needed info in the attributes of complex values? Now it can't be done. It may be possible when Iterfaces will become changed to use IEntity instead of IComplexAttrValue and adding probably getEntities(IFilter filter, Iterator attrSelectionList) method to IAttribute interface for example. However it still will require one separate call per such an Attribute with complex values - Entities. In this case provider may not load Entity's complex values at once when getting Entity.
 
Thanks and regards.
Yuriy.
 
----- Original Message -----
Sent: Thursday, May 22, 2008 2:59 AM
Subject: RE: [higgins-dev] IdAS interface questions

We have had some conversations today about this. In brief there is a great deal that can be done in the CP to vastly improve performance. For example each call to get an attribute value of an Entity doesn’t imply that a SQL query (or LDAP query) is done. Quite the contrary, the entire Entity should be fetched from the backing store with one query and then this Entity responds from memory to each fine-grained get attribute call.

 


From: brian walker [mailto:bwalker@xxxxxxxxxxxxx]
Sent: Wednesday, May 21, 2008 11:40 AM
To: Paul Trevithick; Drummond Reed
Cc: Valery Kokhan; Yuriy Pilipenko
Subject: Fwd: [higgins-dev] IdAS interface questions
Importance: High

 

hi Paul, Drummond  - just wanted to highlight Yuriy's message to Jim about improving IdAS query performance per ticket wwm-619. This can be discussed with Jim while you are with him over the next couple of days and send any feedback along....

 

thanks...Brian


Begin forwarded message:



From: Yuriy Pilipenko <ypilipenko@xxxxxxxxxxxxxx>

Date: May 21, 2008 11:25:20 AM EDT

To: "Higgins (Trust Framework) Project developer discussions" <higgins-dev@xxxxxxxxxxx>

Subject: [higgins-dev] IdAS interface questions

Reply-To: "Higgins (Trust Framework) Project developer discussions" <higgins-dev@xxxxxxxxxxx>

 

Hi, Jim.

We have some questions about IdAS interfaces. Now in order to get full information of Entity we need many IdAS calls, such as getAttributes(), getValues(), getData() etc. And the more actual data (more Attributes with values present) then more calls need to be done respectively.

For example to get the m-card with claims we need get many attributes for claim types, get their values, simple as well as complex, getting their attributes and so on. In common case to get the full Entity we need do something like this:

IEntity entity = context.getEntity(entityID);

Iterator itAttributes = entity.getAttributes();

while (itAttributes.hasNext()) {

    IAttribute attr = (IAttribute) itAttributes.next();

    processAttribute(attr);

}

 

public void processAttribute(IAttribute attr) {

    Iterator itValues = attr.getValues();

    while (itValues.hasNext()) {

        IAttributeValue val = (IAttributeValue) itValues.next();

        if (val.isSimple()) {

            Object data = "" val).getData();

            doSomethingWith(data);

        }

        else {

            Iterator itAttr = ((IComplexAttrValue) val).getAttributes();

            while (itAttr.hasNext()) {

                processAttribute((IAttribute)itAttr.next());

            }

        }

    }

}

Is it possible to reduce number of IdAS calls to get the full Entity data? May be it would be good to change interfaces so that it will no need in cycles and big number of separate calls...Probably it is possible to change IComplexAttrValue and IEntity interfaces, method getAttributes() so that we could be able to narrow the attribute set and filter them by value to get only information that we need, and get all of the attributes with values all in one at a time.

Thanks, Yuriy Pilipenko.


Back to the top