SlideShare une entreprise Scribd logo
1  sur  33
RestThing: A Restful Web Service
      Infrastructure for Mash-up Physical
              and Web Resources


             Weijun Qin, Qiang Li, Limin Sun, Hongsong Zhu, Yan Liu
                      Institute of Software, Chinese Academy of Sciences
                School of Software and Microelectronics, Peking University
                                                 qinweijun@is.iscas.ac.cn
                                                          24th, Oct. 2011
2011-11-12
OUTLINE



• Introduction

• Related Works

• RestThing Architecture

• The Prototyping Implementation

• Evaluation

• Conclusion and Future Works

 2011-11-12
Context



Web 2.0 is changing the world!
                                   The Concept of Web-as
                                   participation-platform




                                 Search                                        Tags

                                          Links                      Signals

                                                  Authoring   Extensions
Context



Web 2.0 is changing the world!




     Wikipedia is an existing application, where
     each peer contributor can participate into    Facebook provides APIs for third party to
     and edit                                      create new and appealing application
Web of Things


• Various physical things
  embedded in various
  industries
    – RFID, barcode
    – Wireless
      Sensors/Actuators
      Networks
    – M2M devices
• If physical things are
  exploited as like the
  Web, new physical-
  virtual applications are
  created!
Web of Things


• Various physical things
  embedded in various
  industries
    – RFID, barcode
    – Wireless
      Sensors/Actuators                Web of Things
      Networks
    – M2M devices
• If physical things are
  exploited as like the
  Web, new physical-
  virtual applications are
  created!                   Large numbers of connected smart things
Challenges


• Heterogeneity of devices    Isolated island among the
  and communication            wireless sensor networks
  protocols

                                         Internet/
                                           Web




                                WSN
                                                     WSN
Problem Statement




          How to create open infrastructure to
          handle devices embedded into the
          physical world and access devices to
          mash-up physical-virtual application
Our Works




RestThing infrastructure
      REST-style architecture to ease the integration of
      embedded sensor devices and existing applications
      Mash-up physical resources and web 2.0 service to
      create new type physical-virtual application
      Evaluate the efficiency of the prototyping system
OUTLINE



• Introduction

• Related Works

• RestThing Architecture

• The Prototyping Implementation

• Evaluation

• Conclusion and Future Works

 2011-11-12
Enabling Technologies



  Some previous work used Big Web Services as the way to
  access physical things




   For example,
   SenseWeb 1 by Kansal et al …
   • used WS-API to provide
     accessible interface
Enabling Technologies



  Some previous work used Big Web Services as the way to
  access physical things



     Big Web Services as the extension of API-oriented SOAP/WSDL
     • originally designed for integrate middleware and distributed systems
     • mapping their APIs to the Web information system




    However, along with the increasing functionality of theses systems, the
    number standards and specifications of Big Web Services would become
    more complicated and larger.
Related Works



  Our work differs from these previous work by using REST
  principles to provide the interface to physical things


     " REST " was coined by Roy Fielding in his Ph.D. dissertation [2]
     to describe a design pattern for implementing networked
     systems.
Related Works



  Our work differs from these previous work by using REST
  principles to provide the interface to physical things


     Erik Wilde3 work
     • firstly pointed out reusing well-accepted
     • Suggesting Web principles to interconnect the embedded
        devices to the Web.


     TinyRest4 bridged the Web with the physical world through a
     restful gateway.
     • However, it violated REST principles by introducing the extra
        verbs ‘subscribe’.
OUTLINE



• Introduction

• Related Works

• RestThing Architecture

• The Prototyping Implementation

• Evaluation

• Conclusion and Future Works

 2011-11-12
RestThing Infrastructure

• RestThing Infrastructure
    – RestThing’s goal: various applications can coexist and access to
      embedded devices available just like web information resources.
    – REST-driven and Resource-Oriented Architecture (ROA).


• Why is RESTful
    – Loose-coupling

    – Uniform Operation

    – Popularity
Design Issues


• Designing key
  components:
    –   Restful APIs
    –   Adaptation layer
    –   Resources
    –   The services provider
    –   Applications




 • Design detail issues:
     – Applications access Physical things as like Web resources
     – Accessing Physical things should inherit all the outstanding
       mechanisms
