Skip to Content.
Sympa Menu

perfsonar-dev - Re: [pS-dev] question about select namespace and subject element

Subject: perfsonar development work

List archive

Re: [pS-dev] question about select namespace and subject element


Chronological Thread 
  • From: Guilherme Fernandes <>
  • To: ulisses <>
  • Cc:
  • Subject: Re: [pS-dev] question about select namespace and subject element
  • Date: Tue, 05 Sep 2006 09:15:29 -0300

ulisses wrote:

Hi all

Hi!

using the following xml sample as a base [0]:

<nmwg:metadata id="meta1-in" metadataIdRef="meta4">
<netutil:subject id="iusub1">
<nmwgt:interface>
<nmwgt:direction>out</nmwgt:direction>
</nmwgt:interface>
</netutil:subject>
<nmwg:eventType>utilization</nmwg:eventType>
</nmwg:metadata>


<nmwg:metadata id="meta2">
<select:subject id="iusub2" metadataIdRef="meta1-in"/>

<select:parameters id="param1">
<nmwg:parameter name="startTime">1121644800</nmwg:parameter>
<nmwg:parameter name="endTime">1121904000</nmwg:parameter>
<nmwg:parameter name="consolidationFunction">AVERAGE</nmwg:parameter>
<nmwg:parameter name="resolution">300</nmwg:parameter>
</select:parameters>

<nmwg:eventType>select</nmwg:eventType>

</nmwg:metadata>

I see that the select element has a reference to metadata that describes an
xml document.

In the topology service, it will be interesting for future versions to
retrieve only a a set of
elements of the topology, for instance the links that have an specified
capacity.

An example of link element is the follwing:

<nmwgtopo3:link id="localhost.localdomain.-4b42ecf6:10d5e1bdbe3:-6b38"
xmlns:nmwgtopo3="http://ggf.org/ns/nmwg/topology/l3/3.0/";>
<nmwgtopo3:interface
id="localhost.localdomain.-4b42ecf6:10d5e1bdbe3:-6b39"
interfaceIdRef="51479">
<nmwgtopo3:ifDescription>FastEthernet0/0.2-ISL vLAN
subif</nmwgtopo3:ifDescription>
<nmwgtopo3:type>other</nmwgtopo3:type>
<nmwgtopo3:capacity>100000000</nmwgtopo3:capacity>
<nmwgtopo3:ipAddress value="158.38.108.1"/>
</nmwgtopo3:interface>
<nmwgtopo3:type>lan</nmwgtopo3:type>
<nmwgtopo3:name>levanger.levanger-fag</nmwgtopo3:name>
</nmwgtopo3:link>


And a template of links that have interfaces with a capacity of 155 Mbps
could be [1]:

<nmwgtopo3:link>
<nmwgtopo3:interface>
<nmwgtopo3:capacity>155000000</nmwgtopo3:capacity>
</nmwgtopo3:interface>
</nmwgtopo3:link>

I don't have clear that I can specify such template inside a <select>
parameters so I believe
that the correct way to indicate the template is like in the example [0], that is referencing a metadata that has the template element [1]

Although its not my field, and probably roman and others have much more to say about it, we did learn a lot about the SQL MA when developing its Owamp support, so maybe I can help. The select metadata is used to filter the data that is 'selected' from the SQL database. Right now it's use is hardcoded in SQLStorageManager and only checks for the Time, startTime and endTime values. Taking this aside, you're actually right in the way you should make the request to filter it by capacity. The difference is that it won't be filtered by the select metadata. The SQLStorageManager also does some filtering through your QueryGenerator, but it's done to the eXist database, not the SQL one. In the SQL MA eXist database the interfaces have their capacity defined and passing a capacity parameter in the referenced metadata (the one that defines what data you want from the SQL database) should filter the request so that only the right metadataIds will be used in the select for the SQL request. You can take a look at the measurementArchive.metadataConfig.queryGenerator.UtilizationQueryGenerator class, its the 'select' made to the eXist database.

Hope it helped,
Guilherme Fernandes

A full example could be:

<nmwg:metadata id="meta1">
<netutil:subject id="sub1">
<nmwgtopo3:link>
<nmwgtopo3:interface>
<nmwgtopo3:capacity>155000000</nmwgtopo3:capacity>
</nmwgtopo3:interface>
</nmwgtopo3:link>
</netutil:subject>
</nmwg:metadata>

<nmwg:metadata id="meta2">
<select:subject id="sub2" metadataIdRef="meta1"/>

<select:parameters id="param1">
<nmwg:parameter name="Time">0</nmwg:parameter>
</select:parameters>

<nmwg:eventType>select</nmwg:eventType>

</nmwg:metadata>


Am I right?

Thanks so much

Ulisses





Archive powered by MHonArc 2.6.16.

Top of Page