Skip to Content.
Sympa Menu

perfsonar-dev - Re: [pS-dev] time types in requests to SQL MA and E2Emon MP

Subject: perfsonar development work

List archive

Re: [pS-dev] time types in requests to SQL MA and E2Emon MP


Chronological Thread 
  • From: "Jeff W. Boote" <>
  • To: Roman Lapacz <>
  • Cc: Roman Lapacz <>, Mark Yampolskiy <>, "Matthias K. Hamm" <>, Loukik Kudarimoti <>, "" <>, Jason Zurawski <>
  • Subject: Re: [pS-dev] time types in requests to SQL MA and E2Emon MP
  • Date: Mon, 07 May 2007 13:16:22 -0600

Roman Lapacz wrote:
<?xml version='1.0' encoding='UTF-8'?>

<!-- Purpose: Transform tool snmp namespace of 'utilization' into
the characteristic namespace -->
<!-- Version: $Id$ -->

<nmwg:message id="msg4"
type="http://schema.perfsonar.net/MessageTypes/SetupDataRequest/2.0";

This type is something new for me. We could consider changing existing names of message types.

I do think we should consider it. (But, we should use the new OGF standard for name-spaces instead of what I have here. Instead of the version number, it uses a date-stamp.)

<!-- The third metadata is used to convert the results of the first
operation. It converts it into the 'characteristic' namespace. -->
<nmwg:metadata id="meta3">
<trans:subject id="iusub3" metadataIdRef="meta2"/>

<trans:parameters id="param3">
<nmwg:parameter name="ConvertTo">unix</nmwg:parameter>
<nmwg:parameter name="ConvertFrom">iso</nmwg:parameter>
<nmwg:parameter name="ConvertElements">
<trans:parameters id="cp1">
<nmwg:parameter name="startTime">//nmwg:message//select:parameters/nmwg:parameter[@name="startTime"]</nmwg:parameter>
<nmwg:parameter name="endTime">//nmwg:message//select:parameters/nmwg:parameter[@name="endTime"]</nmwg:parameter>
<nmwg:parameter name="datumTimeValue">//nmwg:message//nmwg:data/nmwg:datum[@timeType!="iso"]</nmwg:parameter>
</trans:parameters>
</nmwg:parameter>
</trans:parameters>


Two comments:

- I'm not sure putting xpath here. Xpath is the implementation part and can be used either inside the service or client app. No need to use it in the message. NMWG can handle in this case.

The XPath is used to indicate what you want from the client perspective. As I said in my comments above, a more simple method could be done. The key part needed for agreement here is that function-chaining is used to indicate the transformation. The specific eventType transformation can use whatever method it wants. If I want to use XPath for the query syntax for an eventType that my service is supporting, I can do that. Likewise, you don't have to support that eventType in your service.

- I don't like parameters inside parameter. Some time ago I proposed container structures in parameter (I asked Szymon to include it in the agenda for the meeting in Brazil)

We did talk about it in the meeting. Consensus there was that there was no need to add a special 'map' type given the fact that the parameter list is already a map. We liked nested parameters. I suspect this will be in Szymon's notes.

So I could change your parameter this way

<trans:parameters id="param3">

<!-- other parameters -->
<!-- ... -->

<list:parameter name="ConvertElements">
<collection:item name name="startTime">//nmwg:message//select:parameters/nmwg:parameter[@name="startTime"]</collection:item>
<collection:item name="endTime">//nmwg:message//select:parameters/nmwg:parameter[@name="endTime"]</collection:item>
<collection:item name="datumTimeValue">//nmwg:message//nmwg:data/nmwg:datum[@timeType!="iso"]</collection:item>
</list:parameter>

</trans:parameters>


I think this solution could be very useful also in other messages.

So, you keep the XPath? Ok.

I attached my updated proposal of the request for the MA.

------------------------------------------------------------------------

<?xml version='1.0' encoding='UTF-8'?>


<!-- Version: $Id$ -->

<nmwg:message id="msg4"

type="http://schema.perfsonar.net/MessageTypes/SetupDataRequest/2.0";

xmlns:timetrans="http://schema.perfsonar.net/tools/transform/time/2.0/";

xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilization/2.0/";
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
xmlns:select="http://ggf.org/ns/nmwg/ops/select/2.0/";
xmlns:nmtm="http://ggf.org/ns/nmwg/time/2.0/";>

<nmwg:metadata id="meta1">
<netutil:subject id="iusub1">
<nmwgt:interface>
<nmwgt:ifAddress type="ipv4">10.1.2.3</nmwgt:ifAddress>
<nmwgt:direction>in</nmwgt:direction>
<nmwgt:hostName>test-hostName</nmwgt:hostName>
<nmwgt:ifName>test-0</nmwgt:ifName>
<nmwgt:authRealm>TestRealm</nmwgt:authRealm>
<nmwgt:capacity>1000BaseT</nmwgt:capacity>
</nmwgt:interface>
</netutil:subject>

<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:eventType>
</nmwg:metadata>


<!-- The second metadata is used to convert the results of the second
operation. It selects a specific time-range. -->
<nmwg:metadata id="meta2">

<select:subject id="iusub2" metadataIdRef="meta1"/>

<select:parameters id="param2">

<nmwg:parameter name="startTime">1121472000</nmwg:parameter>
<nmwg:parameter name="endTime">1121904000</nmwg:parameter>
<!--
<nmwg:parameter name="startTime">
<nmtm:time type="ISO" value="2005-07-16T00:00:00Z"/>
</nmwg:parameter>
<nmwg:parameter name="endTime">
<nmtm:time type="ISO" value="2005-07-21T00:00:00Z"/>
</nmwg:parameter>
-->
<nmwg:parameter name="consolidationFunction">AVERAGE</nmwg:parameter>
<nmwg:parameter name="resolution">60</nmwg:parameter>
</select:parameters>

<nmwg:eventType>http://ggf.org/ns/nmwg/ops/select/2.0</nmwg:eventType>

</nmwg:metadata>

<!-- The third metadata is used to convert the results of the first
operation. -->
<nmwg:metadata id="meta3">

<timetrans:subject id="iusub3" metadataIdRef="meta2"/>

<timetrans:parameters id="param3">
<nmwg:parameter name="ConvertTo">unix</nmwg:parameter>
<nmwg:parameter name="ConvertFrom">iso</nmwg:parameter>
</timetrans:parameters>


<nmwg:eventType>http://schema.perfsonar.net/tools/transform/time/2.0</nmwg:eventType>

You have a 'generic' eventType here, but no parameters listed to show you which elements to change. Remember, this transformation could be implemented in a completely different transformation service that might not know anything about the specific data type represented by the 'utilization' namespace. That is why I had the XPath in the parameters so the client could indicate exactly what they wanted converted.

As I said in my previous message - if you want one specifically tied to the utilization namespace, then it could of course be much simpler. (like this) But, if you do that - I think the eventType needs to be something related to the utilization namespace:

http://schema.perfonar.net/tools/transform/utilization/unixtime/2.0

jeff



Archive powered by MHonArc 2.6.16.

Top of Page