Guide for Experimenters

1 Experiment management

1.2 Define an experiment through Domain Specification Language (DSL)

Currently EEE or the Experiment Execution Engine does not support all the attributes available within DSL. Within FISMO, we only support name, description, discoverable, scheduling, experiment output, and query attribute. Experimenters should consider replacing “#*#” with experiment requirements. For simplicity we provide a template of FISMO that is supported by the EEE. 

<fed:FISMO name="#NAME#">

<fed:description>#DESCRIPTION#</fed:description>

<fed:discoverable>#DISCOVERABLE#</fed:discoverable>

<fed:experimentControl><fed:scheduling>

<fed:startTime>#STARTTIME#</fed:startTime>

<fed:Periodicity>#PERIODICITY#</fed:Periodicity>

<fed:stopTime>#STOPTIME#</fed:stopTime>

</fed:scheduling></fed:experimentControl>

<fed:experimentOutput location="#URLLOCATION#"></fed:experimentOutput>

<fed:queryControl><prt:query-request><query><![CDATA[

    #[1/1] visualization type: 'Gauge' and sensors

#QUERY#

]]</query></prt:query-request></fed:queryControl>

</fed:Fismo>



To further explain,

  • #NAME#: should be the name of the FISMO that experimenter want to have. For example:

<fed:FISMO name="2ndUseCase">

 

  • #DESCRIPTION#: should be the description of the FISMO to understand what is the FISMO is about. For example:

<fed:description>Over time all noise observations for a given location</fed:description>

 

  • #DISCOVERABLE#: should be either “true” or “false”. As explained before this attribute is used by the EEE to know whether the FISMO can be shown in the “Other Available FISMO IDs for subscriptions” tab in the Experiment Management Console. Using this other experimenters could reuse the query and scheduling information (subscribers should giving a new location that would send the results to them). For example:

<fed:discoverable>true</fed:discoverable>

 

  • #STARTTIME#: it is the time when the scheduling should start. In case, the #STARTTIME# in the past, the current time will be used and in case #STARTTIME# is in future, the given time will be used by the EEE to schedule the FISMO. The #STARTTIME# should be in DATETIME format.

<fed:startTime>2016-11-08T18:50:00.0Z</fed:startTime>

 

  • #PERIODICITY#: it is the period after which the EEE should re-trigger the execution of the FISMO. It is in INTEGER format and denotes the Seconds. For example:

<fed:Periodicity>250</fed:Periodicity>

 

  • #STOPTIME#: it is the time when the EEE should stop executing the FISMO. In case, the #STARTTIME# in the past, and is less than #STARTTIME# an error is raised by the EEE. Thus it is advisable that the #STOPTIME# is in future and is greater than #STARTTIME# The #STOPTIME# should be in DATETIME format. For example:

<fed:stopTime>2017-11-08T18:49:59.0Z</fed:stopTime>

 

  • #URLLOCATION#: it should be the location where the results of the query should be returned. This is usually a valid url location. For example:

<fed:experimentOutput location="http://soundcity.mobi/tc/ExperimentServer/store/"></fed:experimentOutput>

 

  • #QUERY#: is the actual SPARQL query that should be executed by the EEE on the Meta-Cloud.  For best results we advice not to provide following query and be specific to the needs.

 select * where {?s ?p ?o.}

 

The above query would hinder the performance of the EEE. A valid query would look like:

Prefix ssn: <http://purl.oclc.org/NET/ssnx/ssn#>

Prefix iotlite: <http://purl.oclc.org/NET/UNIS/fiware/iot-lite#>

Prefix dul: <http://www.loa.istc.cnr.it/ontologies/DUL.owl#>

Prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>

Prefix time: <http://www.w3.org/2006/time#>

Prefix m3-lite: <http://purl.org/iot/vocab/m3-lite#>

Prefix xsd: <http://www.w3.org/2001/XMLSchema#>

select ?s ?tim ?val

      where {

?o a ssn:Observation.

?o ssn:observedBy ?s.  

?o ssn:observedProperty ?qk.

Values ?qk {m3-lite:Sound m3-lite:SoundPressureLevelAmbient}

  • o ssn:observationSamplingTime ?t.

?o geo:location ?point.

?point geo:lat "4.346104E1"^^xsd:double.

?point geo:long "-3.80649E0"^^xsd:double.

?t time:inXSDDateTime ?ti.

?o ssn:observationResult ?or.

?or  ssn:hasValue ?v.

?v dul:hasDataValue ?val. 

} group by (?s) ?tim ?val

Note that the #QUERY# should be between “<![CDATA[#[1/1] visualization type: 'Gauge' and sensors” and “]]”.



