UNIT-3_IOT
UNIT-3_IOT
6. 6. Finds client disconnection until DISCONNET message receives, keeps message alive
till explicit disconnection.
iv) XMPP: Stands for Extensible message presence protocol. XMPP is an XML-based
specification for messaging and presence protocols, a set of open technologies for instant
messaging, multi-party chat, voice and video calls, lightweight middleware, content
syndication, and generalized routing of XML data. XMPP is also an open-source protocol
recommended specification which is accepted by IETF.
XMPP can handle many of the core functions of a chat app including:
• Sending and receiving messages.
• Broadcasting a user's status.
• Managing a friends/contact list.
• And my personal favorite—blocking users from sending you messages.
XMPP Stanzas : XMPP transmits fragments of XML between two network endpoints.
Specifically, the XML fragments transmitted by XMPP, and used for basic communication,
are called stanzas. There are 3 types of stanzas used in XMPP.
• Presence stanza : the presence stanza is used to share the status of a network or user to
other users, networks, or servers.
REST APIs don't store any information about a user's session. This means that every
request must provide complete data to be processed.
REST APIs are cacheable, meaning that clients can store responses returned by
servers. This speeds up the response time for end-users.
REST APIs use a layered system architecture, which limits component behavior to
improve application stability and security.
REST APIs use a uniform interface, which defines a uniform contract and prohibits
the use of multiple interfaces within an API.
REST APIs can send responses as executable codes, which should only run on-
demand.
The RESTful API allows software developers to access a set of resources through
HTTP. This type of API encodes communication as JSON or XML with a content-
type header
RESTful APIs use HTTP requests to access and use data. The data types that can be
used are GET, PUT, POST, and DELETE, which correspond to reading, updating,
creating, and deleting operations
iv) WebSockets: WebSocket is an IETF accepted protocol. Instant messaging and many
applications need bidirectional data exchanges over the same connection. WebSocket enables
bidirectional communication over a single TCP connection. It is a stateful protocol, which
means the connection between client and server will stay alive until it gets terminated by either
party (client or server). After closing the connection by either of the client or server, the
connection is terminated from both ends.
The following are the Features of WebSocket :