List Info

Thread: Re: Getting all instances without associations




Re: Getting all instances without associations
user name
2008-06-04 14:48:00
OFTEN IT IS BEST TO JUST GET ALL THE INSTANCE OF ALL THE CLASSES INVOLVED, AND THEN DO YOUR OWN QUERY LOCALLY.
THAT IS BECAUSE FOR A QUERY, ONE WOULD HAVE TO GET EACH INSTANCE OF THE FIRST ELEMENT IN THE QUERY, AND THEN GET EVERY INSTANCE OF THE NEXT ELEMENT IN THE QUERY FOR  EVERY PRECEDING ELEMENT, ETC. OVER AND OVER, WHICH EXPANDS GEOMETRICALLY.
IF YOU CONTROL THE PROVIDER, THEN YOU CAN IMPLEMENT THE QUERY RESPONSE IN THAT, BUT OTHERWISE THERE IS NOTHING THE REPOSITORY CAN DO.  IT WOULD HAVE TO GET ALL THE INSTANCES AS WELL, AND TAKE JUST AS LONG AS IT WOULD FOR YOU.

----- ORIGINAL MESSAGE ----
FROM: YVES <EXPI_TRASHWEB.DE>
TO: PEGASUS-LOPENPEGASUS.ORG
SENT: WEDNESDAY, JUNE 4, 2008 12:06:34 PM
SUBJECT: RE: GETTING ALL INSTANCES WITHOUT ASSOCIATIONS

THANKS FOR YOUR RESPONSE!

DO YOU MEAN SOMETHING LIKE THAT (IN PSEUDOCODE):
--------------
GETALLVOLUMEINSTANCES();
GETALLVOLUMETOVOLUMEGROUPASSOCIATIONS();
FOREACH(VOLUMEINSTANCE)
{
&NBSP; &NBSP; FOREACH(VOLUMETOVOLUMEGROUPASSOCIATION)
&NBSP; &NBSP; {
&NBSP; &NBSP; &NBSP; &NBSP; IF(?¿VOLUMETOVOLUMEGROUPASSOCIATION.VOLUMEPATH
== ?¿VOLUMEINSTANCE.GETPATH())
&NBSP; &NBSP; &NBSP; &NBSP; {
&NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; DOSTUFFWITHUNASSOCIATEDVOLUME();
&NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; BREAK;
&NBSP; &NBSP; &NBSP; &NBSP; }
&NBSP; &NBSP; }
}
-------------

OR IS THERE A BUILT-IN FUNCTIONALITY OF OPENPEGASUS FOR THIS?

>; UNLIKE DATABASE MANAGERS, QUERY SUPPORT ARE NOT BUILT INTO CIMOMS.&NBSP; EXECQUERY NEEDS TO BE EXPLICITLY SUPPORTED BY THE PROVIDER. I SUSPECT THE QUERY FUNCTIONALITY YOU ARE LOOKING FOR IS NOT AVAILABLE IN ANY QL.
>
> YOU SHOULD BE ABLE TO ENUMERATEINSTANCS OF IBMTSDS_VOLUME&NBSP; AND WHATEVER ASSOCIATIONS CONNECTS IBMTSDS_VOLUME&NBSP; AND IBMTSDS_VOLUMEGROUP - THEN DO ALL THE FILTERING LOCALLY.&NBSP; THIS SAVES THE ONE-BY-ONE MANY TRANSACTIONS, BUT YOU MAY GET SCALABILITY ISSUES (AS WITH QUERY) IF THE RESPONSE IS HUGE.
>
> PAUL


RE: Getting all instances without associations
user name
2008-06-04 15:31:03

Paul alluded to this with his scalability comment... but keep in mind that a storage array could return large numbers of Volume instances in the response to "getAllVolumeInstances()&quot;  (Some arrays I know of would return 65,536 when fully populated).

 

~edh

 

From: Kirk Augustin [mailto:kirk_augustinyahoo.com]
Sent: Wednesday, June 04, 2008 12:48 PM
To: yves; pegasus-lopenpegasus.org
Subject: Re: Getting all instances without associations

 

