Research Article

A Multidomain Standards-Based Fog Computing Architecture for Smart Cities

Listing 2

Example of CEP configuration using ESPER Event Processing Language (Esper EPL). The configuration gist creates a notification event when the average pressure reported by a gas sensor is greater than 70 bar in a time window of 10 minutes. Note that the configuration is based on the context attributes of the context entity representing a gas pipeline sensor presented in Listing 1.
"statements":
"INSERT INTO GasAlert
SELECT avg(pressure) as pressure, gas_velocity, gas_density, location
FROM gas_pipeline_sensor.win:time(10 min) HAVING avg(pressure) > 70"