Back to Main Page, Next: Mobility in Publish/Subscribe Systems

DataFlowSpecExample

This shows a part of an application's data flow specification, which specifies the views and queries used by the tasks. Task MonitorTempHandler, defines a view MonitorTempView and a query over another view (TempSensorView). Similarly, TempSensorHandler defines the view TempSensorView. The common view (TempSensorView) specifies a data flow between the MonitorTempHandler and TempSensorHandler tasks.


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.

Page last modified on September 09, 2006, at 09:09 PM