SlideShare a Scribd company logo
1 of 38
Download to read offline
Web of Things - Towards Open and
Sharable Networks of Embedded Devices
Internet Developer Summit
7. April 2010
Vlad Trifa - ETH Zurich/SAP Research
Disclaimer


  2001-2006               Studied Comp. Sci., Robotics, AI, Neurosciences @ EPFL


  2005-2006               M.Sc. thesis @ UCLA, Bio-acoustics & Sensor Networks



  2006-2007               Research in Humanoid Robotics @ ATR, Kyoto, Japan


  2007-now                Ph.D. @ ETH Zurich & SAP Research



Web of Things, 7.4.2010                  Vlad Trifa - SAP/ETH Zurich
Electronic things are invading us...
                     ‣ Powerful tiny computers
                     ‣ Sensors & actuators
                     ‣ Web connectivity
                          ‣ Cheap
                          ‣ Ubiquitous




Web of Things, 7.4.2010                  Vlad Trifa - SAP/ETH Zurich
Translation for hackers:
An infinite playground.


YAAAY!
Megaco   Modbus
        OGC SensorML
Zorro III
            AMQP
  OPC-UA
Problem...

          How do we combine heterogeneous devices to create
                   interactive ad-hoc applications?

                                                               That is, without a
                                                               PhD in Computer
                                                                    Science
    ‣ Tons of different devices:
          ‣ Capabilities/functions
          ‣ Applications/middlewares
          ‣ Networking protocols



Web of Things, 7.4.2010          Vlad Trifa - SAP/ETH Zurich
We need an universal protocol
that is:

simple, lightweight, loosely-
coupled, scalable, flexible

and hopefully... standard
Sounds like the Web...

                  Use Web standards to develop applications for
                              networked devices.
               HTTP, HTML, XML, JSON, RSS, ATOM, MIME,...

      ‣    TCP/IP & Web granted, WiFi routers ubiquitous
      ‣    Development of simple Web apps: cheap & quick
      ‣    Integrate real-world data on the Web
      ‣    Get features of the Web for free



Web of Things, 7.4.2010              Vlad Trifa - SAP/ETH Zurich
WWWWW                               Social Web
      Physical Web
                                                           Real-time Web




            Semantic Web                          Programmable Web
                          Web of Things

Web of Things, 7.4.2010      Vlad Trifa - SAP/ETH Zurich
RESTful devices
The Web of Things in a nutshell


        Steps to create a basic Web of Things (v1.0):

        1. Connecting things to the Internet (IPv4/IPv6)
        2. Embedded Web servers
        3. Make devices part of the Web (using REST)
                    ‣ Model their function as RESTful resources




Web of Things, 7.4.2010                 Vlad Trifa - SAP/ETH Zurich
Web of Things, 7.4.2010   Vlad Trifa - SAP/ETH Zurich
RESTful SunSPOTs

                          ‣ Properties and functions are
                            RESTful resources
                          ‣ Devices/services become Web
                            resources
                               ‣ URI-addressed
                               ‣ Links between them (hateoas)
                               ‣ Different representations (content
                                 negotiation)
                               ‣ Uniform interface (HTTP verbs, status
                                 codes)




Web of Things, 7.4.2010   Vlad Trifa - SAP/ETH Zurich
Sunspots resources modeling
      Services on embedded devices are adapted for resource oriented
      architectures
      ‣ root: www.spotshost.com
      ‣ spots list: www.spotshost.com/sunspots
      ‣ spot #1: www.spotshost.com/sunspots/1
      ‣ sensors list: www.spotshost.com/sunspots/1/sensors
      ‣ LEDs : www.spotshost.com/sunspots/1/actuators/leds
      ‣ LED #1 : www.spotshost.com/sunspots/1/actuators/leds/led1




Web of Things, 7.4.2010         Vlad Trifa - SAP/ETH Zurich
Representations

  ‣ XHTML ideal for browsing
    http://webofthings.com/spots


  ‣ JSON ideal for parsing (& lightweight for
    device)
    http://webofthings.com/spots.json




  ‣ XML ideal for business integration
    http://webofthings.com/spots.xml



Web of Things, 7.4.2010            Vlad Trifa - SAP/ETH Zurich
Uniform interface
  ‣ HTTP verbs
        ‣   GET: current temperature
        ‣   POST: add a timer
        ‣   PUT: turn a device on/off
        ‣   DELETE: delete a timer on a device
  ‣ HTTP headers
        ‣ Accept header for MIME types
        ‣ Status codes (200 ok, 401 unauthorized)




