Middleware in Wireless Sensor Networks

Download Report

Transcript Middleware in Wireless Sensor Networks

Middleware for Wireless Sensor Networks
By H. Momeni
Middleware for Wireless Sensor Network
Goals
• The purpose of this presentation is:
– find out the challenges with sensor
network
– Comparative investigation of several
middlewares
– Point out the limitations of present
generation of middleware
Page 2 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
Definition
•
Bridges the gap between applications
and low-level constructs to facilitate
the work of application developer and
Hides complexity of a distributed
system from user and developers
Page 3 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
Common Architecture
Application
Application
Middleware
Middleware
Network
Operating system
Operating system
Hardware
Hardware
Page 4 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
The original goals of middleware
• masking heterogeneity
– networks, end-systems, OSs, programming languages
• providing a useful distributed programming model
• Providing Generic services
• transparency
CORBA, Java RMI, etc. have been very successful in this...
business applications; legacy systems...
Page 5 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
So, let’s apply the middleware concept more
widely...
•
•
applications
–
–
–
–
–
eCommerce,
real-time, embedded
mobile agent systems
peer to peer platforms
mobile computing applications
–
–
–
–
–
PCs/ workstations
wireless PDAs
embedded devices
network processors
wireless, sensor, infrared etc. networks
underlying systems
Page 6 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
A victim of its own success?
• Provides different services:
– transactions, fault-tolerance, persistence, load balancing,
logging, real-time, …  complexity and unmanageability
• prototypes arise to fill the gaps
– asynchronous middleware, web services, mobility middleware,
real-time/ multimedia middleware, …  muddleware
• Heavyweight (Complexity in computation and storage)
Page 7 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
middleware Challenges for WSN
1. Abstraction Support
 Large number of heterogeneous sensors
2. Data Fusion
 Various collected data
 communication this data
3. Resource Constraints (lightweight)
 Energy, Memory
4. Dynamic Topology, Environment, Application
 Node mobility, node failure, communication failure
Page 8 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
middleware Challenges …. (continued)
5.
Application Knowledge


No generalized middleware duo to limited resource
Integrate application knowledge into the services provided
Programming Paradigm
7. Adaptability
8. Scalability
9. Security
10. QoS Support
6.
Page 9 Of 49
Locality transparency
or context
awareness?
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
Architecture
Administration Terminal
boot, logging
Sensor Network Application
Distributed Middleware
Node A
Node C
Node B
Middleware
Middleware
Middleware
Operating System
Operating System
Operating System
Hardware
Hardware
Hardware
Page 10 Of 49
Iran University of Science and Technology
systemwide
interfaces
customized
node‘s software
different node
hardware
November 2006
Middleware for Wireless Sensor Network
Architecture
Host Middleware
Modules
Algorithms
Services
VM
Middleware Management
Operating System
Dynamic components
Internal interface
(generic middleware)
Sensor Driver
Sensor application
CPU
Page 11 Of 49
Sensor
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
Architecture
Page 12 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
Approaches
1.
Virtual Machine-based


2.
Database-based



3.
contains VM, interpreter,
Mate, Magnet
Virtual Database
easy to use interface
TinyDB, Cougar, SINA, Dsware
Modular programming


decomposition of application
Impala, Agilla
Page 13 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
Approaches …
4.
Application Driven


5.
Message oriented


6.
use publish-subscribe mechanism
Mire
Event oriented

7.
tune network on the basis of Requirement
MiLAN
Request-reply, Garnet
Service oriented

