0% found this document useful (0 votes)
271 views16 pages

Web Connectivity For Connected Devices

Uploaded by

siva govind
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
271 views16 pages

Web Connectivity For Connected Devices

Uploaded by

siva govind
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

WEB CONNECTIVITY FOR CONNECTEDDEVICES

NETWORK USING GATEWAY, SOAP, REST, HTTP


RESTFUL AND WEBSOCKETS
The following subsections describe the uses of gateway, SOAP, REST, RESTful HTTP
and WebSockets for connecting web objects
Communication Gateway
HTTP Request and Response Method
SOAP
REST and RESTful HTTP Web Applications
WebSocket

WEB CONNECTIVITY FOR CONNECTEDDEVICES NETWORK USING GATEWAY, SOAP, REST, HTTP
2 / 16
RES
Communication Gateway
Communication gateway connects two application layers, one at sender and the other
at receiver. The gateway also enables use of two different protocols, one at sender and
the other at receiver ends. The gateway facilitates the communication between web
server using the TCP/IP protocol conversion gateway and IoT devices. It also facilitates
communication between the devices using CoAP client and server using HTTP.

WEB CONNECTIVITY FOR CONNECTEDDEVICES NETWORK USING GATEWAY, SOAP, REST, HTTP
3 / 16
RES
Communication Gateway
The gateway provisions for one or more of the following functions
Connects the sender and receiver ends using two different protocols. For example,
IoT devices network maybe ZigBee network for connecting the devices. The
network then connects to the web server through a gateway. The server posts and
gets the data using HTTP. A gateway facilitates the communication between IoT
devices and web server.
Functions as proxy between the system and server.

WEB CONNECTIVITY FOR CONNECTEDDEVICES NETWORK USING GATEWAY, SOAP, REST, HTTP
4 / 16
RES
HTTP Request and Response Method
An application uses a protocol. The application layer in TCP/IP suite of protocols for
Internet uses HTTP, FTP, SMTP, POP3, TELNET and a number of other protocols.
HTTP is most widely used application layer protocol for communication over TCP/IP.
An HTTP client connects to an HTTP server using TCP and then the client sends a
resource after establishing an HTTP connection.

WEB CONNECTIVITY FOR CONNECTEDDEVICES NETWORK USING GATEWAY, SOAP, REST, HTTP
5 / 16
RES
Data Exchanges Between HTTP Web-Objects

An HTTP connection enables a one-way communication at an instance from client API to


a server or from server to the API. HTTP polling is a method for receiving new messages
or updates from an HTTP server.

Polling means finding whether new messages or updates are available and receiving them
in case they are.

WEB CONNECTIVITY FOR CONNECTEDDEVICES NETWORK USING GATEWAY, SOAP, REST, HTTP
6 / 16
RES
Data Exchanges Between HTTP Web-Objects

Ways of transferring both ways at the same instant are:


Multiple TCP connection
HTTP requests at short, regular intervals so that responses are nearly in real time
Polling at successive intervals
HTTP long polling means API sends a request to the server, which keeps the
request open for a set period
Stream hidden in iFrame Polling methods have high latencies and header sizes of
100s of bytes. An alternative to this is using Java Applets, Silverlight or Flash
plugins.

WEB CONNECTIVITY FOR CONNECTEDDEVICES NETWORK USING GATEWAY, SOAP, REST, HTTP
7 / 16
RES
SOAP

Applications need to exchange objects on the Internet using protocols such as HTTP. Ap-
plications may be using different languages and platforms. Simple Object Access (SOAP)
is a W3C approved open-source protocol.

SOAP is a protocol for exchange of objects between applications using XML. It is also a
protocol for access to a web service.

SOAP enables development of applications and APIs. SOAP functions connect the GUI
applications to web servers using the standards of the Internet—HTTP and XML. Mi-
crosoft’s .NET architecture supports SOAP for Internet application development.

WEB CONNECTIVITY FOR CONNECTEDDEVICES NETWORK USING GATEWAY, SOAP, REST, HTTP
8 / 16
RES
SOAP
(a) A SOAP request or response communication between gateway weatherMsgG and
weather service weatherMsgService, (b) SOAP message structure, (c) SOAP POST
from weatherMsgG, (d) Request Get weatherMsgG, and (e) SOAP response weatherMs-
gID250715 at weatherMsgService to weatherMsgG using Internet and HTTP binding

WEB CONNECTIVITY FOR CONNECTEDDEVICES NETWORK USING GATEWAY, SOAP, REST, HTTP
9 / 16
RES
REST and RESTful HTTP Web Applications

W3C Technical Architecture Group (TAG) developed the Representational State Transfer
(REST) architectural style.
The group worked in parallel with HTTP 1.1.
REST is a coordinated set of constraints which are used during design of software com-
ponents in a distributed hypermedia, and the design depends on the characteristics of
stateless, client-server, cacheable communication using a protocol.
REST style web resources and Resource-Oriented Architecture (ROA) have increasingly
replacing SOAP

WEB CONNECTIVITY FOR CONNECTEDDEVICES NETWORK USING GATEWAY, SOAP, REST, HTTP
10 / 16
RES
RESTful

When all interactions used in the applications conform fully to the REST constraints then
these are called RESTful. RESTful APIs comply with these constraints and thus conform
to the REST architectural style. Web services with RESTful APIs adhere to the REST
architectural constraints.
REST architectural style can be used for HTTP access by GET, POST, PUT and DELETE
methods for resources and building web services.

WEB CONNECTIVITY FOR CONNECTEDDEVICES NETWORK USING GATEWAY, SOAP, REST, HTTP
11 / 16
RES
RESTful HTTP APIs

Standard HTTP methods are GET, PUT, POST and DELETE. HTTP based RESTful
APIs use the following:
URIs/URLs, such as http://weatherMsgService.com/weatherMsg/ and hypertext
links to reference state and reference related resources, and JSON, TLV or an
Internet media type (MIME type) hypertext links
REST-based web objects communicate typically, but not always, over the HTTP.
The World Wide Web itself represents the largest implementation of a system
conforming to the REST architectural style. RESTful HTTP system feature is that
communication is over the HTTP and use verbs (commands) same as in HTTP,
namely GET, POST, PUT and DELETE.

WEB CONNECTIVITY FOR CONNECTEDDEVICES NETWORK USING GATEWAY, SOAP, REST, HTTP
12 / 16
RES
RESTful HTTP Verbs
REST interfaces usually involve resource repositories with identifiers. For example, /
deviceNetwork/device or /TemperatureApp, which can be operated upon using standard
verbs as follows:
GET command is to get a list of the URIs for resource repository of the resources
and perhaps other details of the members in the repository.
POST command creates a new entry in the resource repository for the resources.
The new entry’s URI is assigned automatically and is usually returned by the
operation. An option which is not generally used considers the resource item as a
repository on its own right and create a new entry in it (not generally used).
PUT command which replaces the entire resource repository with another resource
repository or replaces the resource item of the repository (or if it does not exist,
then create it).
DELETE command from client retrieves web objects and sends data to remote
servers. WEB CONNECTIVITY FOR CONNECTEDDEVICES NETWORK USING GATEWAY, SOAP, REST, HTTP
13 / 16
RES
WebSocket
RFC 6455 describes the specifications of the web protocol12. WebSocket is an
IETF accepted protocol. WebSocket API (WSAPI) W3C standard is Web Interface
Definition Language (Web IDL)
Instant messaging and many applications need bidirectional data exchanges over
the same connection. WebSocket enables bidirectional communication over a single
TCP connection.

WEB CONNECTIVITY FOR CONNECTEDDEVICES NETWORK USING GATEWAY, SOAP, REST, HTTP
14 / 16
RES
WebSocket
Features of WebSocket are:
Small header size (2B extended to 6 byte and above compared to 100s B and
above for an HTTP header which results in high latency
No new connection which will need a new header and thus no new latency period
WSAPIs, because of very low connection latencies, facilitate live content and the
creation of real-time games
Protocol is an independent TCP-based protocol. Its only relationship to HTTP is
that its handshake is interpreted by HTTP servers as an upgrade request.
Protocol uses default port 80 for regular WebSocket connections using ws:// and
port 443 when using wss:// for WebSocket connections tunnelled over Transport
Layer Security (TLS).

WEB CONNECTIVITY FOR CONNECTEDDEVICES NETWORK USING GATEWAY, SOAP, REST, HTTP
15 / 16
RES
WebSocket

Protocol specifies six frame types and leaves ten reserved for future use (version
13).
Extensibility of request-response (client-server) architecture to iq (information
through and querying) chat and super chat extensibility to cloud services.
Support from intelligent and business analyst applications and processing through
web server or XMPP server and gateway for connecting the device network with
the IP network.

WEB CONNECTIVITY FOR CONNECTEDDEVICES NETWORK USING GATEWAY, SOAP, REST, HTTP
16 / 16
RES

You might also like