Chap4. Interoperability REST
Chap4. Interoperability REST
IoT
Minimal
energy
consumption
Limited Size
Limited
computational
power
3
Issues Related to the Vertical Cloud Based (2)
5
Issues Related to the Vertical Cloud Based (3)
◎ One promising approach that is being brought to the IoT is the idea that
it should be built in a similar way to the Internet.
◎ The web has been around for decades and lots of experience has been
gained.
◎ The web was designed to be easy to use, distributed, and loosely
coupled (see below) system for sharing documents.
◎ The architecture of the web is simple enough to make it easy to build
applications and manage content.
7
REST
REpresentational State
Transfer (REST) is the
architectural style behind the
web. Defined in 2000 by Roy
Fielding.
8
Representation of Resources
9
Representation of Resources
10
Loosely Coupled means:
13
Statelessness
15
What is a Web Service?
17
Practical Used of Web Services
18
SOAP vs REST (1)
SOAP REST
SOAP stands for Simple Object Access REST stands for Representational State
Protocol Transfer
SOAP is a protocol. SOAP was designed REST is an Architectural style in which a web
with a specification. It includes a WSDL file service can only be treated as a RESTful
which has the required information on what service if it follows the constraints of being
the web service does in addition to the 1. Client Server
location of the web service. 2. Stateless
3. Cacheable
4. Layered System
5. Uniform Interface
SOAP cannot make use of REST since REST can make use of SOAP as the
SOAP is a protocol and REST is an underlying protocol for web services,
architectural pattern. because in the end it is just an architectural
pattern.
19
SOAP vs REST (2)
SOAP REST
SOAP uses service interfaces to expose its REST use Uniform Service locators to
functionality to client applications. In SOAP, access to the components on the hardware
the WSDL file provides the client with the device. For example, if there is an object
necessary information which can be used to which represents the data of an employee
understand what services the web service hosted on a URL as http://demo.guru99 , the
can offer. below are some of URI that can exist to
access them
http://demo.guru99.com/Employee
http://demo.guru99.com/Employee/1
SOAP requires more bandwidth for its usage. REST does not need much bandwidth when
Since SOAP Messages contain a lot of requests are sent to the server. REST
information inside of it, the amount of data messages mostly just consist of JSON
transfer using SOAP is generally a lot. messages. Below is an example of a JSON
message passed to a web server. You can
see that the size of the message is
comparatively smaller to SOAP.
20
SOAP vs REST (3)
SOAP REST
SOAP can only work with XML format. As REST permits different data format such as
seen from SOAP messages, all data passed Plain text, HTML, XML, JSON, etc. But the
is in XML format. most preferred format for transferring data is
JSON.
Source: https://www.guru99.com/comparison-between-web-services.html
21
REST Architecture
22
REST Architecture (2)
24
REST Methods (2)
25
26
Thanks!
Any questions?
You can find me at:
@username & [email protected]
27