Top Banner
1 Middleware for Wireless Sensor Networks Présenté par Andrei Marculescu
46

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

Dec 26, 2015

Download

Documents

Samuel Maxwell
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 Middleware for Wireless Sensor Networks Présenté par Andrei Marculescu.

1

Middleware forWireless Sensor Networks

Présenté par Andrei Marculescu

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

2

Plan

• Middleware

• Middleware for WSN

• Overview of current approaches

• Classification

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

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

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

4

Middleware – services view (1)

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

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

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

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

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

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

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

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

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

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

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)

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

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

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

11

Middleware – abstraction view (6)

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

• Autonomy• Flexibility• Code Mobility

• Examples– JADE

+ All(complex, dynamic systems)

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

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

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

13

Plan

• Middleware

• Middleware for WSN

• Overview of current approaches

• Classification

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

14

Middleware for WSN (1)

• Data-centric querying and processing

• Localized algorithms

• Limited resources

• Dynamic network

• Application knowledge

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

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 ?

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

16

Plan

• Middleware

• Middleware for WSN

• Overview of current approaches

• Classification

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

17

Current Approaches

• Impala

• Maté

• Querying – TinyDB– SQTL

• Sensor Querying and Tasking Language

• Generic Role Assignment

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

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

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

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

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

20

Impala – system architecture

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

21

Impala – adaptability

• Routing protocols switching– History-based– Flooding

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

22

Current Approaches

• Impala

• Maté

• Querying – TinyDB– SQTL

• Sensor Querying and Tasking Language

• Generic Role Assignment

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

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

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

24

Maté – execution model

Shared variable

Code capsulesExecution contexts

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

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

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

26

Maté – example

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

27

Current Approaches

• Impala

• Maté

• Querying – TinyDB– SQTL

• Sensor Querying and Tasking Language

• Generic Role Assignment

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

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 ?

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

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

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

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

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

31

SQTL - overview

• Meta-language for messages – SQTL Wrapper

• New querying and tasking language– SQLT

• Sensor execution environment – SEE

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

32

SQLT Wrapper (1)

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

Languageindependent

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

33

SQLT Wrapper (2)

• Example

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

)

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

34

SQTL language (1)

• Lightweight object oriented language

• Event handling primitives (upon)

• Communication primitives (tell, receive)

• Sensor access primitives (getTempSensor())

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

35

SQTL language (2)

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

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

36

SEE

• Message demultiplexing

• Concurrent execution of several applications

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

37

Current Approaches

• Impala

• Maté

• Querying – TinyDB– SQTL

• Sensor Querying and Tasking Language

• Generic Role Assignment

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

38

Generic Role Assignment (GRA)

• Self-organizing network– Nodes

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

– Developer• Implement role specifications

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

39

GRA – status evaluation

• Based on a property directory (cache)

• One directory on each node

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

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

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

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

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

42

Plan

• Middleware

• Middleware for WSN

• Overview of current approaches

• Classification

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

43

Classification (1)

• New important programming abstraction– Cluster based

• Distributed VM

• Service Oriented VM

Cluster based SO

Maté

Impala

TinyDBSQTL

GRA

Hood

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

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

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

45

Questions ?

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

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