Reflective, Flexible, Service-centric, Service oriented
Page 14 Of 49
Iran University of Science and Technology
November 2006
Impala
Middleware for Wireless Sensor Network
Impala
Zebranet project (long term migration study of wildlife)
• event based programming model
•
CPU, Memory,
Wireless Transceiver
GPS
Data
Peer-to-Peer
communication
Protocol
Data
Data
Page 16 Of 49
Iran University of Science and Technology
Base Station
(car or plane)
November 2006
Middleware for Wireless Sensor Network
Impala Features
•
•
•
•
•
Code modularity
application adaptability and update
Fault tolerance
energy efficiency
long deployment time
Applications
Impala
Device Software
Not data fusion
• not heterogeneity
•
Device Hardware
External
Updates
Page 17 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
Impala Architecture
Application A Application B Application C Application D
Initialize
Query
Terminate
Application
Updater
Packet
Send Done
Data
Timer
Application
Adapter
Event Filter
Device Event
Packet Event
Send Done Event
Page 18 Of 49
Iran University of Science and Technology
Data Event
Timer Event
November 2006
Mate
Middleware for Wireless Sensor Network
Mate
Virtual Machine on top of TinyOs
• Stack-based architecture
• Break down the program
into small self-replication
capsules(24 instructions)
• Capsules are self-forwarding
and self-propagation
•
Page 20 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
Mate Features
•
•
•
•
•
Simple programming model
Small and concise model
High security
high energy consumption
Not flexible to support wide range of applications
Page 21 Of 49
Iran University of Science and Technology
November 2006
TinyDB
Middleware for Wireless Sensor Network
TinyDB
• query processing
• Multiple concurrent queries
• Network monitoring (via queries)
• Extensible framework for attributes,
commands and aggregates
Page 23 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
Sensor table
Page 24 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
Example
Page 25 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
TinyDB Features
reduce number of messages
• Nice abstraction model
• good aggregation model
•
•
Not much functionality
Page 26 Of 49
Iran University of Science and Technology
November 2006
Agilla
Middleware for Wireless Sensor Network
Agilla
Mobile agent base and Stack-based Architecture
• move agent from one node to another
• Two instruction to move (clone, move)
• up to 4 agents can run on a node
•
(3,3)
(3,1)
(3,2)
(2,2)
clone to (3,3)
clone to (3,1)
(1,1)
Page 28 Of 49
Fire Detection
Agent
Iran University of Science and Technology
(1,3)
November 2006
Middleware for Wireless Sensor Network
Agilla Architecture
Node @ (2,1)
Node @ (1,1)
Agents
Agents
migrate
Neighbor
List
Tuplespace
remote
access
Tuplespace
Neighbor
List
Middleware Services
Middleware Services
Agilla Middleware
Agilla Middleware
TinyOS
TinyOS
Page 29 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
The tuple space is local and is shared by the agents residing on the
node.
• The neighbor list contains the address of all one-hop nodes
• Agents can migrate carrying their code and state, but do not carry
their own tuple spaces.
• Agilla tuple spaces offer a shared memory model
•
Page 30 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
Agilla Features
•
•
•
•
•
low energy consumption
Increase flexibility
reduce code size
low security
difficult to read and maintain programs
Page 31 Of 49
Iran University of Science and Technology
November 2006
MiLAN
Middleware for Wireless Sensor Network
MiLAN
•
MiLAN is designed for personal health monitor application
High respiratory rate
Low blood pressure
0.8
Blood
Pressure 0.8
Respiratory
Rate
0.3 Blood O2
Blood O2 0.7
Heart
Rate
0.3
0.8
Heart
Rate
0.3
Blood
O2
1.0
0.3
Blood
Pressure
Normal Heart Rate
Page 33 Of 49
ECG
Diagram
Iran University of Science and Technology
High Heart Rate
November 2006
Middleware for Wireless Sensor Network
MiLAN
goals: - maximizing application lifetime - providing application QoS
• MiLAN receives a description of application requirements through
specialized graphs
• MiLAN sits on top of multiple physical networks
• convert commands to protocol-specific commands that are passed
through the usual network protocol stack
•
Page 34 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
MiLAN Architecture
Page 35 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
MiLAN Architecture
Page 36 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
QoS Support
• The QoS of the different variables depends on which
sensors provide data to the application
• application performance can be described by the QoS of
different variables of interest to the application
• variables such as blood pressure, respiratory rate, and
heart rate may be determined based on measurements
obtained from any of several sensors
Page 37 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
• MiLAN must know:
– The variables of interest to the application
– The required QoS for each variable
– The level of QoS that data from each sensor or set of sensors
can provide for each variable
Blood
pressure
Heart
rate
1.0
0.7
Blood
pulse
1.0
Blood
press
Page 38 Of 49
0.8
Blood
flow
0.7
1.0
0.7
Pulse
oxy
ECG
Blood
press
Iran University of Science and Technology
0.8
Blood
flow
0.7
Pulse
oxy
November 2006
Mire
Middleware for Wireless Sensor Network
Mire
•
•
•
•
•
publish/subscribe middleware
Provides high-level API that facilitates the development
implement a data aggregation service
Supplier publishes a message and forward to one or more
subscribers
Key elements is notification service and buffer
Page 40 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
Mire (continued)
•
•
Notification service informs subscribers when messages
arrive
The communication between nodes has 3 phases
1.
2.
3.
•
•
nodes in the network advertise their available topics (ec.
temperature)
the advertised messages are routed to the sink node
user application connected to the sink node is able to select
(i.e., subscribe) the desired advertised topics to be monitored
subscribe messages are broadcasted down to the
network nodes
nodes are able to publish their collected data to the
network
Page 41 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
Mire Architecture
Node
NodeApplication
Application
MIRES
Routing
Routing
Aggregation
Service
Service1
Service
ServiceNN
Publish/subscribe service
Sensors
Page 42 Of 49
Operating System
CPU
Radio
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
Publish subscribe service
Page 43 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
Topic advertisement sequence diagram
Page 44 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
Topic subscription sequence diagram
Page 45 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
Data publishing sequence diagram
Page 46 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
Aggregation service in Mire
Data is aggregated in order to reduce the number of transmission
In this service each Node perform aggregation
A. S. can be configured during the subscribe process
Aggregation function & aggregation policy
Page 47 Of 49
Iran University of Science and Technology
November 2006
Middleware for Wireless Sensor Network
Features
Power
awareness
Openness
Scalability
Mobility
Heterogeneity
Ease of use
Mate
Full
Full
Full
Full
Partial
Little or none
Magnet
Full
Full
Full
Full
Partial
Full
Cougar
Partial
Little or None
Little or None
Little or None
Little or None
SINA
Full
Little or None
Little or None
Little or None
Little or None
DSWare
Full
Partial
Partial
Little or None
Little or None
TinyDB
Full
Partial
Partial
Partial
Partial
Modular
Impala
Full
Full
Full
Full
Application
MILAN
Partial
Full
Full
Message
Mires
Full
Full
Full
Approaches
VM
DB
Page 48 Of 49
Little or None
Little or None
Little or None
Partial
Partial
Iran University of Science and Technology
Full
Full
Full
Full
Full
Full
Full
November 2006
Middleware for Wireless Sensor Network
Conclusion
There is not a method and tool to analysis and evaluation of
Middleware in WSN
current middlewares can not be used for Real time applications
most of QoS Features can be apply to middleware specially
dependability
•
•
•
–
–
–
Reliability
Achievability
Safety
Page 49 Of 49
Iran University of Science and Technology
November 2006