1 Middleware for Wireless Sensor Networks Présenté par Andrei Marculescu.

Post on 26-Dec-2015

217 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

Transcript

1

Middleware forWireless Sensor Networks

Présenté par Andrei Marculescu

2

Plan

• Middleware

• Middleware for WSN

• Overview of current approaches

• Classification

3

Middleware – definition (1)

• Context : – Distributed systems

• Goal :– Help manage complexity and heterogeneity

• Location :– Layer between the OS and the application program

• OS vs Middleware :– OS makes a hardware useable– Middleware makes a distributed system programmable

4

Middleware – services view (1)

• Middleware can be classified in terms of the services provided to applications

5

Middleware – services view (2)

• Type of services– Presentation Services

• Graphics, forms, printing services– Computation Services

• Sorting, math services, time services– Information Services

• Directories, log management, shared data– Communication Services

• Messaging, procedure calls– Control Services

• Transaction, thread management, job scheduling– System Services

• Event notification, software installation, authentication

6

Middleware – abstraction view (1)

• Distributed Tuples– Shared tuple space– Processes post and read tuples

• Unaware of each other’s identities

• Examples– Distributed relational databases– Linda (Yale University)– Jini (Sun)

+ Information, Control

7

Middleware – abstraction view (2)

• Remote Procedure Call (RFC 1831)– Possibility to invoke a procedure whose body

is accros a network

• Example– Sun’s RPC

+ Communication

8

Middleware – abstraction view (3)

• Message-oriented middleware– Message passing and/or queuing

• Synchronous vs asynchronous

– Facilitates communication between distributed applications

• Example– IBM’s WebSphere MQ

+ Communication

9

Middleware – abstraction view (4)

• Distributed Object Middleware– Remote object, whose methods can be

invoked like local methods

• Examples– CORBA (Common Object Request Broker

Architecture)– Java RMI (Remote Method Invocation)– .NET (Remote)

+ Communication (Computation) Control, Information, System? Presentation (.NET)

10

Middleware – abstraction view (5)

• Service Oriented Middleware– Services become a programming abstraction

• Semantically described

– Existing services are available through Service directories

– New services are available through dynamic service composition

• Examples– Web Services (WSDL) + Information, Communication,

Computation

11

Middleware – abstraction view (6)

• Agent Oriented Middleware– Agents are the programming abstraction– Keywords

• Autonomy• Flexibility• Code Mobility

• Examples– JADE

+ All(complex, dynamic systems)

12

Middleware - conclusions

• Existing approaches are adapted to distributed systems

• Middlewares tend to provide more and more services– Universal tools– Heavy environments

• Exceptions exist : CORBA for embedded systems

– Agents are used only for a restricted class of problems

13

Plan

• Middleware

• Middleware for WSN

• Overview of current approaches

• Classification

14

Middleware for WSN (1)

• Data-centric querying and processing

• Localized algorithms

• Limited resources

• Dynamic network

• Application knowledge

15

Middleware for WSN (2)

• New programming abstractions– Cluster-based

• Resource-aware software– Adaptive

• Application-aware middleware– Quality of service

• Lightweight software– More tightly coupled to the OS ?

16

Plan

• Middleware

• Middleware for WSN

• Overview of current approaches

• Classification

17

Current Approaches

• Impala

• Maté

• Querying – TinyDB– SQTL

• Sensor Querying and Tasking Language

• Generic Role Assignment

18

Impala – overview (1)

• Designed for ZebraNet project– mobile sensor network– deployment, management and communications

problems

• ZebraNet HW– 32KHz – 8MHz CPU => 9.6 – 19.32 mW– 8MHz GPS receiver => 568 mW– 8MHz radio xmit => 780 mW– 8MHz radio rcv => 312 mW– 1 – 8 MB non-volatile storage

19

Impala – overview (2)

• Classical approach– Service oriented

• Deployment (on-the-fly software updates)• Thread management (application switching)• Event-filtering

• Novel approach– Resource-aware, application knowledge

• Adaptative

– OS-middleware hybrid

20

Impala – system architecture

21

Impala – adaptability

• Routing protocols switching– History-based– Flooding

22

Current Approaches

• Impala

• Maté

• Querying – TinyDB– SQTL

• Sensor Querying and Tasking Language

• Generic Role Assignment

23

Maté - overview

• VM approach– Bytecode interpreter on top of TinyOS

• Fixed-size instructions (1 byte)• Fixed-size code capsules

– 24 instructions– Identifying and version information– A program can contain several capsules

• Operand stack and return address stack

– Highly optimized resource management• Memory management• Network management

24

Maté – execution model

Shared variable

Code capsulesExecution contexts

25

Maté – instruction set

• Assembly language style• Built-in high-level functions

– send instruction• Default routing protocol : send• Possible extensions : sendr

– code broadcast : forw – Logging : log / logr – Shared variable access : gets / sets– Sensing

26

Maté – example

27

