-
Notifications
You must be signed in to change notification settings - Fork 2
Streaming MASSIF Prototypes
Streaming MASSIF Prototypes allows to easily create RDF Stream Processing (RSP) and Stream Reasoning (SR) applications. The GUI can be accessed on HTTP://localhost:90000/.
To demonstrate the features of Streaming MASSIF Prototypes we build an RSP application step-by-step that loads a traffic data stream from the City Bench benchmark. We will investigate the intermediate results to verify the various processing steps.
GOAL: detect when traffic is increasing from a high traffic count to a very high traffic count.
Demo step:
- Define a Source to read the traffic stream (we will read it from file with a timeout of 1 second between events).
- Investigate the data in the stream.
- Map the data to the semantic model (we will use the SSN ontology).
- As we are only interested in high to very high vehicle counts, we want to filter out any event that is not a vehicle count event and has a count below 10.
- We want to abstract the high and very high vehicle count observations.
- These abstractions can then be used to detect temporal patterns.
Start Streaming MASSIF and go to HTTP://localhost:90000/. You can start building your own processing graph or load the minimal configuration below by clicking the Load button on top and copy the configuration into the text window.
{
"configuration":{
"0":[
"1"
],
"1":[
"2"
],
"2":[
"3"
],
"3":[
"4"
],
"4":[
]
},
"components":{
"0":{
"type":"Source",
"impl":"fileSource",
"fileName":"examples/citybench/AarhusTrafficData182955.stream",
"timeout":1000
},
"1":{
"type":"Mapper",
"keepHeader":true,
"mapping":"@prefix xsd: <http://www.w3.org/2001/XMLSchema#>. \n@prefix : <http://massif/>. \n@prefix ssn: <http://purl.oclc.org/NET/ssnx/ssn#>. \n@prefix ct: <http://www.insight-centre.org/citytraffic#>.\n@prefix ses: <http://www.insight-centre.org/dataset/SampleEventService#>.\n@prefix mas: <http://massif.streaming/ontologies/rsplab/officerepository.owl#>. \n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. \n@prefix owl: <http://www.w3.org/2002/07/owl#>.\nct:hasValue rdf:type owl:DatatypeProperty .\nssn:observedProperty rdf:type owl:ObjectProperty .\nssn:observedBy rdf:type owl:ObjectProperty .\nmas:hasDiscreteValue rdf:type owl:ObjectProperty .\n:?_id a ssn:Observation ; :eventTime \"?TIMESTAMP\"^^xsd:dateTime ; ct:hasValue \"?vehicleCount\"^^xsd:int; ; ssn:observedProperty ses:vehicleCount ; ssn:observedBy ses:AarhusTrafficData186979 .\nses:vehicleCount a ct:CongestionLevel. "
},
"2":{
"type":"window",
"size":10,
"slide":1
},
"3":{
"type":"Filter",
"impl":"jena",
"ontology":"",
"queries":[
"PREFIX ct: <http://www.insight-centre.org/citytraffic#>\n\nSelect (AVG(?val) AS ?avg) WHERE{\n ?obs ct:hasValue ?val \n}"
]
},
"4":{
"type":"Sink",
"impl":"httpGetSinkCombined",
"path":"5",
"config":""
}
}
}