|
List Info
Thread: Re: Getting all instances without associations
|
|
| Re: Getting all instances without
associations |

|
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. T HAT 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_TRASH WEB.DE> TO: PEGASUS-L OPENPEGASUS.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 |

|
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()"Â (Some arrays I know of would
return 65,536 when fully populated).
~edh
From: Kirk Augustin
[mailto:kirk_augustin yahoo.com]
Sent: Wednesday, June 04, 2008 12:48 PM
To: yves; pegasus-l openpegasus.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_trash web.de>
To: pegasus-l openpegasus.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)
{
if(VolumeToVolumegroupAssociation.VolumePath
== VolumeInstance.getPath())
{
DoStuffWithUnassociatedVolume();
break;
}
}
}
-------------
Or is there a built-in functionality of OpenPegasus for this?
> Unlike database managers, query support are not built into CIMOMs.
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. 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 |

|
2008-06-05 09:41:30 |
|
|
... and wasn't there an email message recently 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? 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
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_augustin yahoo.com] Sent: Wednesday, June 04, 2008 12:48
PM To: yves; pegasus-l openpegasus.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_trash web.de> To:
pegasus-l openpegasus.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) {
if(VolumeToVolumegroupAssociation.VolumePath ==
VolumeInstance.getPath()) {
DoStuffWithUnassociatedVolume();
break; }
} } -------------
Or is there a built-in functionality of
OpenPegasus for this?
> Unlike database managers, query support are
not built into CIMOMs. 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. 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 )
|