0% found this document useful (0 votes)
5 views

Module 5

Uploaded by

avogadroangster
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Module 5

Uploaded by

avogadroangster
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Web of things

From The Internet Of Things To The Web Of Things


Need for WoT
• To interact with 10 different devices from your phone, you have to
install 10 different apps.
• Connecting every Thing to the Internet and giving them an IP
addresses.
• This is what Web protocols like HTTP brought to the Internet: a
universal way to describe images, text, and other media elements so
that machines could “understand” each.
• using and adapting Web protocols to connect anything in the physical
world and give it a presence on the World Wide Web!
Definition
• The Web of Things is a refinement of the Internet of Things by
integrating smart things not only into the Internet (network), but into
the Web Architecture (application)
• In such an architecture, popular Web technologies (e.g., HTML,
JavaScript, Ajax, PHP, Ruby) can be used to build applications involving
smart things, and users can leverage well-known Web mechanisms
(e.g., browsing, searching, bookmarking, caching, linking) to interact
with and share these devices.
• As more and more devices are getting connected to the Internet, the
next logical step is to use the World Wide Web and its associated
technologies as a platform for smart things (i.e., sensor and actuator
networks, embedded devices, electronic appliances and digitally
enhanced everyday objects).
• The “Web of Things” can be realised by applying principles of Web
architecture, so that real-world objects and embedded devices can
blend seamlessly into the Web.
• Instead of using the Web as a transport infrastructure – as done when
using Web services – we aim at making devices an integral part of the
Web and its infrastructure and tools by using HTTP as an application
layer protocol.
Layer 1: Access

• turning any Thing into a Web Thing that can be interacted with using
HTTP requests just like any other resource on the Web.
• a Web Thing is a REST API that allows to interact with something in
the real world, like opening a door or reading a temperature sensor
located across the planet.
• Illustration http://devices.webofthings.io/pi/sensors/
• but many IoT scenarios are real-time and/or event-driven (get
notified when something happens in the real world).
• Web protocol can help: WebSocket.
Layer 2: Find

• Marking things accessible via an HTTP and WebSocket API is great but
it doesn’t mean applications can really “understand” what the Thing
is, what data or services it offers, and so on.
• This layer ensures that your Thing can not only be easily used by
other HTTP clients but can also be findable and automatically usable
by other WoT applications.
Layer 3: Share

• how the data generated by Things can be shared in an efficient and


secure manner over the web.
• TLS, the protocol that makes transactions on the Web secure.
Layer 4: Compose

• once Things are on the Web (layer 1) where they can be found by
humans and machines (layer 2) and their resources can be shared
securely with others (layer 3), it’s time to look at how to build large-
scale, meaningful applications for the Web of Things.
• integration of data and services from heterogeneous Things into an
immense ecosystem of web tools such as analytics software
Example
• First step when Web-enabling a smart thing is to design its resource
network. Identification of resources and their relationships are the
two important aspects of this step
• On the Web, the identification of resources relies on Uniform Resource
Identifiers (URIs), and representations retrieved through resource interactions
contain links to other resources, so that applications can follow links through
an interconnected web of resources.
• Clients of RESTful services are supposed to follow these links, must like one
browses Web pages, in order to find resources to interact with.
• This allows clients to “explore” a service simply by browsing it, and in many
cases, services will use a variety of link types to establish different
relationships between resources.
• Each node has a few sensors (light, temperature, accelerometer, etc.),
actuators (digital outputs, LEDs, etc.), and a number of internal
components (radio, battery).
• Each of these components is modeled as a resource and assigned a
URI.
• For instance, typing a URI such as
http://.../sunspots/spot1/sensors/light
• In a browser requests a representation of the resource light of the
resource sensors of spot1. Resources are primarily structured
hierarchically and each resource also provides links back to its parent
and forward to its children
• Representing Resources
• Resources are abstract entities and are not bound to any particular
representation.
• Thus, several formats can be used to represent a single resource.
However, agreed upon resource representation formats make it
much easier for a decentralised system of clients and servers to
interact without the need for individual negotiations.
• On the Web, media type support in HTTP and the Hypertext
Markup Language (HTML) allow peers to cooperate without
individual agreements.
• It further allows clients to navigate amongst the resources using
hyperlinks.
• For machine-to-machine communication, other media types, such as the XML
and the JSON have gained widespread support across services and client
platforms.
• JSON is a lightweight alternative to XML that is widely used in Web 2.0
applications.
JSON Representation of the Temperature Resource
• The uniform interface is based on the identification (and thus interaction) of
resources, and in case of the Web, this interface is defined by the HTTP.
• HTTP provides four main methods to interact with resources - GET, PUT, POST,
and DELETE. GET is used to retrieve the representation of a resource
• In the Web of Things, these operations map rather naturally, since smart things
usually offer quite simple and atomic operations. As an example, a GET on,
http://.../spot1/sensors/temperature
• returns the temperature observed by spot1, i.e., it retrieves the current
representation of the temperature resource.
• A PUT on, http://.../sunspots/spot1/actuators/leds/1, with the updated JSON
representation {“status”:“on”} (which was first retrieved with a GET on /leds/1)
switches on the first LED of the Sun SPOT, i.e., it updates the state of the LED
resource.
Resource-oriented Architectures
• REST is based on the concept of a resource.
• A resource can be defined as any relevant entity in an application’s domain
that is exposed on the network.
• A webpage, a video, and an order on an e-commerce website can all be
considered web resources.
• A resource is any thing with which a user interacts while progressing
toward some goal.
• Anything can be mapped as a resource, as long as it is meaningful for the
application.
• Resources are characterized by some data, such as the title of the page or
the items in an order.
• Thank you

You might also like