Current Approaches

• Impala

• Maté

• Querying – TinyDB– SQTL

• Sensor Querying and Tasking Language

• Generic Role Assignment

28

TinyDB - overview

• High-level querying– Well-known declarative language– Hides the network

• One virtual table with nodes as rows• Every node attribute represents a column

– TinySQL language

• No neighborhood management– Global spanning tree for queries– Requests are flooded to all nodes

Scalability, efficiency ?

29

TinyDB - example

SELECT AVERAGE(temp)

FROM SENSORS

WHERE TEMP > 20

TRIGGER ACTION SetSnd(512)

EPOCH DURATION 512 Repeat query every 512 ms

Trigger sound During query

Single table

30

SQTL - overview

• Distributed querying design– Queries are injected into the network– Some queries need coordination – Queries are processed locally by sensor

nodes

• Distributed tasking capabilities– Collaborative work

• Moving vehicle detection

31

SQTL - overview

• Meta-language for messages – SQTL Wrapper

• New querying and tasking language– SQLT

• Sensor execution environment – SEE

32

SQLT Wrapper (1)

• Message => (action (:param value)+)

Languageindependent

33

SQLT Wrapper (2)

• Example

(execute:sender FRONTEND:receiver (:group NODE(1) :criteria TRUE):application-id 123:language SQTL:content(// SQLT code here)

)

34

SQTL language (1)

• Lightweight object oriented language

• Event handling primitives (upon)

• Communication primitives (tell, receive)

• Sensor access primitives (getTempSensor())

35

SQTL language (2)

• Example : SELECT Max(getTemperature()) FROM ALL_NODES

36

SEE

• Message demultiplexing

• Concurrent execution of several applications

37

Current Approaches

• Impala

• Maté

• Querying – TinyDB– SQTL

• Sensor Querying and Tasking Language

• Generic Role Assignment

38

Generic Role Assignment (GRA)

• Self-organizing network– Nodes

• Evaluate their status• Agree on their roles assignment in the network

– Developer• Implement role specifications

39

GRA – status evaluation

• Based on a property directory (cache)

• One directory on each node

40

GRA – role specification

• Every nodes have a copy of the same role specification• Role examples

– ON / OFF (turning off redundant nodes)– CLUSTERHEAD / GATEWAY / SLAVE (improving data delivery with clustering)– SOURCE / DATA AGGREGATOR / SINK (data aggregation)

• A role specification is a list of role-rule pairsON :: {

temp-sensor == true &&battery >= threshold &&count(2 hops) {

role == ON &&dist(super.pos, pos) <= sensing-range

} <= 1 }OFF :: else

41

GRA – role assignment

• Role assignment algorithm– Triggered by property changes– Evaluates rules in the rule specification– If a rule evaluate to true, the associated role is

assigned

42

Plan

• Middleware

• Middleware for WSN

• Overview of current approaches

• Classification

43

Classification (1)

• New important programming abstraction– Cluster based

• Distributed VM

• Service Oriented VM

Cluster based SO

Maté

Impala

TinyDBSQTL

GRA

Hood

44

Classification (2)

• Two levels of middleware– « external »

• Global Internet view– Identify services provided by a sensor network

– « internal »• Programmer’s view

– Identify abstractions that facilitate network programming

• Ex. TinyDB tries to merge these two levels

45

Questions ?

46

BibliographieP. A. Bernstein. Middleware: a model for distributed system services. Communications of the ACM, 39(2):86--

98, 1996

K. Römer, O. Kasten, F. Mattern, "Middleware challenges for wireless sensor networks", Mobile Computing and Communications Review, vol. 6, no. 2, 2002

T. Liu and M. Martonosi. Impala: A Middleware System for Managing Autonomic, Parallel Sensor Systems. In ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming (PPoPP), June 2003

P. Levis and D. Culler. Mate: A Tiny Virtual Machine for Sensor Networks. In Proceedings of the 10th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS-X), Oct. 2002

C. Jaikaeo, C. Srisathapornphat, and C.-C. Shen, "Querying and Tasking in Sensor Networks," SPIE's 14th Annual Int'l. Symp. Aerospace/Defense Sensing, Simulation, and Control, Orlando, FL, Apr. 2000

Frank, C. and Römer, K. 2005. Algorithms for generic role assignment in wireless sensor networks. In Proceedings of the 3rd international Conference on Embedded Networked Sensor Systems (San Diego, California, USA, November 02 - 04, 2005). SenSys '05. ACM Press, New York, NY, 230-242.

Terfloth, K., Schiller, J.: "Driving Forces behind Middleware Concepts for Wireless Sensor Networks". Submitted - under review, April 2005

Kamin Whitehouse, Cory Sharp, Eric Brewer, and David Culler. Hood: a neighborhood abstraction for sensor networks. In MobiSYS '04: Proceedings of the 2nd international conference on Mobile systems, applications, and services, pages 99--110. ACM Press, 2004

top related