Web of Things, 7.4.2010             Vlad Trifa - SAP/ETH Zurich
Gateway level integration: Energie Visible
                                  Web / Mobile 
                                  Interface
                                                            GET http://10.1.1.5:8080/energymonitor/ploggs/*
                                                            [{
                             Gateway                             "deviceName": "ComputerAndScreen",
                             (IP:10.1.1.5)                       "currentWatts": 50.52,
                                                                 "KWh": 5.835,
                                                                 "maxWattage":     100.56
                                                            },
                                                                 "deviceName": "Fridge",
                                                                 "currentWatts": 86.28.,
                                             Sensors
                                                              "KWh": 4.421,
                                             (Ploggs)
                                                              "maxWattage": 288.92
                                                            }, {...}]
                                             Electric 
                                             appliances


D. Guinard and V. Trifa. Towards the web of things: Web mashups for embedded devices. In 2nd Workshop on
    Mashups, Enterprise Mashups and Lightweight Composition on the Web (MEM 2009), Madrid, Spain, April 2009.
Web of Things, 7.4.2010                             Vlad Trifa - SAP/ETH Zurich
OSGi gateway




Web of Things, 7.4.2010   Vlad Trifa - SAP/ETH Zurich
The era of physical
Mashups
Real-world Web applications

                                   REST                                             URL

                                                          REST



                                        I
                                      AP




                                                                           Ja
                                                                               va
                           P




                                   ST
                          PH




                                                                               Sc
                                   RE




                                                                                rip
                                                                                    t
         [hCp://www.pachube.com]   [hCp://www.webothings.com/energievisible]        [hCp://www.clickscript.ch]




Web of Things, 7.4.2010                     Vlad Trifa - SAP/ETH Zurich
Clickscript


   ‣ Javascript-based visual
     mashup editor
   ‣ Firefox plugin/Web app
   ‣ Based on DOJO/jQuery




                                                        www.clickscript.ch

Web of Things, 7.4.2010   Vlad Trifa - SAP/ETH Zurich
Clickscript component


	    csComponentContainer.push({
	    	   name : "cs.web.things.switch",
	    	   description : "switch on or off",
	    	   inputs : [{name: "IP",type: "cs.type.String"},
	    	   	         {name: "on/off",	type: "cs.type.Boolean"}],
	    	   outputs: [ ],
	    	   image: "web/things/plogg.png",
	    	   exec : function(state){
	    	   	    this.setAsync();
	    	   	    var ip = state.inputs.item(0).getValue();	
	    	   	    var aurl = "http://"+ip+":8082/EnergieVisible/ploggs/008098e7cb71/status.html";
	    	   	    var onoff = state.inputs.item(1).getValue() ? "on" : "off";
	    	   	    var component = this;




Web of Things, 7.4.2010                Vlad Trifa - SAP/ETH Zurich
jQuery HTTP request

     	      $.ajax({
     	      	    url: aurl,
     	      	    type: "PUT",
     	      	    data: ({status : onoff}),
     	      	    success: function(html){
     	      	       alert("status of Plogg : " +onoff);
     	      	       component.finishAsync();
     	      	    },
     	      	    error: function(msg){
     	      	 	 alert("Error on: "+aurl);
     	      	    }
     	      	 });


Web of Things, 7.4.2010      Vlad Trifa - SAP/ETH Zurich
Err, what about eventing &
streaming ?

The web wasn’t quite made for
that...
Here comes Real-Time Web

   ‣ Scalable pub/sub for devices is needed
         ‣ Many solutions (XMPP, etc....)
         ‣ None really integrate with the Web
         ‣ ATOM/ATOMpub is RESTful, but not push

   ‣ Push Web technologies
         ‣ Apply Web PUSH on devices
         ‣ Comet & Web hooks
         ‣ Bi-directional Web messaging (Websockets)




Web of Things, 7.4.2010          Vlad Trifa - SAP/ETH Zurich
Data streams

   ‣     Sensor data represented as Web streams
   ‣     Publish/subscribe paradigm
   ‣     Users can create and subscribe to streams
   ‣     Parameterized
         ‣   devices
         ‣   sensors
         ‣   filter data
         ‣   sampling frequency

   ‣ Using REST...


Web of Things, 7.4.2010           Vlad Trifa - SAP/ETH Zurich
Messaging implementation

   ‣ Messages transported in JSON
   ‣ Message broker as an external entity (outsourced)
         ‣ Swappable
         ‣ Scalable
         ‣ Currently use RabbitMQ
   ‣ Web integration with pubsubhubbub
         ‣ RESTful, Web-hook based pub/sub
         ‣ Support for CometD for Web push




Web of Things, 7.4.2010             Vlad Trifa - SAP/ETH Zurich
Messaging




Web of Things, 7.4.2010   Vlad Trifa - SAP/ETH Zurich
Request



	     	 POST example.org/datastreams/ HTTP/1.1
	     	 Content-Type: application/x-www-form-urlencoded
	     	   devices=purpleSensor &
	     	   data=temperature,light &
	     	   frequency=2 &
	     	   filter=light < 200 && temperature > 19




Web of Things, 7.4.2010   Vlad Trifa - SAP/ETH Zurich
Response

	     HTTP/1.1 201
	     [...]
	     Content-Location: http://example.com:8085/datastreams/bh_0
	     [...]
	     Connection: close




     ‣ Then we just subscribe to it:


        curl -vd "hub.mode=subscribe&hub.callback=http://example.com:
        8888/client_callback_handler&hub.topic=&hub.verify=sync"
        http://example.com:8085/datastreams/bh_0



Web of Things, 7.4.2010          Vlad Trifa - SAP/ETH Zurich
Messaging JS solution

   ‣ jQuery - allows HTTP requests from Javascript
   ‣ reversehttp - allows passing HTTP requests to client




Web of Things, 7.4.2010    Vlad Trifa - SAP/ETH Zurich
function registerDatastream(devices, dataFields, frequency, filter) {
    	          var formData = "devices=" + devices + "&data=" + dataFields;
    	          if (frequency != "") {
    	      	   formData += "&frequency=" + frequency;
    	          }
    	          if (filter != "") {
    	      	   formData += "&filter=" + filter;
    	          }
    	
    	             $.ajax( {
    	      	      type : "POST",
    	      	      url : “http://example.com:8085/datastreams",
    	      	      data : formData,
    	      	      success : function(msg, textStatus, xhr) {
    	      	          if (xhr.status != 201) {
    	      	      	    alert("Error creating datastream: " + xhr.statusText);
    	      	          } else {
    	      	      	    queueURL = msg;
    	      	          }
    	      	      },
    	      	      dataType : "text"
    	             });
    	      }


Web of Things, 7.4.2010                     Vlad Trifa - SAP/ETH Zurich
function startServerList() {
  	          virtualHost = "vh" + Math.round(Math.random() * 100000);

  	              new HttpServer(virtualHost, function(req) {
  	      	      if (req.method == "get") {
  	      	           // subscription verification request
  	      	           [...]
  	      	      } else {
  	      	           // normal message (HTTP POST)
  	      	           var msg = JSON.parse(req.body);
  	      	           var light = msg.data[0].light;
  	      	           var temp = msg.data[0].temp;
  	      	           alert(“Current light level: “ + light);
  	      	           req.respond(200, "OK", {}, "");
  	      	      }
  	              });
  	      }


Web of Things, 7.4.2010              Vlad Trifa - SAP/ETH Zurich
Device Discovery

   ‣ Idea: all device pages contain semantic metadata
         ‣ Like the header metadata for web robots
         ‣ Machine-readable user manual
         ‣ Human-readable documentation

   ‣ Proposed solution: microformats for devices
         ‣   What resources are available?
         ‣   What are their input/output?
         ‣   What methods are accepted?
         ‣   Keywords?
         ‣   Eventing channels?
         ‣   Maybe documentation?


Web of Things, 7.4.2010             Vlad Trifa - SAP/ETH Zurich
<span class="service">
          <span class="mftitle">Label: </span><span class="label"></span><br/>
          <span class="mftitle">Data Format: </span><span class="data-format">Integer</
      span><br/>
          <span class="mftitle">Operation: </span><span class="operation"><br/>
          <span class="mftitle">Method: </span><span class="method">POST</span><br/>
          <span class="mftitle">Address: </span><span class="address">http://spotmanager:
      8081/sunspots/Core2TestSpot/actuators/leds/led1</span><br/>
          <span class="mftitle">Input: </span><span class="input">Red</span><br/>
          <span class="mftitle">Output: </span><span class="output">The updated Resource</
      span><br/>
      </span>




Web of Things, 7.4.2010                Vlad Trifa - SAP/ETH Zurich
Take away notes

   ‣ It’s time for devices to join the Web
   ‣ Huge opportunities ahead for WoT
   ‣ The Web of Things is hard because
         ‣ People are good Web developers, xor
         ‣ Good embedded systems developers
   ‣ Tools & best practices for Web-enabled things are needed
   ‣ Tradeoff between performance and features
   ‣ Web developers need to apply their skills and
     expertise to build a programmable world
   ‣ We need applications (deployments)

Web of Things, 7.4.2010          Vlad Trifa - SAP/ETH Zurich
More!!!

   ‣ Some docs: http://www.webofthings.com/sxsw
   ‣ Play: http://tinyurl.com/sliderswot
   ‣ Slides: http://www.webofthings.com/talks/idd.pdf

   ‣     Demos:
   ‣     Browsing the spot manager
   ‣     Poster with content negotiation
   ‣     Javascript app to change LEDs colors
   ‣     Blink & curl!


Web of Things, 7.4.2010      Vlad Trifa - SAP/ETH Zurich
Thanks for your
             attention !




                   Vlad Trifa
            trifa@inf.ethz.ch
http://www.webofthings.com

More Related Content

What's hot

Physical Mashups in the Web-Home
Physical Mashups in the Web-HomePhysical Mashups in the Web-Home
Physical Mashups in the Web-Home
Dominique Guinard
 
JavaZone 2014: En realitetsorientering om Tingenenes Internett, og hvordan du...
JavaZone 2014: En realitetsorientering om Tingenenes Internett, og hvordan du...JavaZone 2014: En realitetsorientering om Tingenenes Internett, og hvordan du...
JavaZone 2014: En realitetsorientering om Tingenenes Internett, og hvordan du...
Simen Sommerfeldt
 

What's hot (20)

Imagining the Web of Things
Imagining the Web of ThingsImagining the Web of Things
Imagining the Web of Things
 
Vlad Trifa - Final PhD Thesis Defense at ETH Zurich
Vlad Trifa - Final PhD Thesis Defense at ETH ZurichVlad Trifa - Final PhD Thesis Defense at ETH Zurich
Vlad Trifa - Final PhD Thesis Defense at ETH Zurich
 
The Web of Things
The Web of ThingsThe Web of Things
The Web of Things
 
RESTifyng Physical Products
RESTifyng Physical ProductsRESTifyng Physical Products
RESTifyng Physical Products
 
The Web of Things
The Web of ThingsThe Web of Things
The Web of Things
 
Physical Mashups in the Web-Home
Physical Mashups in the Web-HomePhysical Mashups in the Web-Home
Physical Mashups in the Web-Home
 
WoT Tutorial @ Cisco
WoT Tutorial @ CiscoWoT Tutorial @ Cisco
WoT Tutorial @ Cisco
 
WoT @ Oracle-Labs
WoT @ Oracle-LabsWoT @ Oracle-Labs
WoT @ Oracle-Labs
 
When Things will Speak "Web" (Lecture)
When Things will Speak "Web" (Lecture)When Things will Speak "Web" (Lecture)
When Things will Speak "Web" (Lecture)
 
Web of things introduction
Web of things introductionWeb of things introduction
Web of things introduction
 
Web of Things Application Architecture
Web of Things Application ArchitectureWeb of Things Application Architecture
Web of Things Application Architecture
 
5 Years of Web of Things Workshops
5 Years of Web of Things Workshops5 Years of Web of Things Workshops
5 Years of Web of Things Workshops
 
EPC Cloud: Using the Web to Simplify the Global RFID Network
EPC Cloud: Using the Web to Simplify the Global RFID NetworkEPC Cloud: Using the Web to Simplify the Global RFID Network
EPC Cloud: Using the Web to Simplify the Global RFID Network
 
Social Sharing In a Web of Things
Social Sharing In a Web of ThingsSocial Sharing In a Web of Things
Social Sharing In a Web of Things
 
Tourism and the Web of Things
Tourism and the Web of ThingsTourism and the Web of Things
Tourism and the Web of Things
 
JavaZone 2014: En realitetsorientering om Tingenenes Internett, og hvordan du...
JavaZone 2014: En realitetsorientering om Tingenenes Internett, og hvordan du...JavaZone 2014: En realitetsorientering om Tingenenes Internett, og hvordan du...
JavaZone 2014: En realitetsorientering om Tingenenes Internett, og hvordan du...
 
Smart Objects
Smart ObjectsSmart Objects
Smart Objects
 
Ethics_Internet of Things
Ethics_Internet of ThingsEthics_Internet of Things
Ethics_Internet of Things
 
Web-based Smart Things Ecosystems
Web-based Smart Things EcosystemsWeb-based Smart Things Ecosystems
Web-based Smart Things Ecosystems
 
WoT 2016 - Seventh International Workshop on the Web of Things
WoT 2016 - Seventh International Workshop on the Web of ThingsWoT 2016 - Seventh International Workshop on the Web of Things
WoT 2016 - Seventh International Workshop on the Web of Things
 

Viewers also liked

Building a Web of Things Talk at Lugano
Building a Web of Things Talk at LuganoBuilding a Web of Things Talk at Lugano
Building a Web of Things Talk at Lugano
Vlad Trifa
 
feasibility study on Solar based referigeration system
feasibility study on Solar based referigeration systemfeasibility study on Solar based referigeration system
feasibility study on Solar based referigeration system
patil_13pramod290
 
TRANSPORTATION PLANNING
TRANSPORTATION PLANNINGTRANSPORTATION PLANNING
TRANSPORTATION PLANNING
intan fatihah
 

Viewers also liked (20)

T A G.cv.art.en.NEW
T A G.cv.art.en.NEWT A G.cv.art.en.NEW
T A G.cv.art.en.NEW
 
pepe271
pepe271pepe271
pepe271
 
Planning Wars - Planning lessons from liveable cities
Planning Wars - Planning lessons from liveable citiesPlanning Wars - Planning lessons from liveable cities
Planning Wars - Planning lessons from liveable cities
 
Public Transport Efficiency: Zurich, Vienna and On-Line
Public Transport Efficiency: Zurich, Vienna and On-LinePublic Transport Efficiency: Zurich, Vienna and On-Line
Public Transport Efficiency: Zurich, Vienna and On-Line
 
5. Lesson Five - Partnerships and Routines
5. Lesson Five - Partnerships and Routines5. Lesson Five - Partnerships and Routines
5. Lesson Five - Partnerships and Routines
 
Integrated public transport
Integrated public transportIntegrated public transport
Integrated public transport
 
Building a Web of Things Talk at Lugano
Building a Web of Things Talk at LuganoBuilding a Web of Things Talk at Lugano
Building a Web of Things Talk at Lugano
 
Design of a Web-based Distributed Location-aware Infrastructure for Mobile De...
Design of a Web-based Distributed Location-aware Infrastructure for Mobile De...Design of a Web-based Distributed Location-aware Infrastructure for Mobile De...
Design of a Web-based Distributed Location-aware Infrastructure for Mobile De...
 
feasibility study on Solar based referigeration system
feasibility study on Solar based referigeration systemfeasibility study on Solar based referigeration system
feasibility study on Solar based referigeration system
 
Transportation Planning for Car Free Living: The Evolution of Zurich, Switzer...
Transportation Planning for Car Free Living: The Evolution of Zurich, Switzer...Transportation Planning for Car Free Living: The Evolution of Zurich, Switzer...
Transportation Planning for Car Free Living: The Evolution of Zurich, Switzer...
 
Web of Things Book Launch
Web of Things Book LaunchWeb of Things Book Launch
Web of Things Book Launch
 
A level-based approach to public transport network planning
A level-based approach to public transport network planningA level-based approach to public transport network planning
A level-based approach to public transport network planning
 
The Art of API Crafting for the IoT
The Art of API Crafting for the IoTThe Art of API Crafting for the IoT
The Art of API Crafting for the IoT
 
UX and Scrum
UX and ScrumUX and Scrum
UX and Scrum
 
10 Tips for Creating Great User Stories
10 Tips for Creating Great User Stories10 Tips for Creating Great User Stories
10 Tips for Creating Great User Stories
 
Predictable Disruption - Tech Vision 2016 Trend 4
Predictable Disruption - Tech Vision 2016 Trend 4Predictable Disruption - Tech Vision 2016 Trend 4
Predictable Disruption - Tech Vision 2016 Trend 4
 
Become a Great Product Manager
Become a Great Product ManagerBecome a Great Product Manager
Become a Great Product Manager
 
TRANSPORTATION PLANNING
TRANSPORTATION PLANNINGTRANSPORTATION PLANNING
TRANSPORTATION PLANNING
 
Product Strategy and Product Success
Product Strategy and Product SuccessProduct Strategy and Product Success
Product Strategy and Product Success
 
LinkedIn SlideShare: Knowledge, Well-Presented
LinkedIn SlideShare: Knowledge, Well-PresentedLinkedIn SlideShare: Knowledge, Well-Presented
LinkedIn SlideShare: Knowledge, Well-Presented
 

Similar to Web of Things - Towards Open and Sharable Networks of Embedded Devices

Web Messaging for Open for Web of Things
Web Messaging for Open for Web of ThingsWeb Messaging for Open for Web of Things
Web Messaging for Open for Web of Things
Dominique Guinard
 
Azure & WP7 at GRDevDay
Azure & WP7 at GRDevDayAzure & WP7 at GRDevDay
Azure & WP7 at GRDevDay
Sam Basu
 
What's New with Windows Phone - FoxCon Talk
What's New with Windows Phone - FoxCon TalkWhat's New with Windows Phone - FoxCon Talk
What's New with Windows Phone - FoxCon Talk
Sam Basu
 
Let's Peel Mangos
Let's Peel MangosLet's Peel Mangos
Let's Peel Mangos
Sam Basu
 

Similar to Web of Things - Towards Open and Sharable Networks of Embedded Devices (20)

Building a Scalable and Open World Wide Web of Things
Building a Scalable and Open World Wide  Web of ThingsBuilding a Scalable and Open World Wide  Web of Things
Building a Scalable and Open World Wide Web of Things
 
Web Messaging for Open for Web of Things
Web Messaging for Open for Web of ThingsWeb Messaging for Open for Web of Things
Web Messaging for Open for Web of Things
 
The advantages of Arista/OVH configurations, and the technologies behind buil...
The advantages of Arista/OVH configurations, and the technologies behind buil...The advantages of Arista/OVH configurations, and the technologies behind buil...
The advantages of Arista/OVH configurations, and the technologies behind buil...
 
Gluing the IoT world with Java and LoRaWAN
Gluing the IoT world with Java and LoRaWANGluing the IoT world with Java and LoRaWAN
Gluing the IoT world with Java and LoRaWAN
 
API Design and WebSocket
API Design and WebSocketAPI Design and WebSocket
API Design and WebSocket
 
Node-RED Interoperability Test
Node-RED Interoperability TestNode-RED Interoperability Test
Node-RED Interoperability Test
 
AR Wave: A Proof of Concept - Federation, Game Dynamics, Semantic Search, Mob...
AR Wave: A Proof of Concept - Federation, Game Dynamics, Semantic Search, Mob...AR Wave: A Proof of Concept - Federation, Game Dynamics, Semantic Search, Mob...
AR Wave: A Proof of Concept - Federation, Game Dynamics, Semantic Search, Mob...
 
Azure & WP7 at GRDevDay
Azure & WP7 at GRDevDayAzure & WP7 at GRDevDay
Azure & WP7 at GRDevDay
 
QuadraSpace Protocol
QuadraSpace ProtocolQuadraSpace Protocol
QuadraSpace Protocol
 
WebSocket Perspectives 2015 - Clouds, Streams, Microservices and WoT
WebSocket Perspectives 2015 - Clouds, Streams, Microservices and WoTWebSocket Perspectives 2015 - Clouds, Streams, Microservices and WoT
WebSocket Perspectives 2015 - Clouds, Streams, Microservices and WoT
 
Explore how to build dapp
Explore how to build dappExplore how to build dapp
Explore how to build dapp
 
Are you Energy Efficient? Sense it the WEB way
Are you Energy Efficient? Sense it the WEB wayAre you Energy Efficient? Sense it the WEB way
Are you Energy Efficient? Sense it the WEB way
 
IPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriya
IPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriyaIPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriya
IPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriya
 
Open Cloud Computing Interface Presentation
Open Cloud Computing Interface PresentationOpen Cloud Computing Interface Presentation
Open Cloud Computing Interface Presentation
 
A Distributed Simulation of P-Systems
A Distributed Simulation of P-SystemsA Distributed Simulation of P-Systems
A Distributed Simulation of P-Systems
 
July Clojure Users Group Meeting: "Using Cascalog with Palo Alto Open Data"
July Clojure Users Group Meeting: "Using Cascalog with Palo Alto Open Data"July Clojure Users Group Meeting: "Using Cascalog with Palo Alto Open Data"
July Clojure Users Group Meeting: "Using Cascalog with Palo Alto Open Data"
 
What's New with Windows Phone - FoxCon Talk
What's New with Windows Phone - FoxCon TalkWhat's New with Windows Phone - FoxCon Talk
What's New with Windows Phone - FoxCon Talk
 
iguazio - nuclio Meetup Nov 30th
iguazio - nuclio Meetup Nov 30thiguazio - nuclio Meetup Nov 30th
iguazio - nuclio Meetup Nov 30th
 
Let's Peel Mangos
Let's Peel MangosLet's Peel Mangos
Let's Peel Mangos
 
Sparkling Water Webinar October 29th, 2014
Sparkling Water Webinar October 29th, 2014Sparkling Water Webinar October 29th, 2014
Sparkling Water Webinar October 29th, 2014
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

Web of Things - Towards Open and Sharable Networks of Embedded Devices

  • 1. Web of Things - Towards Open and Sharable Networks of Embedded Devices Internet Developer Summit 7. April 2010 Vlad Trifa - ETH Zurich/SAP Research
  • 2. Disclaimer 2001-2006 Studied Comp. Sci., Robotics, AI, Neurosciences @ EPFL 2005-2006 M.Sc. thesis @ UCLA, Bio-acoustics & Sensor Networks 2006-2007 Research in Humanoid Robotics @ ATR, Kyoto, Japan 2007-now Ph.D. @ ETH Zurich & SAP Research Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 3. Electronic things are invading us... ‣ Powerful tiny computers ‣ Sensors & actuators ‣ Web connectivity ‣ Cheap ‣ Ubiquitous Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 4. Translation for hackers: An infinite playground. YAAAY!
  • 5. Megaco Modbus OGC SensorML Zorro III AMQP OPC-UA
  • 6. Problem... How do we combine heterogeneous devices to create interactive ad-hoc applications? That is, without a PhD in Computer Science ‣ Tons of different devices: ‣ Capabilities/functions ‣ Applications/middlewares ‣ Networking protocols Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 7. We need an universal protocol that is: simple, lightweight, loosely- coupled, scalable, flexible and hopefully... standard
  • 8. Sounds like the Web... Use Web standards to develop applications for networked devices. HTTP, HTML, XML, JSON, RSS, ATOM, MIME,... ‣ TCP/IP & Web granted, WiFi routers ubiquitous ‣ Development of simple Web apps: cheap & quick ‣ Integrate real-world data on the Web ‣ Get features of the Web for free Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 9. WWWWW Social Web Physical Web Real-time Web Semantic Web Programmable Web Web of Things Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 11. The Web of Things in a nutshell Steps to create a basic Web of Things (v1.0): 1. Connecting things to the Internet (IPv4/IPv6) 2. Embedded Web servers 3. Make devices part of the Web (using REST) ‣ Model their function as RESTful resources Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 12. Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 13. RESTful SunSPOTs ‣ Properties and functions are RESTful resources ‣ Devices/services become Web resources ‣ URI-addressed ‣ Links between them (hateoas) ‣ Different representations (content negotiation) ‣ Uniform interface (HTTP verbs, status codes) Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 14. Sunspots resources modeling Services on embedded devices are adapted for resource oriented architectures ‣ root: www.spotshost.com ‣ spots list: www.spotshost.com/sunspots ‣ spot #1: www.spotshost.com/sunspots/1 ‣ sensors list: www.spotshost.com/sunspots/1/sensors ‣ LEDs : www.spotshost.com/sunspots/1/actuators/leds ‣ LED #1 : www.spotshost.com/sunspots/1/actuators/leds/led1 Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 15. Representations ‣ XHTML ideal for browsing http://webofthings.com/spots ‣ JSON ideal for parsing (& lightweight for device) http://webofthings.com/spots.json ‣ XML ideal for business integration http://webofthings.com/spots.xml Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 16. Uniform interface ‣ HTTP verbs ‣ GET: current temperature ‣ POST: add a timer ‣ PUT: turn a device on/off ‣ DELETE: delete a timer on a device ‣ HTTP headers ‣ Accept header for MIME types ‣ Status codes (200 ok, 401 unauthorized) Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 17. Gateway level integration: Energie Visible Web / Mobile  Interface GET http://10.1.1.5:8080/energymonitor/ploggs/* [{ Gateway  "deviceName": "ComputerAndScreen", (IP:10.1.1.5) "currentWatts": 50.52, "KWh": 5.835, "maxWattage": 100.56 }, "deviceName": "Fridge", "currentWatts": 86.28., Sensors "KWh": 4.421, (Ploggs) "maxWattage": 288.92 }, {...}] Electric  appliances D. Guinard and V. Trifa. Towards the web of things: Web mashups for embedded devices. In 2nd Workshop on Mashups, Enterprise Mashups and Lightweight Composition on the Web (MEM 2009), Madrid, Spain, April 2009. Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 18. OSGi gateway Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 19. The era of physical Mashups
  • 20. Real-world Web applications REST URL REST I AP Ja va P ST PH Sc RE rip t [hCp://www.pachube.com] [hCp://www.webothings.com/energievisible] [hCp://www.clickscript.ch] Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 21. Clickscript ‣ Javascript-based visual mashup editor ‣ Firefox plugin/Web app ‣ Based on DOJO/jQuery www.clickscript.ch Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 22. Clickscript component csComponentContainer.push({ name : "cs.web.things.switch", description : "switch on or off", inputs : [{name: "IP",type: "cs.type.String"}, {name: "on/off", type: "cs.type.Boolean"}], outputs: [ ], image: "web/things/plogg.png", exec : function(state){ this.setAsync(); var ip = state.inputs.item(0).getValue(); var aurl = "http://"+ip+":8082/EnergieVisible/ploggs/008098e7cb71/status.html"; var onoff = state.inputs.item(1).getValue() ? "on" : "off"; var component = this; Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 23. jQuery HTTP request $.ajax({ url: aurl, type: "PUT", data: ({status : onoff}), success: function(html){ alert("status of Plogg : " +onoff); component.finishAsync(); }, error: function(msg){ alert("Error on: "+aurl); } }); Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 24. Err, what about eventing & streaming ? The web wasn’t quite made for that...
  • 25. Here comes Real-Time Web ‣ Scalable pub/sub for devices is needed ‣ Many solutions (XMPP, etc....) ‣ None really integrate with the Web ‣ ATOM/ATOMpub is RESTful, but not push ‣ Push Web technologies ‣ Apply Web PUSH on devices ‣ Comet & Web hooks ‣ Bi-directional Web messaging (Websockets) Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 26. Data streams ‣ Sensor data represented as Web streams ‣ Publish/subscribe paradigm ‣ Users can create and subscribe to streams ‣ Parameterized ‣ devices ‣ sensors ‣ filter data ‣ sampling frequency ‣ Using REST... Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 27. Messaging implementation ‣ Messages transported in JSON ‣ Message broker as an external entity (outsourced) ‣ Swappable ‣ Scalable ‣ Currently use RabbitMQ ‣ Web integration with pubsubhubbub ‣ RESTful, Web-hook based pub/sub ‣ Support for CometD for Web push Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 28. Messaging Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 29. Request POST example.org/datastreams/ HTTP/1.1 Content-Type: application/x-www-form-urlencoded devices=purpleSensor & data=temperature,light & frequency=2 & filter=light < 200 && temperature > 19 Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 30. Response HTTP/1.1 201 [...] Content-Location: http://example.com:8085/datastreams/bh_0 [...] Connection: close ‣ Then we just subscribe to it: curl -vd "hub.mode=subscribe&hub.callback=http://example.com: 8888/client_callback_handler&hub.topic=&hub.verify=sync" http://example.com:8085/datastreams/bh_0 Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 31. Messaging JS solution ‣ jQuery - allows HTTP requests from Javascript ‣ reversehttp - allows passing HTTP requests to client Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 32. function registerDatastream(devices, dataFields, frequency, filter) { var formData = "devices=" + devices + "&data=" + dataFields; if (frequency != "") { formData += "&frequency=" + frequency; } if (filter != "") { formData += "&filter=" + filter; } $.ajax( { type : "POST", url : “http://example.com:8085/datastreams", data : formData, success : function(msg, textStatus, xhr) { if (xhr.status != 201) { alert("Error creating datastream: " + xhr.statusText); } else { queueURL = msg; } }, dataType : "text" }); } Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 33. function startServerList() { virtualHost = "vh" + Math.round(Math.random() * 100000); new HttpServer(virtualHost, function(req) { if (req.method == "get") { // subscription verification request [...] } else { // normal message (HTTP POST) var msg = JSON.parse(req.body); var light = msg.data[0].light; var temp = msg.data[0].temp; alert(“Current light level: “ + light); req.respond(200, "OK", {}, ""); } }); } Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 34. Device Discovery ‣ Idea: all device pages contain semantic metadata ‣ Like the header metadata for web robots ‣ Machine-readable user manual ‣ Human-readable documentation ‣ Proposed solution: microformats for devices ‣ What resources are available? ‣ What are their input/output? ‣ What methods are accepted? ‣ Keywords? ‣ Eventing channels? ‣ Maybe documentation? Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 35. <span class="service"> <span class="mftitle">Label: </span><span class="label"></span><br/> <span class="mftitle">Data Format: </span><span class="data-format">Integer</ span><br/> <span class="mftitle">Operation: </span><span class="operation"><br/> <span class="mftitle">Method: </span><span class="method">POST</span><br/> <span class="mftitle">Address: </span><span class="address">http://spotmanager: 8081/sunspots/Core2TestSpot/actuators/leds/led1</span><br/> <span class="mftitle">Input: </span><span class="input">Red</span><br/> <span class="mftitle">Output: </span><span class="output">The updated Resource</ span><br/> </span> Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 36. Take away notes ‣ It’s time for devices to join the Web ‣ Huge opportunities ahead for WoT ‣ The Web of Things is hard because ‣ People are good Web developers, xor ‣ Good embedded systems developers ‣ Tools & best practices for Web-enabled things are needed ‣ Tradeoff between performance and features ‣ Web developers need to apply their skills and expertise to build a programmable world ‣ We need applications (deployments) Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 37. More!!! ‣ Some docs: http://www.webofthings.com/sxsw ‣ Play: http://tinyurl.com/sliderswot ‣ Slides: http://www.webofthings.com/talks/idd.pdf ‣ Demos: ‣ Browsing the spot manager ‣ Poster with content negotiation ‣ Javascript app to change LEDs colors ‣ Blink & curl! Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
  • 38. Thanks for your attention ! Vlad Trifa trifa@inf.ethz.ch http://www.webofthings.com