Design Principles For Web Connectivity
Design Principles For Web Connectivity
Design Principles For Web Connectivity
Constrained Unconstrained
RESTful Environment
Environment
(CoRE)
Constrained RESTful Environment
(CoRE)
• M2M and IoT communication - LAN
• Each Device sends 10’s of data
• After data consolidation from many devices - 100’s od data is
gathered
• The gateway communicates over internet using REST API
Constraints
• Devices can sense data in limited size compared to web
clients/servers
• Data routing - routing over a n/w of low power & loss(ROLL) :
wireless n/w with low power transceivers
• Devices sleep in low power environment
Unconstrained Environment
• Web applications use HTTP and REST Ful HTTP for web client/server
communication
• Data routes over IP n/w for internet
• Web applications use IP, TCP protocols
(b)
(c)
CoAP- CoAP Client Web Connectivity
• A Proxy is the intermediate server – accepts request from client & sends
response to client
• HTTP – CoAP Proxy accepts request from HTTP client using HTTP Protocol
and sends request to server using CoAP protocol
• CoAP – HTTP Proxy accepts request from CoAP client using CoAP Protocol
and sends request to server using HTTP protocol
• TLS (Transport Layer Security) known as SSL (Secure Socket Layer)is the
protocol used for securing the TCP based internet data interchanges , DTLS
for datagrams
• DTLS features
• 3 types of security services – Integrity, authentication & confidentiality
• DTLS= TLS+UDP
• Well suited for tunneling applications(VPN)
• Uses Open SSL repository openssl-0.9.8 Security based PSK, RPK & certificate
CoAP- Secured use of Key for client Authentication
PSK - Pre Shared Key is a method of securing using a key to authenticate a
client
• Contains up to 133 characters in English
• Generates unique encryption key for each client
• PSK is a symmetric key without forward secrecy (sender key not secret
from receiver)
• K12 for Encryption and Decryption
RPK – Random Pair wise keys/ Raw public key
• Means Private /public Key are asymmetric
Certificate
• X.509 is a certificate authorized by CA (Certification Authority) & PKI
(Public Key infrastructure)
LWM2M
•XML is an open source and is widely used for encoding messages and
texts.
•XMPP is an XML based specification for messaging and presence
protocols.
•XMPP is also an open source protocol.
•Messages notify presence for the IMs to one or many at the same
time. It enables chatting and Multi –user chat (MUC) after creation of a
chat room where different users can do the IMs.
•XMPP enables interoperable communication for ex: GoogleTalk.
•XMPP uses IMs between many users as it uses presence-notifications
and chat features.
XMPP Protocol
•XML is extensible-XSF (XMPP Standard Foundation) developes and
publishes the xeps(XMPP extension protocols).
•List of xeps for web objects are: xep-DataForms Format, xep-XHTML-
IM, xep-Service Discovery, Xep-FileTransfer
•XMPP-IoT xeps extend the use of XMPP to IoT and machine to machine
messaging.
•List of extensions for xeps are: xep-0322 efficient XML interchange EXI
format, xeps-0323 Internet of things-sensor data etc.
•Figure 3.7 shows use of the XMPP and XMPP Extension protocols for
connected devices and web objects.
•Simple Authentication and Secirty Layer (SASL) and TLS are security
protocols for APIs and web objects messages using TCP/IP network.
•XML streams in XMPP format communicate between the devices,
deviices to web objects and between the web objects.
Features of XMPP Protocol
•XMPP uses XML
•XML elements are sent in the open ended stream within the tag
<stream. And corresponding end tag </stream>
•The three basic types of XMPP stanzas are Message, presence,
iq(information query, request/response
•Extensibility to constrained environment messaging and presence
protocols as well as IP network messaging.
•Extensibility of request-response architecture to iq. PubSub messaging,
Chat Room messaging.
•Authentication by SASL/TLS and support from intelligent and business
analyst applications.
XMPP does the following:
•Binary data is first encoded using base 64 and then transmitted in
band.
•No end to end encryption
•Higher overhead being text based in place of binary implementation
•No support for QoS like MQTT does
Web Connectivity for connected devices
network
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 the
sender and 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.
Continued…
SOAP
•Applications need to exchange objects on the Internet using protocols
such as HTTP.
•SOAP-Simple Object Application Protocol is an 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
standard of the internet-HTTP and XML.
Continued…
SOAP
•Applications need to exchange objects on the Internet using protocols
such as HTTP.
•SOAP-Simple Object Application Protocol is an 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
standard of the internet-HTTP and XML. (REFER textbook)
Continued…
REST and RESTful HTTP Web Applications
•Representational State Transfer.
•REST is a coordinated set of constraints which are used during the
design of software components.
•WWW uses REST practices and constraints.
•REST is a simpler alternative for SOAP and Web services Description
Languaage (WSDL).
•Due to its architectural property, user interface and user state are of no
concern to the server.
•REST’s client server separation simplifies the component
implementation, increases scalability, reduces complexity of connector
semantics and improves effectiveness of performance tuning.
•Client-Server interactions, Layered system, Representations
Continued…
RESTful HTTP Web Applications
•When all interactions used in the applications conform fully to the REST
constraints then these are called RESTful.
•REST architectural style can be used for HTTP access by GET, POST, PUT
and DELETE methods
Static IP address
A static IP address is the one assigned by the internet service provider.
Dynamic IP address
Once a device connects to the internet, it needs to be allotted an
individual IP address.
When the device connects to router, the router and device use the
DHCP which assigns an IP address at an instance to the device. This
address is called Dynamic IP address.
IP Addressing in the IoT
DNS- Domain Name Server