perfsonar-dev - Re: [pS-dev] pass key back in SetupDataResponse
Subject: perfsonar development work
List archive
- From: Roman Lapacz <>
- To: "Jeff W. Boote" <>
- Cc: Guilherme Fernandes <>, Loukik Kudarimoti <>,
- Subject: Re: [pS-dev] pass key back in SetupDataResponse
- Date: Mon, 02 Oct 2006 13:52:43 +0200
Jeff W. Boote wrote:
It actually occurs to me that there might be a better way to deal with this. I don't know if the schema would support this, but the key is supposed to simply be a 'private' version of the metadata - right? Why not put the key and the subj/parameters in the SAME metadata for this? (Just a half-baked idea at the moment, but it might be more simple than using chaining. I have not thought this through - but it does sound more simple. We would need to check how the schema is currently specified, I think it might be specified such that a metadata can hold either a Key, or a Metadata - but not both.)
It's possible. Have a look at $PERFSONAR/schema/nmwg/nmbase.rnc :
[...]
MetadataBlock =
Subject? &
Parameters?
MetadataContent =
(
MetadataBlock |
FilterMetadataBlock
) &
EventType? &
Key?
[...]
Also the implementation supports it ($PERFSONAR/src/org/ggf/ns/nmwg/base/v2_0/Metadata.java). But to be honest I'm not sure to put to many things in the metadata element. Using the subject with metadataIdRef in the metadata with a key seams to me a better solution. But, this is open question (I'm not against).
jeff
XML example of a request and response using chaining (just my best recollection, I'm sorry but I can't spend more time looking for this):
<nmwg:message id="req1" type="SetupDataRequest"
${namespaces}>
<nmwg:metadata id="m1">
<netutil:subject>
<nmwgt:interface>
<nmwgt:ifAddress type="ipv4">192.168.1.1</nmwgt:ifAddress>
</nmwgt:interface>
</netutil:subject>
<nmwg:eventType>utilization</nmwg:eventType>
<nmwg:parameters>${parameters}</nmwg:parameters>
</nmwg:metadata>
<nmwg:data id="d1" metadataIdRef="m1"/>
</nmwg:message>
<nmwg:message id="resp1" type="SetupDataResponse"
${namespaces}>
<nmwg:metadata id="m1">
<netutil:subject>
<nmwgt:interface>
<nmwgt:ifAddress type="ipv4">192.168.1.1</nmwgt:ifAddress>
</nmwgt:interface>
</netutil:subject>
<nmwg:eventType>utilization</nmwg:eventType>
<nmwg:parameters>${parameters}</nmwg:parameters>
</nmwg:metadata>
<nmwg:metadata id="k1" metadataIdRef="m1">
<nmwg:key>
<nmwg:parameters>${parameters}</nmwg:parameters>
</nmwg:key>
</nmwg:metadata>
<nmwg:data id="d1" metadataIdRef="k1">
<nmwg:datum value="141231" timeValue="1106492081" timeType="unix" />
</nmwg:data>
</nmwg:message>
In the earlier email you put this template:
<data> -ref--> <key md> -subj-MdIdRef--> <orignal md>
and I like it. So, the above response example could be changed this way (I've added the subject in the metadata k1):
<nmwg:message id="resp1" type="SetupDataResponse"
${namespaces}>
<nmwg:metadata id="m1">
<netutil:subject>
<nmwgt:interface>
<nmwgt:ifAddress type="ipv4">192.168.1.1</nmwgt:ifAddress>
</nmwgt:interface>
</netutil:subject>
<nmwg:eventType>utilization</nmwg:eventType>
<nmwg:parameters>${parameters}</nmwg:parameters>
</nmwg:metadata>
<nmwg:metadata id="k1">
<nmwg:subject metadataIdRef="m1"/>
<nmwg:key>
<nmwg:parameters>${parameters}</nmwg:parameters>
</nmwg:key>
</nmwg:metadata>
<nmwg:data id="d1" metadataIdRef="k1">
<nmwg:datum value="141231" timeValue="1106492081" timeType="unix" />
</nmwg:data>
</nmwg:message>
Roman
- Re: [pS-dev] pass key back in SetupDataResponse, Roman Lapacz, 10/02/2006
Archive powered by MHonArc 2.6.16.