Skip to Content.
Sympa Menu

perfsonar-dev - Re: [pS-dev] time types in the request

Subject: perfsonar development work

List archive

Re: [pS-dev] time types in the request


Chronological Thread 
  • From: Roman Lapacz <>
  • To:
  • Cc: "Jeff W. Boote" <>, Roman Lapacz <>, Martin Swany <>, "" <>
  • Subject: Re: [pS-dev] time types in the request
  • Date: Fri, 06 Apr 2007 19:41:05 +0200

Jason Zurawski wrote:
All;

Hi


I'm probably going to get yelled at because what I'm going to suggest is more complex - but I really don't like the timeType parameter solution. In my opinion, all parameters that are of 'type' time should be set using an nmtm:time element.

After talking with Jason, I decided I should have put an example in here to show what I'm talking about.

So, for the example Roman sent, the response would contain:

<nmwg:metadata id="meta2select">
<select:subject id="iusub2" metadataIdRef="meta1"/>
<select:parameters id="param1">
<! string start time will be interpreted as UNIX timestamp !>
<nmwg:parameter name="startTime">1121472000</nmwg:parameter>
<nmwg:parameter name="endTime">
<nmtm:time type="UNIX" value="1121904000"/>
</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>

1. The timeType parameter would go away completely.
2. Any parameter that is used to specify a time value could be specified using a string (like now) but it would have to be a unix timestamp in ascii string format.
3. Any parameter that is used to specify a time value would need to accept a nmtm:time element as the value.
4. There would be no way for a client to specify what timeType they want. We should create a time element API for creating time elements represented with different types.


So the issue still remains of what to do for 'display' of values (not necessarily the same as the time that will be used in the select statement). I still believe that this is best in a separate parameter block, and as Roman pointed out this couldn't be in the same md block currently. I would propose some sort of additional filter chaining as well (although I still think we need to abuse the notion of timeType a little further, since this is more of a presentation element than a time value):

<nmwg:metadata id="meta2select">
<select:subject id="iusub2" metadataIdRef="meta1"/>
<select:parameters id="param1">
<! string start time will be interpreted as UNIX timestamp !>
<nmwg:parameter name="startTime">1121472000</nmwg:parameter>
<nmwg:parameter name="endTime">
<nmtm:time type="UNIX" value="1121904000"/>
</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>

<nmwg:metadata id="meta3" metadataIdRef="meta2select">
<nmwg:parameters id="param1">
<nmwg:parameter name="timeType">ISO</nmwg:parameter>
</nmwg:parameters>
<nmwg:eventType>http://ggf.org/ns/nmwg/base/2.0</nmwg:eventType>
</nmwg:metadata>

<nmwg:data id="data1" metadataIdRef="meta3" />

I'd like to propose a small change. Take a look:


<nmwg:metadata id="meta1">
<netutil:subject id="iusub1">
<nmwgt:interface>
<nmwgt:ifAddress type="ipv4">100.1.2.3</nmwgt:ifAddress>
<nmwgt:direction>in</nmwgt:direction>
</nmwgt:interface>
</netutil:subject>
<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:eventType>
</nmwg:metadata>

<nmwg:metadata id="meta2select">
<select:subject id="iusub2" metadataIdRef="meta1"/>
<select:parameters id="param1">
<! string start time will be interpreted as UNIX timestamp !>
<nmwg:parameter name="startTime">1121472000</nmwg:parameter>
<nmwg:parameter name="endTime">
<nmtm:time type="UNIX" value="1121904000"/>
</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>

<nmwg:metadata id="meta3presentation">
<presentation:subject id="iusub3" metadataIdRef="meta2select"/>
<presentation:parameters id="param1">
<nmwg:parameter name="timeType">ISO</nmwg:parameter>
</presentation:parameters>
<nmwg:eventType>http://ggf.org/ns/nmwg/ops/presentation/2.0</nmwg:eventType>
</nmwg:metadata>

<nmwg:data id="data1" metadataIdRef="meta3presentation" />



- I replaced simple base chaining (metadataIdRef as attribute of metadata element) with chaining via subject element (my understanding of the base chaining is the solution of dividing metadata element in order to reuse its parts)
- I introduced new namespace 'presentation' in order to indicate the purpose of the parameter timeType inside

What do you think?

Roman






Archive powered by MHonArc 2.6.16.

Top of Page