web services for the internet of things

23
Web Services for the Internet of Things T-106.5800 Seminar on Software Techniques (3 cr) Presentation Markku Laine, M.Sc. (Tech.) [email protected] November 3, 2011

Upload: markku-laine

Post on 08-May-2015

1.870 views

Category:

Technology


3 download

DESCRIPTION

My preliminary presentation on "RESTful Web Services for the Internet of Things". 2011. by Markku Laine, http://www.tinyurl.com/mplaine

TRANSCRIPT

Page 1: Web Services for the Internet of Things

Web Services for the Internet of Things T-106.5800 Seminar on Software Techniques (3 cr) Presentation Markku Laine, M.Sc. (Tech.) [email protected]

November 3, 2011

Page 2: Web Services for the Internet of Things

Presentation Outline

•  Internet of Things •  CoAP •  CoAP protocol stack •  Web Services for the Internet of Things •  Conclusion

2

Page 3: Web Services for the Internet of Things

Internet of Things

3

Page 4: Web Services for the Internet of Things

What is Internet of Things?

4

Source: Sensinode

(e.g., routers and servers)

(e.g., personal computers and smart phones)

(e.g., sensors)

Page 5: Web Services for the Internet of Things

Gartner’s Hype Cycle for Emerging Technologies, 2011

5

Source: Gartner

Page 6: Web Services for the Internet of Things

Challenges: How to…

•  …connect physical environments/smart objects as part of the Internet?

•  …cope with trillions of smart objects? •  …handle the problems with smart objects/small devices

as they may have difficulties in dealing with protocols and technologies designed for full-powered computers?

•  …integrate devices in constrained networks with Web applications?

6

Page 7: Web Services for the Internet of Things

Constrained Application Protocol (CoAP)

7

Page 8: Web Services for the Internet of Things

Google’s Hype Cycle for CoAP

8

CoAP v.00

Source: Google Insights for Search

Page 9: Web Services for the Internet of Things

Implementations

•  libcoap (C), open source –  http://libcoap.sourceforge.net/

•  OpenCOAP (C), open source –  https://code.google.com/p/opencoap/

•  CoAPy (Python), open source, in progress –  http://coapy.sourceforge.net/

•  Copper (Firefox addon) –  https://addons.mozilla.org/en-US/firefox/addon/copper-270430/

•  Sensinode, The Contiki OS, TinyOS, etc.

9

Page 10: Web Services for the Internet of Things

CoAP Protocol Stack

10

Page 11: Web Services for the Internet of Things

Comparison of HTTP and CoAP Protocol Stacks

11

Data Link (L2)

Payload

Application (L7)

Transport (L4)

Network (L3)

Ethernet MAC

IP

TCP

HTTP

XML

Ethernet PHY

IEEE 802.15.4 MAC

6LoWPAN

UDP

CoAP

EXI

IEEE 802.15.4 PHY Physical (L1)

Page 12: Web Services for the Internet of Things

Physical & Data Link Layers (L1 & L2): Ethernet à IEEE 802.15.4 (PHY & MAC) •  Goal: Get rid of wires •  Methods: Wireless •  Solution: IEEE 802.15.4

–  IEEE wireless standard (IEEE 802.15.4d), April 2009, http://standards.ieee.org/getieee802/download/802.15.4d-2009.pdf

–  Specifies the physical layer and media access control for low-rate wireless personal networks (LR-WPANs)

–  Low-power, low-bandwidth communication technology –  Basis for extensions, such as ZigBee

12

Page 13: Web Services for the Internet of Things

Network Layer (L3): IP à 6LoWPAN •  Goal: Integrate Wireless Sensor Networks (WSNs) and

smart objects with the Internet •  Method: Optional protocol •  Solution: IPv6 over Low-Power Wireless Personal Area

Networks (6LoWPAN) –  IETF Informational (RFC 4919), August 2007,

http://tools.ietf.org/html/rfc4919 –  IETF Proposed Standard (RFC 4944), September 2007,

http://tools.ietf.org/html/rfc4944 –  Brings IP to the smallest of devices, such as sensors –  Encapsulation and header compression mechanisms

13

Page 14: Web Services for the Internet of Things

Transport Layer (L4): TCP à UDP •  Goal: Reduce the overhead for short-lived transactions •  Method: Optional protocol •  Solution: User Datagram Protocol (UDP)

–  IETF Standard (RFC 768), August 1980, http://tools.ietf.org/html/rfc768

–  Fast but unreliable transport protocol –  Optimal for exchanging very small data units –  Supports multicasting –  Used with the IP network layer protocol

14

Page 15: Web Services for the Internet of Things

Application Layer (L7): HTTP à CoAP •  Goal: Provide resource constrained devices with

RESTful web service functionalities •  Methods: Optional protocol •  Solution: Constrained Application Protocol (CoAP)

–  IETF Internet Draft, November 2011, https://tools.ietf.org/html/draft-ietf-core-coap-08

–  REST-based architecture –  Optimized for resource constrained networks typical of IoT and

M2M applications –  Takes into account the low processing power and energy

consumption constraints of small embedded devices, such as sensors

15

Page 16: Web Services for the Internet of Things

Payload: XML à EXI •  Goal: Reduce the overhead of XML •  Methods: Compression and encoding •  Solution: Efficient XML Interchange (EXI)

–  W3C Recommendation (EXI Format 1.0), March 2011, http://www.w3.org/TR/exi/

–  Very compact representation of the XML Information Set –  Optimizes the performance and utilization of computational

resources –  Extremely efficient schema-informed mode

16

Page 17: Web Services for the Internet of Things

Web Services for the Internet of Things

17

Page 18: Web Services for the Internet of Things

About Web Services

•  Today’s Web Services are not suitable to be used with the Internet of Things –  TCP, HTTP, XML (SOAP)

•  What is needed is –  RESTful architecture for good Web integration –  Native push model with subscribe and notify –  UDP-based transport with multicast support –  Overhead suitable for constrained networks –  Complexity suitable for constrained nodes –  Build-in Web discovery and security

•  CoAP comes to the rescue!

18

Page 19: Web Services for the Internet of Things

CoAP and Web Services

19

Source: Sensinode

Page 20: Web Services for the Internet of Things

Conclusion

20

Page 21: Web Services for the Internet of Things

Conclusion

•  Traditional Web protocols and technologies are not suitable for the Internet of Things

•  The HTTP protocol stack needs to be optimized from the bottom to the top

•  CoAP is the key technology in accessing constrained environments/nodes from Web applications

21

Page 22: Web Services for the Internet of Things

References

•  Colitti, W., Steenhaut, K., and De Caro, N. Integrating Wireless Sensor Networks with the Web. 2011.

•  Shelby, Z. Embedded Web Services. In Journal of IEEE Wireless Communications, 17(6):52-57, 2010.

•  Castellani, A. et al. Web Services for the Internet of Things through CoAP and EXI. In Communications Workshops (ICC). IEEE, 2011, 1-6.

•  Castellani, A. et al. Best Practices for HTTP-CoAP Mapping Implementation. IETF Internet Draft, 2011.

22

Page 23: Web Services for the Internet of Things

Thank You!

Questions? Comments? [email protected]

23