|
Main /
DataFlowSpecExampleThis shows a part of an application's data flow specification, which
specifies the views and queries used by the tasks.
Task ![]() By using intersecting views and queries, a data flow is created between the two handlers.
TASK TempSensorHandler
USES VIEW TempSensorView
TASK MonitorTempHandler
USES VIEW MonitorTempView
FOREACH SELECT * FROM TempSensorView
TASKRUN MonitorTempHandler
CREATE VIEW TempSensorView AS
SELECT * FROM sensors
WHERE a_arealocation NOT NULL AND
a_temp_sensor_sample > 0
CREATE VIEW MonitorTempView AS
SELECT * FROM sensors
WHERE a_arealocation NOT NULL AND
a_rich_sensor_command = 1
In general, data flows between any number of tasks can be created in this way. By inserting tuples into a view, a task sends data to all tasks who have queries over that view. Receiving a tuple triggers execution of the corresponding tasks. |