Key Components: Restful API


• Restful API does prescribe the use of standards:
    –   HTTP
    –   URL
    –   XML/HTML/GIF/JPEG/etc. (Resource Representations)
    –   text/xml, text/html, image/gif, image/jpeg, etc.




                               URI: Http://            Embedded
        Applications                                    Or Web
                                                       Resources
                              Resources requirements
                              Many kinds forms
                              ...


                                  doc1.html
Key Components: Resource and Adaptation


• Heterogeneity
    – Various types of embedded devices
    – Dedicated communication protocols


  • Device with TCP/IP                    • Device with TCP/IP
       Sensor, IEEE802.15.4                  Sensor platforms based on Sun
                                               Small Programmable Object
  • Adaptation
                                               Technology (SPOT), connect
       data transmission from the Web         Internet via IEEE 802.15.4 link.
        to the physical environment and
        vice-versa.                       • Adaptation
       To hide these operations              Acting as the role of the driver
        complexity and heterogeneity           module bridging the gap between
                                               the device and the Web
Key components: Service Provider and Apps


• The service provider is the central point of access in the
  RestThing infrastructure for sharing accessible embedded
  devices and creating applications.
• Two functions:
    – The database to collect resource data
    – Integration and combination for Restful APIs of embedded devices
      and Web Resources

   • Data collection                       • Restful APIs combination
        Data from embedded devices            Generating more functional and
        Data from the existing Web site        complicated services than just
                                                adopting embedded devices or
                                                Web resources
OUTLINE



• Introduction

• Related Works

• RestThing Architecture

• The Prototyping Implementation

• Evaluation

• Conclusion and Future Works

 2011-11-12
Prototyping Implementation


• Implementation details:
    – Wireless sensor network as
      the representative of the
      embedded devices
    – REST-style gateway as the
      adaptation support Ethernet
      interface and Zigbee
      communication
    – Restful services deployed in
      the personal computer
    – Physical-virtual applications
      with combining physical and
      web resources runs on
      Android-based smart phone
Wireless Sensor Network & Restful Gateway

• Wireless sensors are equipped with a
  250kbps, 2.4GHz, IEEE802.15.4-compliant
  Chip CC2420 Radio.
    – Easy to program and offer some basic sensing
      capabilities, e.g.
      temperature, humidity, light, infrared, image
• Restful gateway acts as the adaptation
  bridging the wireless sensor network and
  Internet
    – ARM9 32-bit RISC processor architecture, S3C2440
      400MHz CPU processor and 64M Flash memory
    – Provide a uniform interface to all components above
      it and manages all sensors in its scope
    – Obtain sensor data streams, submit data collection
      demands, or access sensor characteristics through
      the Restful API
Wireless Sensor Network & Restful Gateway

• Wireless sensors are equipped with a
  250kbps, 2.4GHz, IEEE802.15.4-compliant
  Chip CC2420 Radio.
      – Easy to program and offer some basic sensing
        capabilities, e.g. temperature, humidity, light,
        infrared, image
• Restful gateway acts as the adaptation
  bridging the wireless sensor network and
  Internet
      – The restful gateway implements the restful API using
        http protocol
      – sensors and the web information are view as
        resources and manipulated by the uniform Restful
        APIs in the HTTP standard
