Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Web Services for the Internet of Things


Published on

My preliminary presentation on "RESTful Web Services for the Internet of Things". 2011.
by Markku Laine,

Published in: Technology
  • Be the first to comment

Web Services for the Internet of Things

  1. 1. Web Services for the Internet ofThingsT-106.5800 Seminar on Software Techniques (3 cr)PresentationMarkku Laine, M.Sc. (Tech.) November 3, 2011
  2. 2. Presentation Outline•  Internet of Things•  CoAP•  CoAP protocol stack•  Web Services for the Internet of Things•  Conclusion 2
  3. 3. Internet of Things 3
  4. 4. What is Internet of Things? (e.g., sensors) (e.g., personal computers and smart phones) (e.g., routers and servers) Source: Sensinode 4
  5. 5. Gartner’s Hype Cycle for EmergingTechnologies, 2011 Source: Gartner 5
  6. 6. 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
  7. 7. Constrained Application Protocol (CoAP) 7
  8. 8. Google’s Hype Cycle for CoAP CoAP v.00 Source: Google Insights for Search 8
  9. 9. Implementations•  libcoap (C), open source –•  OpenCOAP (C), open source –•  CoAPy (Python), open source, in progress –•  Copper (Firefox addon) –•  Sensinode, The Contiki OS, TinyOS, etc. 9
  10. 10. CoAP Protocol Stack 10
  11. 11. Comparison of HTTP and CoAP ProtocolStacks XML Payload EXI HTTP Application (L7) CoAP TCP Transport (L4) UDP IP Network (L3) 6LoWPAN Ethernet MAC Data Link (L2) IEEE 802.15.4 MAC Ethernet PHY Physical (L1) IEEE 802.15.4 PHY 11
  12. 12. 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, 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
  13. 13. 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, –  IETF Proposed Standard (RFC 4944), September 2007, –  Brings IP to the smallest of devices, such as sensors –  Encapsulation and header compression mechanisms 13
  14. 14. 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, –  Fast but unreliable transport protocol –  Optimal for exchanging very small data units –  Supports multicasting –  Used with the IP network layer protocol 14
  15. 15. 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, –  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
  16. 16. 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, –  Very compact representation of the XML Information Set –  Optimizes the performance and utilization of computational resources –  Extremely efficient schema-informed mode 16
  17. 17. Web Services for the Internet of Things 17
  18. 18. 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
  19. 19. CoAP and Web Services Source: Sensinode 19
  20. 20. Conclusion 20
  21. 21. 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
  22. 22. 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
  23. 23. Thank You! Questions? Comments? 23