On top of the FISMO there is a FEMO object. Currently EEE support the following FEMO template.

<fed:FEMO name="#FEMONAME#">

<fed:description>#FEMODESCRIPTION#</fed:description>

<fed:domainOfInterest>#DOMAINOFINTERESTLIST#</fed:domainOfInterest>

       <fed:FISMO name="#NAME#">

</fed:FISMO>

</fed:FEMO>



Here:

  • #FEMONAME#: should be the name of the FEMO that experimenter want to have. For example:

<fed:FEMO name="MySecondExperiment">

 

  • #FEMODESCRIPTION#: should be the description of the FEMO to understand what is the FEMO is about. For example:

<fed:description>LargeScale crowdsensing experiment </fed:description>

 

  • #DOMAINOFINTERESTLIST#:  this is the list of the domain of interests that experiment supports. For multiple domain of interests values should be blank space separated. For example.

<fed:domainOfInterest>http://purl.org/iot/vocab/m3-lite#Transportation http://purl.org/iot/vocab/m3-lite#Pollution http://purl.org/iot/vocab/m3-lite#City http://purl.org/iot/vocab/m3-lite#Health</fed:domainOfInterest>

 

For complete valid sample please consult the following table:

Experiment Instance (FEDSpec Example)

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

<fed:FEDSpec

  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

  xmlns:fed="http://www.fiesta-iot.eu/fedspec"

  xmlns:prt="http://www.w3.org/2007/SPARQL/protocol-types#"

  xmlns:vbr="http://www.w3.org/2007/SPARQL/results#"

  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

  xsi:schemaLocation="http://www.fiesta-iot.eu/fedspec file:/C:/Ext_SSD/AIT/FIESTA/FIESTA-SVN/WP4/Task%204.1/Objects/XSD/FEDSpec.xsd"

  userID="testuser1"

  <fed:FEMO name="MySecondExperiment">

    <fed:description>LargeScale crowdsensing experiment</fed:description>

    <fed:domainOfInterest>http://purl.org/iot/vocab/m3-lite#Transportation

      http://purl.org/iot/vocab/m3-lite#Pollution

      http://purl.org/iot/vocab/m3-lite#City

      http://purl.org/iot/vocab/m3-lite#Health

    </fed:domainOfInterest>

    <fed:FISMO name="2ndUseCase">

      <fed:description>Over time all noise observations

                        for a given location</fed:description>

      <fed:discoverable>true</fed:discoverable>

      <fed:experimentControl>

        <fed:scheduling>

          <fed:startTime>2016-11-08T18:50:00.0Z</fed:startTime>

          <fed:Periodicity>250</fed:Periodicity>

          <fed:stopTime>2017-11-08T18:49:59.0Z</fed:stopTime>

        </fed:scheduling>

      </fed:experimentControl>

      <fed:experimentOutput

        location="http://www.soundcity.mobi/tc/ExperimentServer/store/"

      ></fed:experimentOutput>

      <fed:queryControl>

        <prt:query-request>

          <query><![CDATA[

                        # [1 / 1] visualization type: 'Gauge' and sensors

                        Prefix ssn: <http://purl.oclc.org/NET/ssnx/ssn#>

                        Prefix iotlite: <http://purl.oclc.org/NET/UNIS/fiware/

                                           iot-lite#>

                        Prefix dul:

                             <http://www.loa.istc.cnr.it/ontologies/DUL.owl#>

                        Prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>

                        Prefix time: <http://www.w3.org/2006/time#>

                        Prefix m3-lite: <http://purl.org/iot/vocab/m3-lite#>

                        Prefix xsd: <http://www.w3.org/2001/XMLSchema#>

                        select ?s ?tim ?val

                        where {

                            ?o a ssn:Observation.

                            ?o ssn:observedBy ?s.  

                            ?o ssn:observedProperty ?qk.

                            Values ?qk {m3-lite:Sound

                                       m3-lite:SoundPressureLevelAmbient}

                            ?o ssn:observationSamplingTime ?t.

                            ?o geo:location ?point.

                            ?point geo:lat "4.346104E1"^^xsd:double.

                            ?point geo:long "-3.80649E0"^^xsd:double.

                            ?t time:inXSDDateTime ?ti.

                            ?o ssn:observationResult ?or.

                            ?or  ssn:hasValue ?v.

                            ?v dul:hasDataValue ?val. 

                        } group by (?s) ?tim ?val

                    ]]></query>

        </prt:query-request>

      </fed:queryControl>

    </fed:FISMO>

    <fed:FISMO name="3rdUseCase">

      <fed:description>Over time noise observations for a

                 given bounding box (time period in scheduling)</fed:description>

      <fed:discoverable>true</fed:discoverable>

      <fed:experimentControl>

        <fed:scheduling>

          <fed:startTime>2016-11-08T18:50:00.0Z</fed:startTime>

          <fed:Periodicity>250</fed:Periodicity>

          <fed:stopTime>2017-11-08T18:49:59.0Z</fed:stopTime>

        </fed:scheduling>

      </fed:experimentControl>

      <fed:experimentOutput

        location="http://www.soundcity.mobi/tc/ExperimentServer/store/"

      ></fed:experimentOutput>

      <fed:queryControl>

        <prt:query-request>

          <query><![CDATA[

                        # [1 / 1] visualization type: 'Gauge' and sensors

                        Prefix ssn: <http://purl.oclc.org/NET/ssnx/ssn#>

                        Prefix iotlite:

                          <http://purl.oclc.org/NET/UNIS/fiware/iot-lite#>

                        Prefix dul:

                          <http://www.loa.istc.cnr.it/ontologies/DUL.owl#>

                        Prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>

                        Prefix time: <http://www.w3.org/2006/time#>

                        Prefix m3-lite: <http://purl.org/iot/vocab/m3-lite#>

                        Prefix xsd: <http://www.w3.org/2001/XMLSchema#>

                        select ?s (max(?ti) as ?tim) ?val ?lat ?long

                        where {

                            ?o a ssn:Observation.

                            ?o ssn:observedBy ?s.  

                            ?o ssn:observedProperty ?qk.

                            Values ?qk {m3-lite:

                                  Sound m3-lite:SoundPressureLevelAmbient}

                            ?o ssn:observationSamplingTime ?t.

                            ?o geo:location ?point.

                            ?point geo:lat ?lat.

                            ?point geo:long ?long.

                            ?t time:inXSDDateTime ?ti.

                            ?o ssn:observationResult ?or.

                            ?or  ssn:hasValue ?v.

                            ?v dul:hasDataValue ?val.

                            {

                                select  (max(?dt)as ?ti) ?s        

                                where {

                                    ?o a ssn:Observation.

                                    ?o ssn:observedBy ?s.  

                                    ?o ssn:observedProperty ?qk.

                                    Values ?qk {m3-lite:Sound

                                        m3-lite:SoundPressureLevelAmbient}

                                    ?o ssn:observationSamplingTime ?t.

                                    ?t time:inXSDDateTime ?dt.

                                }group by (?s)

                            }

                            FILTER (

                               (xsd:double(?lat) >= "-90"^^xsd:double)

                            && (xsd:double(?lat) <= "90"^^xsd:double)

                            && ( xsd:double(?long) >= "-180"^^xsd:double) 

                            && ( xsd:double(?long) <= "180"^^xsd:double)

                            ) 

                        } group by (?s) ?tim ?val ?lat ?long

                    ]]></query>

        </prt:query-request>

      </fed:queryControl>

    </fed:FISMO>

    <fed:FISMO name="4thUseCase">

      <fed:description>3rd usecase with noise more than x dB(A)</fed:description>

      <fed:discoverable>true</fed:discoverable>

      <fed:experimentControl>

        <fed:scheduling>

          <fed:startTime>2016-11-08T18:50:00.0Z</fed:startTime>

          <fed:Periodicity>250</fed:Periodicity>

          <fed:stopTime>2017-11-08T18:49:59.0Z</fed:stopTime>

        </fed:scheduling>

      </fed:experimentControl>

      <fed:experimentOutput

        location="http://www.soundcity.mobi/tc/ExperimentServer/store/"

      ></fed:experimentOutput>

      <fed:queryControl>

        <prt:query-request>

          <query><![CDATA[

                        # [1 / 1] visualization type: 'Gauge' and sensors

                        Prefix ssn: <http://purl.oclc.org/NET/ssnx/ssn#>

                        Prefix iotlite:

                            <http://purl.oclc.org/NET/UNIS/fiware/iot-lite#>

                        Prefix dul:

                          <http://www.loa.istc.cnr.it/ontologies/DUL.owl#>

                        Prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>

                        Prefix time: <http://www.w3.org/2006/time#>

                        Prefix m3-lite: <http://purl.org/iot/vocab/m3-lite#>

                        Prefix xsd: <http://www.w3.org/2001/XMLSchema#>

                        select ?s (max(?ti) as ?tim) ?val ?lat ?long

                        where {

                            ?o a ssn:Observation.

                            ?o ssn:observedBy ?s.  

                            ?o ssn:observedProperty ?qk.

                            Values ?qk

                                 {m3-lite:Sound m3-lite:SoundPressureLevelAmbient}

                            ?o ssn:observationSamplingTime ?t.

                            ?o geo:location ?point.

                            ?point geo:lat ?lat.

                            ?point geo:long ?long.

                            ?t time:inXSDDateTime ?ti.

                            ?o ssn:observationResult ?or.

                            ?or  ssn:hasValue ?v.

                            ?v dul:hasDataValue ?val.

                            {

                                select  (max(?dt)as ?ti) ?s        

                                where {

                                    ?o a ssn:Observation.

                                    ?o ssn:observedBy ?s.  

                                    ?o ssn:observedProperty ?qk.

                                    Values ?qk {m3-lite:Sound

                                         m3-lite:SoundPressureLevelAmbient}

                                    ?o ssn:observationSamplingTime ?t.

                                    ?t time:inXSDDateTime ?dt.

                                }group by (?s)

                            }

                            FILTER (

                               (xsd:double(?lat) >= "-90"^^xsd:double)

                            && (xsd:double(?lat) <= "90"^^xsd:double)

                            && ( xsd:double(?long) >= "-180"^^xsd:double) 

                            && ( xsd:double(?long) <= "180"^^xsd:double)

                            )  

                            FILTER(?val>="75"^^xsd:double)

                        } group by (?s) ?tim ?val ?lat ?long

                    ]]></query>

        </prt:query-request>

      </fed:queryControl>

    </fed:FISMO>

    <fed:FISMO name="5thUseCase">

      <fed:description>3rd usecase with noise less than x dB(A)</fed:description>

      <fed:discoverable>true</fed:discoverable>

      <fed:experimentControl>

        <fed:scheduling>

          <fed:startTime>2016-11-08T18:50:00.0Z</fed:startTime>

          <fed:Periodicity>250</fed:Periodicity>

          <fed:stopTime>2017-11-08T18:49:59.0Z</fed:stopTime>

        </fed:scheduling>

      </fed:experimentControl>

      <fed:experimentOutput

        location="http://www.soundcity.mobi/tc/ExperimentServer/store/"

      ></fed:experimentOutput>

      <fed:queryControl>

        <prt:query-request>

          <query><![CDATA[

                        # [1 / 1] visualization type: 'Gauge' and sensors

                        Prefix ssn: <http://purl.oclc.org/NET/ssnx/ssn#>

                        Prefix iotlite:

                            <http://purl.oclc.org/NET/UNIS/fiware/iot-lite#>

                        Prefix dul:

                             <http://www.loa.istc.cnr.it/ontologies/DUL.owl#>

                        Prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>

                        Prefix time: <http://www.w3.org/2006/time#>

                        Prefix m3-lite: <http://purl.org/iot/vocab/m3-lite#>

                        Prefix xsd: <http://www.w3.org/2001/XMLSchema#>

                        select ?s (max(?ti) as ?tim) ?val ?lat ?long

                        where {

                            ?o a ssn:Observation.

                            ?o ssn:observedBy ?s.  

                            ?o ssn:observedProperty ?qk.

                            Values ?qk {m3-lite:Sound

                                   m3-lite:SoundPressureLevelAmbient}

                            ?o ssn:observationSamplingTime ?t.

                            ?o geo:location ?point.

                            ?point geo:lat ?lat.

                            ?point geo:long ?long.

                            ?t time:inXSDDateTime ?ti.

                            ?o ssn:observationResult ?or.

                            ?or  ssn:hasValue ?v.

                            ?v dul:hasDataValue ?val.

                            {

                                select  (max(?dt)as ?ti) ?s        

                                where {

                                    ?o a ssn:Observation.

                                    ?o ssn:observedBy ?s.  

                                    ?o ssn:observedProperty ?qk.

                                    Values ?qk {m3-lite:Sound

                                         m3-lite:SoundPressureLevelAmbient}

                                    ?o ssn:observationSamplingTime ?t.

                                    ?t time:inXSDDateTime ?dt.

                                }group by (?s)

                            }

                            FILTER (

                               (xsd:double(?lat) >= "-90"^^xsd:double)

                            && (xsd:double(?lat) <= "90"^^xsd:double)

                            && ( xsd:double(?long) >= "-180"^^xsd:double) 

                            && ( xsd:double(?long) <= "180"^^xsd:double)

                            )  

                            FILTER(?val<="45"^^xsd:double)

                        } group by (?s) ?tim ?val ?lat ?long

                    ]]></query>

        </prt:query-request>

      </fed:queryControl>

    </fed:FISMO>

  </fed:FEMO>

</fed:FEDSpec>