Resource        REST   MIME Type   URI(the fixed prefix: http://localhost:port/wsn/)
Name            Verb
SenCurrentRes   GET    XML/JSON    sensors/{sensorid}/{dataType}.{mediaType}
SenHistoryRes   GET    XML/JSON    sensors/history/{sensorid}/{dataType}/{fromTime}/
                                   {toTime}.{mediaType}
SenActiveRes    GET    XML/JSON    sensors/activeNode/all.{mediaType}
SenCmdRes       POST   XML/JSON    sensors/{sensorid}/command/{dataType}.{mediaTy
                                   pe}
Implementation

• Application demonstration using services which are provided by the
  restful gateway.
    – mobile phone (HTC Desire G7) based on android 2.2 operation system.
    – RESTlet on Android with both the client-side and the server-side HTTP connectors




 Real-time Data         History Data (daily,          Device                Physical-virtual
  (temperature,            weekly, any           Management (id,              Mash-up
humidity, light, …)          duration)           operating system,         (Temperature +
                                                     memory)               SINA weibo API)
Implementation: physical-virtual mash-up


• Mash-up services
  combining physical
  resources and web
  services
     – Light Data
         • sensors/{sensorid}/ligh
           t.{mediaType}
     – SINA Weibo API (like twitter)
         •   statuses/repost
         •   statuses/destroy
         •   statuses/update
         •   statuses/upload
OUTLINE



• Introduction

• Related Works

• RestThing Architecture

• The Prototyping Implementation

• Evaluation

• Conclusion and Future Works

 2011-11-12
Evaluation

        Evaluation from testing the amount of delay time from a request to
        the back response




        There are four test experiments:
        •    temperature real-time date with XML presentation
        •    temperature real-time date with JSON presentation
        •    temperature history date with XML presentation
        •    temperature history date with JSON presentation
Evaluation


   The delay time consumed T are divided into three stages:
   • Time 1(T1): reading from the serial-over-USB port and transformation data
     from Zigbee format to Ethernet format
   • Time 2(T2): storage in database
   • Time 3(T3): Data encapsulation to the RESTlet URI’s presentation

    T=T1+T2+T3




     Gateway without REST via
     GPRS communication:
     • Just contains read date from serial
       port and data transformation.
OUTLINE



• Introduction

• Related Works

• RestThing Architecture

• The Prototyping Implementation

• Evaluation

• Conclusion and Future Works

 2011-11-12
Conclusion and Future Works

 RestThing infrastructure based on the REST paradigm
     Hide the heterogeneity of connected embedded devices
     Provide an easy and seamless way for integrating embedded
     devices with existing applications
     Integrate wireless sensor networks, restful gateway and mash-up
     application running on the smart phone
     Tradeoff features/performance
Conclusion and Future Works

 RestThing infrastructure based on the REST paradigm
     Hide the heterogeneity of connected embedded devices
     Provide an easy and seamless way for integrating embedded
     devices with existing applications
     Integrate wireless sensor networks, restful gateway and mash-up
     application running on the smart phone
     Tradeoff features/performance




     Service composition
     The third service interface for web services
     Semantics
     REST supported on embedded devices based on CoAP/6LoWPAN
THANK YOU!
Q&A

             Contact Info: Weijun Qin
                      qinweijun@is.iscas.ac.cn

Contenu connexe

Tendances

Protocols for internet of things
Protocols for internet of thingsProtocols for internet of things
Protocols for internet of thingsCharles Gibbons
 
OpenDaylight-in-NextGenNetworkServices
OpenDaylight-in-NextGenNetworkServicesOpenDaylight-in-NextGenNetworkServices
OpenDaylight-in-NextGenNetworkServicesCharles Eckel
 
Chapter 5 IoT Design methodologies
Chapter 5 IoT Design methodologiesChapter 5 IoT Design methodologies
Chapter 5 IoT Design methodologiespavan penugonda
 
System design of multiprotocol iot
System design of multiprotocol iotSystem design of multiprotocol iot
System design of multiprotocol iotDev Bhattacharya
 
IoT - Apps & Services
IoT - Apps & ServicesIoT - Apps & Services
IoT - Apps & ServicesDiogo Gomes
 
Ethernet Enabled Digital I/O Control in Embedded Systems
Ethernet Enabled Digital I/O Control in Embedded SystemsEthernet Enabled Digital I/O Control in Embedded Systems
Ethernet Enabled Digital I/O Control in Embedded SystemsIOSR Journals
 
“Thread - A New Wireless Networking Protocol for Internet of Things” - Ankith...
“Thread - A New Wireless Networking Protocol for Internet of Things” - Ankith...“Thread - A New Wireless Networking Protocol for Internet of Things” - Ankith...
“Thread - A New Wireless Networking Protocol for Internet of Things” - Ankith...EIT Digital Alumni
 
Embedded Web Services Report
Embedded Web Services ReportEmbedded Web Services Report
Embedded Web Services ReportBernie Chiu
 
Open Source as Reference Implementation for Next Gen Network Services
Open Source as Reference Implementation for Next Gen Network ServicesOpen Source as Reference Implementation for Next Gen Network Services
Open Source as Reference Implementation for Next Gen Network ServicesCharles Eckel
 
Seminar presentation on embedded web technology
Seminar presentation on embedded web technologySeminar presentation on embedded web technology
Seminar presentation on embedded web technologyRanol R C
 
Iot secure connected devices indicthreads
Iot secure connected devices indicthreadsIot secure connected devices indicthreads
Iot secure connected devices indicthreadsIndicThreads
 
Pilgrim Beart, Founder AlertMe
Pilgrim Beart, Founder AlertMePilgrim Beart, Founder AlertMe
Pilgrim Beart, Founder AlertMeJustin Hayward
 
Internet Resource Management (IRM) & Internet Routing Registry (IRR)
Internet Resource Management (IRM) & Internet Routing Registry (IRR)Internet Resource Management (IRM) & Internet Routing Registry (IRR)
Internet Resource Management (IRM) & Internet Routing Registry (IRR)APNIC
 
Ppt 3 - IOT logic design
Ppt   3 - IOT logic designPpt   3 - IOT logic design
Ppt 3 - IOT logic designudhayakumarc1
 
Logging/Request Tracing in Distributed Environment
Logging/Request Tracing in Distributed EnvironmentLogging/Request Tracing in Distributed Environment
Logging/Request Tracing in Distributed EnvironmentAPNIC
 

Tendances (18)

Protocols for internet of things
Protocols for internet of thingsProtocols for internet of things
Protocols for internet of things
 
OpenDaylight-in-NextGenNetworkServices
OpenDaylight-in-NextGenNetworkServicesOpenDaylight-in-NextGenNetworkServices
OpenDaylight-in-NextGenNetworkServices
 
Chapter 5 IoT Design methodologies
Chapter 5 IoT Design methodologiesChapter 5 IoT Design methodologies
Chapter 5 IoT Design methodologies
 
System design of multiprotocol iot
System design of multiprotocol iotSystem design of multiprotocol iot
System design of multiprotocol iot
 
IoT - Apps & Services
IoT - Apps & ServicesIoT - Apps & Services
IoT - Apps & Services
 
Ethernet Enabled Digital I/O Control in Embedded Systems
Ethernet Enabled Digital I/O Control in Embedded SystemsEthernet Enabled Digital I/O Control in Embedded Systems
Ethernet Enabled Digital I/O Control in Embedded Systems
 
“Thread - A New Wireless Networking Protocol for Internet of Things” - Ankith...
“Thread - A New Wireless Networking Protocol for Internet of Things” - Ankith...“Thread - A New Wireless Networking Protocol for Internet of Things” - Ankith...
“Thread - A New Wireless Networking Protocol for Internet of Things” - Ankith...
 
Embedded Web Services Report
Embedded Web Services ReportEmbedded Web Services Report
Embedded Web Services Report
 
Open Source as Reference Implementation for Next Gen Network Services
Open Source as Reference Implementation for Next Gen Network ServicesOpen Source as Reference Implementation for Next Gen Network Services
Open Source as Reference Implementation for Next Gen Network Services
 
Seminar presentation on embedded web technology
Seminar presentation on embedded web technologySeminar presentation on embedded web technology
Seminar presentation on embedded web technology
 
Lecture 13
Lecture 13Lecture 13
Lecture 13
 
Iot secure connected devices indicthreads
Iot secure connected devices indicthreadsIot secure connected devices indicthreads
Iot secure connected devices indicthreads
 
Pilgrim Beart, Founder AlertMe
Pilgrim Beart, Founder AlertMePilgrim Beart, Founder AlertMe
Pilgrim Beart, Founder AlertMe
 
Internet Resource Management (IRM) & Internet Routing Registry (IRR)
Internet Resource Management (IRM) & Internet Routing Registry (IRR)Internet Resource Management (IRM) & Internet Routing Registry (IRR)
Internet Resource Management (IRM) & Internet Routing Registry (IRR)
 
Ppt 3 - IOT logic design
Ppt   3 - IOT logic designPpt   3 - IOT logic design
Ppt 3 - IOT logic design
 
Logging/Request Tracing in Distributed Environment
Logging/Request Tracing in Distributed EnvironmentLogging/Request Tracing in Distributed Environment
Logging/Request Tracing in Distributed Environment
 
rajesh resume edit
rajesh resume editrajesh resume edit
rajesh resume edit
 
Lecture 9
Lecture 9Lecture 9
Lecture 9
 

Similaire à RestThing: A Restful Web Service Infrastructure for Mash-up Physical and Web Resources

Iot unit i present by JAVVAJI VENKATRAO SVEC,TIRUPATI
Iot unit i present by JAVVAJI VENKATRAO SVEC,TIRUPATIIot unit i present by JAVVAJI VENKATRAO SVEC,TIRUPATI
Iot unit i present by JAVVAJI VENKATRAO SVEC,TIRUPATIVenkatRaoJ
 
Web API Management meets the Internet of Things
Web API Management meets the Internet of ThingsWeb API Management meets the Internet of Things
Web API Management meets the Internet of ThingsPaul Fremantle
 
Chapter-1_embedded syustem iot.pdf
Chapter-1_embedded syustem iot.pdfChapter-1_embedded syustem iot.pdf
Chapter-1_embedded syustem iot.pdfJohnMcClaine2
 
Week 8 - Module 19 - PPT- Internet of Things for Libraries.pdf
Week 8 - Module 19 - PPT- Internet of Things for Libraries.pdfWeek 8 - Module 19 - PPT- Internet of Things for Libraries.pdf
Week 8 - Module 19 - PPT- Internet of Things for Libraries.pdfMohamedAli899919
 
Distributed Data Flow for the Web of Things: Distributed Node-RED
Distributed Data Flow for the Web of Things: Distributed Node-REDDistributed Data Flow for the Web of Things: Distributed Node-RED
Distributed Data Flow for the Web of Things: Distributed Node-REDMichael Blackstock
 
Hypermedia for Machine APIs
Hypermedia for Machine APIsHypermedia for Machine APIs
Hypermedia for Machine APIsMichael Koster
 
APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013Jerome Louvel
 
From Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web SitesFrom Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web SitesRestlet
 
Internet of things applications covering industrial domain
Internet of things applications covering industrial domainInternet of things applications covering industrial domain
Internet of things applications covering industrial domainDev Bhattacharya
 
Internet of Things A Vision, Architectural Elements, and Future Directions
Internet of Things A Vision, Architectural Elements, and Future Directions Internet of Things A Vision, Architectural Elements, and Future Directions
Internet of Things A Vision, Architectural Elements, and Future Directions Mostafa Arjmand
 

Similaire à RestThing: A Restful Web Service Infrastructure for Mash-up Physical and Web Resources (20)

Design patternsforiot
Design patternsforiotDesign patternsforiot
Design patternsforiot
 
Iot unit i present by JAVVAJI VENKATRAO SVEC,TIRUPATI
Iot unit i present by JAVVAJI VENKATRAO SVEC,TIRUPATIIot unit i present by JAVVAJI VENKATRAO SVEC,TIRUPATI
Iot unit i present by JAVVAJI VENKATRAO SVEC,TIRUPATI
 
Iot unit i
Iot unit iIot unit i
Iot unit i
 
Web API Management meets the Internet of Things
Web API Management meets the Internet of ThingsWeb API Management meets the Internet of Things
Web API Management meets the Internet of Things
 
Chapter 1 updated.pdf
Chapter 1 updated.pdfChapter 1 updated.pdf
Chapter 1 updated.pdf
 
Chapter - 1.pptx
Chapter - 1.pptxChapter - 1.pptx
Chapter - 1.pptx
 
Chapter-1_embedded syustem iot.pdf
Chapter-1_embedded syustem iot.pdfChapter-1_embedded syustem iot.pdf
Chapter-1_embedded syustem iot.pdf
 
unit 3.pdf
unit 3.pdfunit 3.pdf
unit 3.pdf
 
Chapter-1.pdf
Chapter-1.pdfChapter-1.pdf
Chapter-1.pdf
 
Internet of Things
Internet of ThingsInternet of Things
Internet of Things
 
Week 8 - Module 19 - PPT- Internet of Things for Libraries.pdf
Week 8 - Module 19 - PPT- Internet of Things for Libraries.pdfWeek 8 - Module 19 - PPT- Internet of Things for Libraries.pdf
Week 8 - Module 19 - PPT- Internet of Things for Libraries.pdf
 
KNoT Manifesto
KNoT ManifestoKNoT Manifesto
KNoT Manifesto
 
Io t introduction
Io t introductionIo t introduction
Io t introduction
 
Distributed Data Flow for the Web of Things: Distributed Node-RED
Distributed Data Flow for the Web of Things: Distributed Node-REDDistributed Data Flow for the Web of Things: Distributed Node-RED
Distributed Data Flow for the Web of Things: Distributed Node-RED
 
Hypermedia for Machine APIs
Hypermedia for Machine APIsHypermedia for Machine APIs
Hypermedia for Machine APIs
 
APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013
 
From Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web SitesFrom Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web Sites
 
Internet of things applications covering industrial domain
Internet of things applications covering industrial domainInternet of things applications covering industrial domain
Internet of things applications covering industrial domain
 
Internet of Things A Vision, Architectural Elements, and Future Directions
Internet of Things A Vision, Architectural Elements, and Future Directions Internet of Things A Vision, Architectural Elements, and Future Directions
Internet of Things A Vision, Architectural Elements, and Future Directions
 
iot unit1.pdf
iot unit1.pdfiot unit1.pdf
iot unit1.pdf
 

RestThing: A Restful Web Service Infrastructure for Mash-up Physical and Web Resources

  • 1. RestThing: A Restful Web Service Infrastructure for Mash-up Physical and Web Resources Weijun Qin, Qiang Li, Limin Sun, Hongsong Zhu, Yan Liu Institute of Software, Chinese Academy of Sciences School of Software and Microelectronics, Peking University qinweijun@is.iscas.ac.cn 24th, Oct. 2011 2011-11-12
  • 2. OUTLINE • Introduction • Related Works • RestThing Architecture • The Prototyping Implementation • Evaluation • Conclusion and Future Works 2011-11-12
  • 3. Context Web 2.0 is changing the world! The Concept of Web-as participation-platform Search Tags Links Signals Authoring Extensions
  • 4. Context Web 2.0 is changing the world! Wikipedia is an existing application, where each peer contributor can participate into Facebook provides APIs for third party to and edit create new and appealing application
  • 5. Web of Things • Various physical things embedded in various industries – RFID, barcode – Wireless Sensors/Actuators Networks – M2M devices • If physical things are exploited as like the Web, new physical- virtual applications are created!
  • 6. Web of Things • Various physical things embedded in various industries – RFID, barcode – Wireless Sensors/Actuators Web of Things Networks – M2M devices • If physical things are exploited as like the Web, new physical- virtual applications are created! Large numbers of connected smart things
  • 7. Challenges • Heterogeneity of devices  Isolated island among the and communication wireless sensor networks protocols Internet/ Web WSN WSN
  • 8. Problem Statement How to create open infrastructure to handle devices embedded into the physical world and access devices to mash-up physical-virtual application
  • 9. Our Works RestThing infrastructure REST-style architecture to ease the integration of embedded sensor devices and existing applications Mash-up physical resources and web 2.0 service to create new type physical-virtual application Evaluate the efficiency of the prototyping system
  • 10. OUTLINE • Introduction • Related Works • RestThing Architecture • The Prototyping Implementation • Evaluation • Conclusion and Future Works 2011-11-12
  • 11. Enabling Technologies Some previous work used Big Web Services as the way to access physical things For example, SenseWeb 1 by Kansal et al … • used WS-API to provide accessible interface
  • 12. Enabling Technologies Some previous work used Big Web Services as the way to access physical things Big Web Services as the extension of API-oriented SOAP/WSDL • originally designed for integrate middleware and distributed systems • mapping their APIs to the Web information system However, along with the increasing functionality of theses systems, the number standards and specifications of Big Web Services would become more complicated and larger.
  • 13. Related Works Our work differs from these previous work by using REST principles to provide the interface to physical things " REST " was coined by Roy Fielding in his Ph.D. dissertation [2] to describe a design pattern for implementing networked systems.
  • 14. Related Works Our work differs from these previous work by using REST principles to provide the interface to physical things Erik Wilde3 work • firstly pointed out reusing well-accepted • Suggesting Web principles to interconnect the embedded devices to the Web. TinyRest4 bridged the Web with the physical world through a restful gateway. • However, it violated REST principles by introducing the extra verbs ‘subscribe’.
  • 15. OUTLINE • Introduction • Related Works • RestThing Architecture • The Prototyping Implementation • Evaluation • Conclusion and Future Works 2011-11-12
  • 16. RestThing Infrastructure • RestThing Infrastructure – RestThing’s goal: various applications can coexist and access to embedded devices available just like web information resources. – REST-driven and Resource-Oriented Architecture (ROA). • Why is RESTful – Loose-coupling – Uniform Operation – Popularity
  • 17. Design Issues • Designing key components: – Restful APIs – Adaptation layer – Resources – The services provider – Applications • Design detail issues: – Applications access Physical things as like Web resources – Accessing Physical things should inherit all the outstanding mechanisms
  • 18. Key Components: Restful API • Restful API does prescribe the use of standards: – HTTP – URL – XML/HTML/GIF/JPEG/etc. (Resource Representations) – text/xml, text/html, image/gif, image/jpeg, etc. URI: Http:// Embedded Applications Or Web Resources Resources requirements Many kinds forms ... doc1.html
  • 19. Key Components: Resource and Adaptation • Heterogeneity – Various types of embedded devices – Dedicated communication protocols • Device with TCP/IP • Device with TCP/IP  Sensor, IEEE802.15.4  Sensor platforms based on Sun Small Programmable Object • Adaptation Technology (SPOT), connect  data transmission from the Web Internet via IEEE 802.15.4 link. to the physical environment and vice-versa. • Adaptation  To hide these operations  Acting as the role of the driver complexity and heterogeneity module bridging the gap between the device and the Web
  • 20. Key components: Service Provider and Apps • The service provider is the central point of access in the RestThing infrastructure for sharing accessible embedded devices and creating applications. • Two functions: – The database to collect resource data – Integration and combination for Restful APIs of embedded devices and Web Resources • Data collection • Restful APIs combination  Data from embedded devices  Generating more functional and  Data from the existing Web site complicated services than just adopting embedded devices or Web resources
  • 21. OUTLINE • Introduction • Related Works • RestThing Architecture • The Prototyping Implementation • Evaluation • Conclusion and Future Works 2011-11-12
  • 22. Prototyping Implementation • Implementation details: – Wireless sensor network as the representative of the embedded devices – REST-style gateway as the adaptation support Ethernet interface and Zigbee communication – Restful services deployed in the personal computer – Physical-virtual applications with combining physical and web resources runs on Android-based smart phone
  • 23. Wireless Sensor Network & Restful Gateway • Wireless sensors are equipped with a 250kbps, 2.4GHz, IEEE802.15.4-compliant Chip CC2420 Radio. – Easy to program and offer some basic sensing capabilities, e.g. temperature, humidity, light, infrared, image • Restful gateway acts as the adaptation bridging the wireless sensor network and Internet – ARM9 32-bit RISC processor architecture, S3C2440 400MHz CPU processor and 64M Flash memory – Provide a uniform interface to all components above it and manages all sensors in its scope – Obtain sensor data streams, submit data collection demands, or access sensor characteristics through the Restful API
  • 24. Wireless Sensor Network & Restful Gateway • Wireless sensors are equipped with a 250kbps, 2.4GHz, IEEE802.15.4-compliant Chip CC2420 Radio. – Easy to program and offer some basic sensing capabilities, e.g. temperature, humidity, light, infrared, image • Restful gateway acts as the adaptation bridging the wireless sensor network and Internet – The restful gateway implements the restful API using http protocol – sensors and the web information are view as resources and manipulated by the uniform Restful APIs in the HTTP standard Resource REST MIME Type URI(the fixed prefix: http://localhost:port/wsn/) Name Verb SenCurrentRes GET XML/JSON sensors/{sensorid}/{dataType}.{mediaType} SenHistoryRes GET XML/JSON sensors/history/{sensorid}/{dataType}/{fromTime}/ {toTime}.{mediaType} SenActiveRes GET XML/JSON sensors/activeNode/all.{mediaType} SenCmdRes POST XML/JSON sensors/{sensorid}/command/{dataType}.{mediaTy pe}
  • 25. Implementation • Application demonstration using services which are provided by the restful gateway. – mobile phone (HTC Desire G7) based on android 2.2 operation system. – RESTlet on Android with both the client-side and the server-side HTTP connectors Real-time Data History Data (daily, Device Physical-virtual (temperature, weekly, any Management (id, Mash-up humidity, light, …) duration) operating system, (Temperature + memory) SINA weibo API)
  • 26. Implementation: physical-virtual mash-up • Mash-up services combining physical resources and web services – Light Data • sensors/{sensorid}/ligh t.{mediaType} – SINA Weibo API (like twitter) • statuses/repost • statuses/destroy • statuses/update • statuses/upload
  • 27. OUTLINE • Introduction • Related Works • RestThing Architecture • The Prototyping Implementation • Evaluation • Conclusion and Future Works 2011-11-12
  • 28. Evaluation Evaluation from testing the amount of delay time from a request to the back response There are four test experiments: • temperature real-time date with XML presentation • temperature real-time date with JSON presentation • temperature history date with XML presentation • temperature history date with JSON presentation
  • 29. Evaluation The delay time consumed T are divided into three stages: • Time 1(T1): reading from the serial-over-USB port and transformation data from Zigbee format to Ethernet format • Time 2(T2): storage in database • Time 3(T3): Data encapsulation to the RESTlet URI’s presentation T=T1+T2+T3 Gateway without REST via GPRS communication: • Just contains read date from serial port and data transformation.
  • 30. OUTLINE • Introduction • Related Works • RestThing Architecture • The Prototyping Implementation • Evaluation • Conclusion and Future Works 2011-11-12
  • 31. Conclusion and Future Works RestThing infrastructure based on the REST paradigm Hide the heterogeneity of connected embedded devices Provide an easy and seamless way for integrating embedded devices with existing applications Integrate wireless sensor networks, restful gateway and mash-up application running on the smart phone Tradeoff features/performance
  • 32. Conclusion and Future Works RestThing infrastructure based on the REST paradigm Hide the heterogeneity of connected embedded devices Provide an easy and seamless way for integrating embedded devices with existing applications Integrate wireless sensor networks, restful gateway and mash-up application running on the smart phone Tradeoff features/performance Service composition The third service interface for web services Semantics REST supported on embedded devices based on CoAP/6LoWPAN
  • 33. THANK YOU! Q&A Contact Info: Weijun Qin qinweijun@is.iscas.ac.cn

Notes de l'éditeur

  1. 600 Million hosts, and 1.4 Billion users currently in Internet Statistics. Google just passed 1 Trillion unique URLs. There are 100+ Billion microcontrollers worldwide with 10 Billion shipments a year. Those all have the potential to be networked. They will make up the Internet of Things which has the potential for a size in Trillions.
  2. 600 Million hosts, and 1.4 Billion users currently in Internet Statistics. Google just passed 1 Trillion unique URLs. There are 100+ Billion microcontrollers worldwide with 10 Billion shipments a year. Those all have the potential to be networked. They will make up the Internet of Things which has the potential for a size in Trillions.
  3. Obviously, the application developers cannot grasp these technologies quickly. What they need is just low-enter barrier to quickly react to information or market requirements. Big Web Services cannot satisfy these requirements.these standards used the Web as a transport infrastructure and acted as.
  4. Obviously, the application developers cannot grasp these technologies quickly. What they need is just low-enter barrier to quickly react to information or market requirements. Big Web Services cannot satisfy these requirements.these standards used the Web as a transport infrastructure and acted as.
  5. Our work used the smart gateway to connect the physical devices to the Web information by REST principles
  6. Our work used the smart gateway to connect the physical devices to the Web information by REST principles
  7. Loosely couplingEase of integrating isolated information systemsScalability Uniform operationThe embedded devices are viewed resources' formatUniform operation on resources Popularity The successful case of the World Wide WebThe web 2.0 technologies
  8. REST is just a design patternYou can't bottle up a pattern. You can only understand it and design your Web services to it.
  9. REST is just a design patternYou can't bottle up a pattern. You can only understand it and design your Web services to it.
  10. REST is just a design patternYou can't bottle up a pattern. You can only understand it and design your Web services to it.
  11. Since the temperature history back response has more than 1000 items of data compared with the current data back response, it has longer delay time in the experiment. When the amount of data is small (real-time data response is small amount), JSON and XML presentations have more or less time delay. If the data amount is large, using JSON as resource presentation has less time delay than XML.