Title: DSL
1DPL
DSL
RUN_QUERY
ADT
Generate SQL
DPL_PROXY
STREAM_QUERY_PROCESSOR
Stream
SensorML
SensorML
SCL
BROKER Makes the connection between sensors
sets up stream DPL
PARSER
Sensor Clusters
SensorML
Network Topology Generator
2DSL
ID CRANE_WARNING DESCRIPTION Show warning if
the user is in danger zone of crane
operation. Range 100 feet Period 5 seconds
Welcome Worker Site Safety Services Crane
Arm Warning Other Warning
void main() display.show (No
warning!....) / makes
it non blocking / New Thread (
DPL_Proxy (CRANE_WARNING, range, period )
).run()
Thread DPL_Proxy void run()
/ loops until the user stops the
service using menu / while (true)
/ if in danger zone the method will throw
exception and msg /
try DPL.RunQuery(CRANE_WARNING,
range, period) )
catch ( Exception ex) display.show
(WARNING!! ex.Message.toString( ) )
Exception might not be a good idea. May be pull
based approach would be better.
3DPL
RunQuery ( Params ) throws Exception //
multiple steps
ADT // Objects 1. Crane //
properties Crane_Base_Location 2. Crane_Arm
extends Crane // properties Crane_Arm_Location
Crane_Arm_Direction 3.
Other // properties
prop1 prop2 4. Self //properties
My_Location 5. 6.
Step1 Create instance of objects Crane and Self
in memory based on parameters.
Step2 Generate SQL depending on the parameters
and available ADT. For example, SELECT
CRANE_ARM_LOCATION FROM SCL WHERE
DIFF ( MY_LOCATION, CRANE_ARM_LOCATION) lt 100
EVERY 5 SECONDS Step3
Input the SQL to Stream_Query_Processor
Step7 If ( ! Stream_Query_Processor.output
.IsEmpty( ) ) / crane found within range
/ throw Exception (Crane within range
positioned Stream_Query_Processor.output)
Stream_Query_Processor
4DPL
- Stream_Query_Processor
- Step4
- Create a query plan.
- Try to push as many operators down to the sensor
network layer. - For example, in our sample query we can push the
simple WHERE condition down to Crane sensor
through SCL layer.
Step5 Convert the query to SensorML and send it
to SCL and wait for input streams. Follow
multithreaded server idea. For every stream SCL
discovers it will directly set up a connection
between sensor and DPL. For example, While
(true) Listen( ) // always listen to
default port //create another dynamic
port and set up separate // connection
new Thread Stream( ). Run( )
stream1 stream2.st3
Step6 Buffer the incoming stream connections and
apply operators needed. Send the
output to Step7 of DPL (i.e. previous page).
5SCL
1. Parse the SensorML. Get My_Position, Range
and Period to use for in-network processing. 2.
Get sensor type.
3. Update the sensor network topology
dynamically. The network might be changing or the
user might be moving. 4. If we think of the
network as a table, we could see at any given
time LEAD_SENSOR SENSOR_TYPE
PORT ---------------------------------------------
---------------------------------------- CR1
CRANE 123 CR2
CRANE
243 OT1 OTHER
555 5. Select the sensors that
match the sensor type from the input query. 6.
Generate SensorML query with specific information
regarding the network and setup streams between
DPL Stream_Query_Processor and sensors. For
example, this will generate two streams. (i.e.
CR1123 and CR2243)
Use the filter condition In-network. Send
streams that satisfy condition Diff (My_pos,
crane_pos) lt 100
Sensor Clusters