Background
A lookup service acts as a DNS like architecture for the discovery of perfsonar related services. it provides a raw xquery interface for the searching and retrieval of metadata that is stored on the LS by MAs and MPs.
Locations
ACAD/ISTF: http://selena.acad.bg:8070/axis/services/LookupService
PIONIER: http://loco4.man.poznan.pl:8090/axis/services/LookupService
RNP:: http://ls-rnp.gt-med.ufsc.br:8080/axis/services/LookupService
Query
Send the following xml to the service (in a SOAP Env) to query for all meta data on the LS:
<nmwg:message type="LSQueryRequest" id="#lsQuery1" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/"> <nmwg:metadata id="#meta1"> <xquery:subject id="#sub1"> declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/"; declare namespace perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/"; declare namespace psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"; declare namespace xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/"; /nmwg:store/nmwg:metadata </xquery:subject> <nmwg:eventType>service.lookup.xquery</nmwg:eventType> </nmwg:metadata> <nmwg:data metadataIdRef="#meta1"/> </nmwg:message>
A response such as this is returned (note that for some reason the xml tags are not properly created (hence the sed commands).
<nmwg:message xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="#lsQuery1_resp" messageIdRef="#lsQuery1" type="LSQueryResponse"> <nmwg:metadata id="LSQueryResponseMetadata" /> <nmwg:data id="LSQueryResponseData" metadataIdRef="LSQueryResponseMetadata"> <psservice:datum xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"> <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="http://selena.acad.bg:8080/axis/services/MeasurementArchiveService"> <nmwg:parameters id="control-parameters"> <nmwg:parameter name="timestamp">1175015943268</nmwg:parameter> </nmwg:parameters> </nmwg:metadata> </psservice:datum> <psservice:datum xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"> <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="http://perfmonc.cesnet.cz:8080/axis/services/MeasurementArchiveService"> <nmwg:parameters id="control-parameters"> <nmwg:parameter name="timestamp">1175013862981</nmwg:parameter> </nmwg:parameters> </nmwg:metadata> </psservice:datum> <psservice:datum xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"> <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="http://archive.sonar.net.switch.ch:8180/axis/services/MeasurementArchiveService"> <nmwg:parameters id="control-parameters"> <nmwg:parameter name="timestamp">1175014782694</nmwg:parameter> </nmwg:parameters> </nmwg:metadata> </psservice:datum> <psservice:datum xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"> <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="http://gandalf.rrze.uni-erlangen.de:8090/services/MP/BWCTL"> <nmwg:parameters id="control-parameters"> <nmwg:parameter name="timestamp">1175015336682</nmwg:parameter> </nmwg:parameters> </nmwg:metadata> </psservice:datum> <psservice:datum xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"> <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="http://gandalf.rrze.uni-erlangen.de:8090/services/MA/RIPE"> <nmwg:parameters id="control-parameters"> <nmwg:parameter name="timestamp">1175015339656</nmwg:parameter> </nmwg:parameters> </nmwg:metadata> </psservice:datum> <psservice:datum xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"> <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="http://gandalf.rrze.uni-erlangen.de:8090/services/MA/IPPM"> <nmwg:parameters id="control-parameters"> <nmwg:parameter name="timestamp">1175015341646</nmwg:parameter> </nmwg:parameters> </nmwg:metadata> </psservice:datum> <psservice:datum xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"> <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="http://gandalf.rrze.uni-erlangen.de:8090/services/MP/OWAMP"> <nmwg:parameters id="control-parameters"> <nmwg:parameter name="timestamp">1175015343759</nmwg:parameter> </nmwg:parameters> </nmwg:metadata> </psservice:datum> <psservice:datum xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"> <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="http://gandalf.rrze.uni-erlangen.de:4050/services/MP/OWAMP"> <perfsonar:subject xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/" id="commonParameters"> <psservice:service xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/" id="serviceParameters"> <psservice:serviceName>OWAMP Measurement Point</psservice:serviceName> <psservice:accessPoint>http://gandalf.rrze.uni-erlangen.de:4050/services/MP/OWAMP</psservice:accessPoint> <psservice:serviceType>MP</psservice:serviceType> <psservice:serviceDescription>Measurement Point for doing on-demand OWAMP tests, using owping command</psservice:serviceDescription> </psservice:service> </perfsonar:subject> </nmwg:metadata> </psservice:datum> <psservice:datum xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"> <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="http://perfmonc.cesnet.cz:8080/axis/services/MeasurementArchiveService"> <perfsonar:subject xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/" id="commonParameters"> <psservice:service xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/" id="localhost.-f8a056:1118d1c091b:6ea5"> <psservice:serviceName>Java MA</psservice:serviceName> <psservice:accessPoint>http://perfmonc.cesnet.cz:8080/axis/services/MeasurementArchiveService</psservice:accessPoint> <psservice:serviceType>MA</psservice:serviceType> <psservice:serviceDescription>Java RRD MA, perfSONAR project</psservice:serviceDescription> </psservice:service> </perfsonar:subject> </nmwg:metadata> </psservice:datum> <psservice:datum xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"> <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="http://archive.sonar.net.switch.ch:8180/axis/services/MeasurementArchiveService"> <perfsonar:subject xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/" id="commonParameters"> <psservice:service xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/" id="localhost.-f8a056:1118d1c091b:709c"> <psservice:serviceName>Java MA</psservice:serviceName> <psservice:accessPoint>http://archive.sonar.net.switch.ch:8180/axis/services/MeasurementArchiveService</psservice:accessPoint> <psservice:serviceType>MA</psservice:serviceType> <psservice:serviceDescription>Java RRD MA, perfSONAR project</psservice:serviceDescription> </psservice:service> </perfsonar:subject> </nmwg:metadata> </psservice:datum> <psservice:datum xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"> <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="http://gandalf.rrze.uni-erlangen.de:8090/services/MP/BWCTL"> <perfsonar:subject xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/" id="commonParameters"> <psservice:service xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/" id="serviceParameters"> <psservice:serviceName>BWCTL Measurement Point</psservice:serviceName> <psservice:accessPoint>http://gandalf.rrze.uni-erlangen.de:8090/services/MP/BWCTL</psservice:accessPoint> <psservice:serviceType>MP</psservice:serviceType> <psservice:serviceDescription>Measurement Point for doing on-demand BWCTL tests</psservice:serviceDescription> </psservice:service> </perfsonar:subject> </nmwg:metadata> </psservice:datum> <psservice:datum xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"> <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="http://gandalf.rrze.uni-erlangen.de:8090/services/MA/RIPE"> <perfsonar:subject xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/" id="commonParameters"> <psservice:service xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/" id="serviceParameters"> <psservice:serviceName>RIPE Test Data Measurement Archive</psservice:serviceName> <psservice:accessPoint>http://gandalf.rrze.uni-erlangen.de:8090/services/MA/RIPE</psservice:accessPoint> <psservice:serviceType>MA</psservice:serviceType> <psservice:serviceDescription>Measurement Archive for RIPE Test Data (OWD, OWDV, Packet Loss) from measurement points in the GEANT network</psservice:serviceDescription> </psservice:service> </perfsonar:subject> </nmwg:metadata> </psservice:datum> <psservice:datum xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"> <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="http://gandalf.rrze.uni-erlangen.de:8090/services/MA/IPPM"> <perfsonar:subject xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/" id="commonParameters"> <psservice:service xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/" id="serviceParameters"> <psservice:serviceName>Hades Measurement Archive</psservice:serviceName> <psservice:accessPoint>http://gandalf.rrze.uni-erlangen.de:8090/services/MA/IPPM</psservice:accessPoint> <psservice:serviceType>MA</psservice:serviceType> <psservice:serviceDescription>Measurement Archive for Hades (OWD, OWDV, Packet Loss) data from measurement points in the X-WiN network (DFN)</psservice:serviceDescription> </psservice:service> </perfsonar:subject> </nmwg:metadata> </psservice:datum> <psservice:datum xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"> <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="http://gandalf.rrze.uni-erlangen.de:8090/services/MP/OWAMP"> <perfsonar:subject xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/" id="commonParameters"> <psservice:service xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/" id="serviceParameters"> <psservice:serviceName>OWAMP Measurement Point</psservice:serviceName> <psservice:accessPoint>http://gandalf.rrze.uni-erlangen.de:8090/services/MP/OWAMP</psservice:accessPoint> <psservice:serviceType>MP</psservice:serviceType> <psservice:serviceDescription>Measurement Point for doing on-demand OWAMP tests, using owping command</psservice:serviceDescription> </psservice:service> </perfsonar:subject> </nmwg:metadata> </psservice:datum> <psservice:datum xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"> <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="http://selena.acad.bg:8080/axis/services/MeasurementArchiveService"> <perfsonar:subject xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/" id="commonParameters"> <psservice:service xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/" id="localhost.-f8a056:1118d1c091b:70c3"> <psservice:serviceName>Java RRD MA</psservice:serviceName> <psservice:accessPoint>http://selena.acad.bg:8080/axis/services/MeasurementArchiveService</psservice:accessPoint> <psservice:serviceType>RRD MA</psservice:serviceType> <psservice:serviceDescription>Java RRD MA, perfSONAR project</psservice:serviceDescription> </psservice:service> </perfsonar:subject> </nmwg:metadata> </psservice:datum> </nmwg:data> </nmwg:message>
<!-- declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/"; declare namespace perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/"; declare namespace psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"; declare namespace xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/"; for $metadata in /nmwg:store/nmwg:metadata let $metadata_id := $metadata/@id let $data := /nmwg:store/nmwg:data[@metadataIdRef=$metadata_id] where $metadata//psservice:serviceType="MA" return <lookup-storage-from-query> {$metadata} {$data} </lookup-storage-from-query> -->
Advanced Queries
You can submit xquery statements to gather only the information you wish to get from the LS. An important note is that the search is returned inside of a /nmwg:message/nmwg:data/psservice:datum
element for each returned output. This may result in awkward to handle xml statements as a return. (ie you still have to re parse the output to get the data - although given the fact that the tags are left as < and > implies that you do anyway)
Getting all MA's
So for example, say we wanted to list all MA's that are registered with the LS:
<nmwg:message type="LSQueryRequest" id="#lsQuery1" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/"> <nmwg:metadata id="#meta1"> <xquery:subject id="#sub1"> declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/"; declare namespace perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/"; declare namespace psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"; declare namespace xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/"; for $service in /nmwg:store/nmwg:metadata/perfsonar:subject/psservice:service let $type := data($service/psservice:serviceType) where contains($type,'MA') return $service </xquery:subject> <nmwg:eventType>service.lookup.xquery</nmwg:eventType> </nmwg:metadata> <nmwg:data metadataIdRef="#meta1"/> </nmwg:message>
Running it via:
[~/Work/perfSONAR/perfSONAR-PS/trunk/perfSONAR-PS/client]$ ./client.pl \ http://selena.acad.bg:8070/axis/services/LookupService \ ~/Work/perfSONAR/ls/request.xml | sed s:\<\;:\<:g | sed s:\>\;:\>:g | tidy -xml -i -w 180 2>/dev/null
<nmwg:message xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="#lsQuery1_resp" messageIdRef="#lsQuery1" type="LSQueryResponse"> <nmwg:metadata id="LSQueryResponseMetadata" /> <nmwg:data id="LSQueryResponseData" metadataIdRef="LSQueryResponseMetadata"> <psservice:datum xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"> <psservice:service xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/" id="localhost.-f8a056:11194d5c867:-79d1"> <psservice:serviceName>Java MA</psservice:serviceName> <psservice:accessPoint>http://archive.sonar.net.switch.ch:8180/axis/services/MeasurementArchiveService</psservice:accessPoint> <psservice:serviceType>MA</psservice:serviceType> <psservice:serviceDescription>Java RRD MA, perfSONAR project</psservice:serviceDescription> </psservice:service> </psservice:datum> <psservice:datum xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"> <psservice:service xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/" id="serviceParameters"> <psservice:serviceName>RIPE Test Data Measurement Archive</psservice:serviceName> <psservice:accessPoint>http://gandalf.rrze.uni-erlangen.de:8090/services/MA/RIPE</psservice:accessPoint> <psservice:serviceType>MA</psservice:serviceType> <psservice:serviceDescription>Measurement Archive for RIPE Test Data (OWD, OWDV, Packet Loss) from measurement points in the GEANT network</psservice:serviceDescription> </psservice:service> </psservice:datum> <psservice:datum xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"> <psservice:service xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/" id="serviceParameters"> <psservice:serviceName>Hades Measurement Archive</psservice:serviceName> <psservice:accessPoint>http://gandalf.rrze.uni-erlangen.de:8090/services/MA/IPPM</psservice:accessPoint> <psservice:serviceType>MA</psservice:serviceType> <psservice:serviceDescription>Measurement Archive for Hades (OWD, OWDV, Packet Loss) data from measurement points in the X-WiN network (DFN)</psservice:serviceDescription> </psservice:service> </psservice:datum> <psservice:datum xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"> <psservice:service xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/" id="localhost.-f8a056:11194d5c867:-79ac"> <psservice:serviceName>Java RRD MA</psservice:serviceName> <psservice:accessPoint>http://selena.acad.bg:8080/axis/services/MeasurementArchiveService</psservice:accessPoint> <psservice:serviceType>RRD MA</psservice:serviceType> <psservice:serviceDescription>Java RRD MA, perfSONAR project</psservice:serviceDescription> </psservice:service> </psservice:datum> <psservice:datum xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/"> <psservice:service xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/" id="localhost.-f8a056:11194d5c867:-747f"> <psservice:serviceName>Java MA</psservice:serviceName> <psservice:accessPoint>http://perfmonc.cesnet.cz:8080/axis/services/MeasurementArchiveService</psservice:accessPoint> <psservice:serviceType>MA</psservice:serviceType> <psservice:serviceDescription>Java RRD MA, perfSONAR project</psservice:serviceDescription> </psservice:service> </psservice:datum> </nmwg:data> </nmwg:message>
Getting the information from an interface (RRD MA)
Get all interface information from the LS (does not indicate where the endpoint for the MA is tho');
... declare namespace netutil="http://ggf.org/ns/nmwg/characteristic/utilization/2.0/"; /nmwg:store/nmwg:data/nmwg:metadata/netutil:subject ...