Often it is best to just get all the instance of all the classes involved, and then do your own query locally.
That is because for a query, one would have to get each instance of the first element in the query, and then get every instance of the next element in the query for  every preceding element, etc. over and over, which expands geometrically.
If you control the provider, then you can implement the query response in that, but otherwise there is nothing the repository can do.  It would have to get all the instances as well, and take just as long as it would for you.

----- Original Message ----
From: yves <expi_trashweb.de>
To: pegasus-lopenpegasus.org
Sent: Wednesday, June 4, 2008 12:06:34 PM
Subject: RE: Getting all instances without associations

Thanks for your response!

Do you mean something like that (in pseudocode):
--------------
GetAllVolumeInstances();
GetAllVolumeToVolumegroupAssociations();
foreach(VolumeInstance)
{
    foreach(VolumeToVolumegroupAssociation)
&nbsp;   {
        if(VolumeToVolumegroupAssociation.VolumePath
== VolumeInstance.getPath())
&nbsp;       {
            DoStuffWithUnassociatedVolume();
            break;
&nbsp;       }
    }
}
-------------

Or is there a built-in functionality of OpenPegasus for this?

> Unlike database managers, query support are not built into CIMOMs.&nbsp; ExecQuery needs to be explicitly supported by the provider. I suspect the query functionality you are looking for is not available in any QL.
>
> You should be able to EnumerateInstancs of IBMTSDS_Volume  and whatever associations connects IBMTSDS_Volume  and IBMTSDS_Volumegroup - then do all the filtering locally.&nbsp; This saves the one-by-one many transactions, but you may get scalability issues (as with query) if the response is huge.
&gt;
> Paul

RE: Getting all instances without associations
user name
2008-06-05 09:41:30
... and wasn't there an email message recently&nbsp;from one of the clients that the client code was running out of memory because it could not swallow that much information coming from the Provider?&nbsp; Granted, one can say, just beef up the client software; however, the general trend is to put the resources on the server side so that the client software can be as "thin" as possible.
 
/Mike


From: Houston, Eddie [mailto:eddie.houstonhp.com]
Sent: Wednesday, June 04, 2008 4:31 PM
To: Kirk Augustin; yves; pegasus-lopenpegasus.org
Subject: RE: Getting all instances without associations

Paul alluded to this with his scalability comment... but keep in mind that a storage array could return large numbers of Volume instances in the response to "getAllVolumeInstances()" ; (Some arrays I know of would return 65,536 when fully populated).

 

~edh

 

From: Kirk Augustin [mailto:kirk_augustinyahoo.com]
Sent: Wednesday, June 04, 2008 12:48 PM
To: yves; pegasus-lopenpegasus.org
Subject: Re: Getting all instances without associations

 

Often it is best to just get all the instance of all the classes involved, and then do your own query locally.
That is because for a query, one would have to get each instance of the first element in the query, and then get every instance of the next element in the query for  every preceding element, etc. over and over, which expands geometrically.
If you control the provider, then you can implement the query response in that, but otherwise there is nothing the repository can do.  It would have to get all the instances as well, and take just as long as it would for you.

----- Original Message ----
From: yves <expi_trashweb.de>
To: pegasus-lopenpegasus.org
Sent: Wednesday, June 4, 2008 12:06:34 PM
Subject: RE: Getting all instances without associations

Thanks for your response!

Do you mean something like that (in pseudocode):
--------------
GetAllVolumeInstances();
GetAllVolumeToVolumegroupAssociations();
foreach(VolumeInstance)
{
    foreach(VolumeToVolumegroupAssociation)
&nbsp;   {
        if(VolumeToVolumegroupAssociation.VolumePath
== VolumeInstance.getPath())
&nbsp;       {
            DoStuffWithUnassociatedVolume();
            break;
&nbsp;       }
    }
}
-------------

Or is there a built-in functionality of OpenPegasus for this?

>; Unlike database managers, query support are not built into CIMOMs.&nbsp; ExecQuery needs to be explicitly supported by the provider. I suspect the query functionality you are looking for is not available in any QL.
>
> You should be able to EnumerateInstancs of IBMTSDS_Volume ; and whatever associations connects IBMTSDS_Volume  and IBMTSDS_Volumegroup - then do all the filtering locally.&nbsp; This saves the one-by-one many transactions, but you may get scalability issues (as with query) if the response is huge.
>
> Paul

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )