Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
web connectivity in IoT
1.
2. Design Principles for the Web Connectivity
Web Communication
protocols
Introduction for web
Connectivity
Web Connectivity
Message
Communication
protocols
3. Web Connectivity
1. Communication Gateway
2. HTTP Request and Response Method
• Data Exchanges Between HTTP Web-
Objects
3. SOAP
4. REST and RESTful HTTP Web Applications
• RESTful
• RESTful HTTP APIs
• RESTful HTTP Verbs
5. WebSocket
4. Web Connectivity
1. Communication Gateway
2. HTTP Request and Response Method
• Data Exchanges Between HTTP Web-
Objects
3. SOAP
4. REST and RESTful HTTP Web Applications
• RESTful
• RESTful HTTP APIs
• RESTful HTTP Verbs
5. WebSocket
5. Web Connectivity
• Communication gateway connects two
application layers, one at sender and the
other at receiver.
• Enables use of two different protocols,
one at sender and the other at receiver
ends.
• Communication between web server
using the TCP/IP protocol conversion
gateway and IoT devices.
• Communication between the devices
using CoAP client and server using
6. Web Connectivity
1. Communication Gateway
2. HTTP Request and Response Method
• Data Exchanges Between HTTP Web-
Objects
3. SOAP
4. REST and RESTful HTTP Web Applications
• RESTful
• RESTful HTTP APIs
• RESTful HTTP Verbs
5. WebSocket
7. Web Connectivity
• An application uses a protocol.
• The protocols for Internet are HTTP,
FTP, SMTP, POP3, TELNET and several
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.
8. Web Connectivity
1. Communication Gateway
2. HTTP Request and Response Method
• Data Exchanges Between HTTP Web-
Objects
3. SOAP
4. REST and RESTful HTTP Web Applications
• RESTful
• RESTful HTTP APIs
• RESTful HTTP Verbs
5. WebSocket
9. Web Connectivity
• An HTTP transfer is stateless (data
transfer is an independent request).
• Therefore, header overhead information
and meta-data of previous state need to
be present with each HTTP request.
• Metadata is data which describes the
data for interpretation in future.
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
10. Web Connectivity
1. Communication Gateway
2. HTTP Request and Response Method
• Data Exchanges Between HTTP Web-
Objects
3. SOAP
4. REST and RESTful HTTP Web Applications
• RESTful
• RESTful HTTP APIs
• RESTful HTTP Verbs
5. WebSocket
11. Web Connectivity
• 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 specifies the formats and
way of communicating the messages.
• SOAP functions connect the GUI
applications to web servers using the
standards of the Internet—HTTP and
XML.
• Microsoft’s .NET architecture supports
SOAP for Internet application
development.
• SOAP uses a body element after the
specifications in an envelope.
• The body element contains the SOAP
message intended for ultimate endpoint
of the message.
12. Web Connectivity
• A SOAP request could be an HTTP
POST, or an HTTP GET request.
• The HTTP POST request specifies at least
two HTTP headers: content type and
content length.
• A SOAP method uses HTTP
request/response after the HTTP binding
with the SOAP.
• The request and response complies with
the SOAP encoding rules.
13. Web Connectivity
1. Communication Gateway
2. HTTP Request and Response Method
• Data Exchanges Between HTTP Web-
Objects
3. SOAP
4. REST and RESTful HTTP Web Applications
• RESTful
• RESTful HTTP APIs
• RESTful HTTP Verbs
5. WebSocket
14. Web Connectivity
• W3C Technical Architecture Group
(TAG) developed the Representational
State Transfer (REST) architectural style.
• REST is a simpler alternative for SOAP
and Web Services Description Language
(WSDL).
• REST style web resources and Resource-
Oriented Architecture (ROA) have
increasingly replacing SOAP.
• The architectural properties of REST are
realized by applying specific interaction
constraints to data elements,
components, connectors and objects.
• REST software architecture style
provisions for the use of specific
practices, such as client-server mode of
communication and layered system
architectural approach
15. Web Connectivity
1. Communication Gateway
2. HTTP Request and Response Method
• Data Exchanges Between HTTP Web-
Objects
3. SOAP
4. REST and RESTful HTTP Web Applications
• RESTful
• RESTful HTTP APIs
• RESTful HTTP Verbs
5. WebSocket
16. Web Connectivity
• 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.
17. Web Connectivity
1. Communication Gateway
2. HTTP Request and Response Method
• Data Exchanges Between HTTP Web-
Objects
3. SOAP
4. REST and RESTful HTTP Web Applications
• RESTful
• RESTful HTTP APIs
• RESTful HTTP Verbs
5. WebSocket
18. Web Connectivity
Standard HTTP methods are GET, PUT,
POST and DELETE. HTTP based RESTful
APIs use the following:
• URIs/URLs,
• REST-based web objects communicate
typically, but not always, over the HTTP.
• 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.
19. Web Connectivity
1. Communication Gateway
2. HTTP Request and Response Method
• Data Exchanges Between HTTP Web-
Objects
3. SOAP
4. REST and RESTful HTTP Web Applications
• RESTful
• RESTful HTTP APIs
• RESTful HTTP Verbs
5. WebSocket
20. Web Connectivity
REST interfaces usually involve resource
repositories with identifiers. For example, /
Device Network/device or /Temperature
App, 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.
• POST command creates a new entry in
the resource repository for the resources.
• PUT command which replaces the entire
resource repository with another
resource repository or replaces the
resource item of the repository.
• DELETE command from client retrieves
web objects and sends data to remote
servers
21. Web Connectivity
1. Communication Gateway
2. HTTP Request and Response Method
• Data Exchanges Between HTTP Web-
Objects
3. SOAP
4. REST and RESTful HTTP Web Applications
• RESTful
• RESTful HTTP APIs
• RESTful HTTP Verbs
5. WebSocket
22. Web Connectivity
• Instant messaging and many applications
need bidirectional data exchanges over
the same connection. WebSocket enables
bidirectional communication over a
single TCP connection.
• WSAPI attributes are URL, protocol,
ready state, buffered amount and are
extendable.
• The API functions are send (frame) and
close (socket).
• The Web Sockets enable easier usage of
existing infrastructure, authentication,
filtering and proxies.
• Number of popular browsers support the
protocol.
24. Web Connectivity
Features of WebSocket are:
• Small header size
• 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.
• Protocol uses default port 80 for regular
• Protocol is intended to be compatible
with HTTP-based server-side software
and intermediaries, so that a single port
can be used by both HTTP clients talking
to that server and WebSocket clients
talking to that server.
• Protocol specifies six frame types and
leaves ten reserved for future use.
• Clients and servers exchange the
‘messages’ after a successful handshake.