IoT Viva Soln

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 18

1.

MQTT Protocol :
- stands for message queue telemetry transport

-it uses publish subscribe model of communication

-in MQTT client server comm. Client connects to the server and publishes message to topics
available on the server.

- MQTT is used in applications and devices where resources are limited and have low
bandwidth

-can engage several device connections concurrently

-is ideal for huge network of small devices and sensors that need to be monitored or
controlled.

2. QoS levels :
-The Quality of Service (QoS) level is an agreement between the sender of a message and
the receiver of a message that defines the guarantee of delivery for a specific message.
- There are 3 QoS levels in MQTT: At most once (0) At least once (1) Exactly once (2)
-level 0-

QOS 0 –  Once

This
mode.is the fastest method and requires only 1 message. It is also the most unreliable transfer

The message is not stored on the sender, and is not acknowledged.

The message will be delivered only once, or not at all.

Once
queue.the message has been sent by the client it is deleted from the outbound message

Therefore with this QOS level there is no possibility of duplicate messages.

QoS level 1-

This level guarantees that the message will be delivered at least once, but may be delivered
more than once.

Publishing with QOS of 1 requires 2 messages.

The sender sends a message and waits for an acknowledgement (PUBACK).

If it receives an acknowledgement then it notifies the client app, and deletes the message
from the outbound queue..

If it doesn’t receive an acknowledgement it will resend the message with the DUP flag set


(Duplicate Flag).The message will continue to be resent at regular intervals, until the sender
receives an acknowledgement.
QoS level 2-

This level guarantees that the message will be delivered only once.

This is the slowest method as it requires 4 messages.

1- The sender sends a message and waits for an acknowledgement (PUBREC)

2 -The receiver sends a PUBREC message

3. If the sender doesn’t receive an acknowledgement ( PUBREC)  it will resend the message
with the DUP flag set.

4. When the sender receives an acknowledgement message PUBREC it then sends a


message release message (PUBREL).

5. If the receiver doesn’t receive the PUBREL it will resend the PUBREC message

5. When the receiver receives the PUBREL message it can now forward the message onto
any subscribers.

6. The receiver then send a publish complete (PUBCOMP) .

7. If the sender doesn’t receive the PUBCOMP message it will resend the PUBREL message.

8. When the sender receives the PUBCOMP the process is complete and it can delete the
message from the outbound queue

3. Drawback of HTTP over MQTT -

MQTT has pretty short specification. There are only CONNECT, PUBLISH, SUBSCRIBE,
UNSUBSCRIBE and DISCONNECT types that are significant for developers. Whereas HTTP
specifications are much longer.

MQTT has a very short message header and the smallest packet message size of 2 bytes. 

MQTT Protocol is easy of use. It is essential when response time, throughput, lower battery
and bandwidth usage are on the first place for future solutions.
HTTP is worthy and extendable. But MQTT is more suitable when it is referred to IoT
development.

According to measurements in 3G networks, throughput of MQTT is 93 times faster than


HTTP’s.

Besides, in comparison to HTTP, MQTT Protocol ensures high delivery guarantees.

4. REST VS SOAP

SOAP stands for Simple Object Access Protocol whereas REST stands for Representational
State Transfer.

SOAP is a protocol whereas REST is an architectural pattern.

SOAP uses service interfaces to expose its functionality to client applications while REST uses
Uniform Service locators to access to the components on the hardware device.

SOAP needs more bandwidth for its usage whereas REST doesn’t need much bandwidth.

SOAP only works with XML formats whereas REST work with plain text, XML, HTML and
JSON.

SOAP cannot make use of REST whereas REST can make use of SOAP.

5. Coap Protocol

Stands for constrained application protocol. It is a 2 layered lightweighted protocol.

Used for M2M comm. Where applications are meant for small embedded devices, controlled
environment, etc

It uses client server communication using UDP based communication by default and
occasionally with TCP.

Coap works with HTTP to provide basic support of the web. Hence, proxies can be used to
access the Coap resources via HTTP

It works in 2 main modules - Request Response Model and Messaging Module.

Request response manages the comm. Channel while messaging module manages
duplication and reliability of msgs.
6. How to select an appropriate protocol for an IOT application.

*Nahi mila

7. What are the features of REST architectural style

Rest is stateless - each request receives its own response and it is not related with any other
reply or request.Each request must describe its requirement in the request itself as no data
from previous context is available.

REST follows unidirectional data flow.

It uses request-response communication model.

Each HTTP request sets up new TCP connection

It supports JSON and XML

Scalability is easier in REST as the requests are independent.

8. Explain XMPP protocol with applications


Extensible Messaging and Presence Protocol (XMPP) is an open XML technology for
real-time communication, which powers a wide range of applications including
instant messaging, presence and collaboration.

XMPP is designed to be extensible. In other words, it has been designed to grow and
accommodate changes.

The ‘messaging’ part of XMPP is the ‘piece’ you see; the Instant Message (IM) sent
between clients. XMPP has been designed to send all messages in real-time using a
very efficient push mechanism.

The presence indicator tells the servers that you are online / offline / busy. In
technical terms, presence determines the state of an XMPP entity; in layman terms,
whether you are there and ready to receive messages or not.

9.Compare XMPP and MQTT

MQTT does not define a message format; with XMPP you can define message format
and get structures data from devices. 

XMPP creates a device identity also called a Jabber ID. In MQTT, identities are created and
managed separately in broker implementations.

MQTT has different levels of quality of service. This flexibility is not available in XMPP.

MQTT deployments become difficult to manage with the increase in number of devices while
XMPP scales very easily.
When it comes to M2M Communications, MQTT is better than XMPP. 

10.Diff. between IOT & M2M

11.Characteristics of IOT

-Interoperable Communication Protocol


-dynamic and self adapting
-self-configurable
-integrated into Information Network
-unique identity( Iot has an intelligent interface that manages the system based on the
unique identities of ‘things’. The things can be monitored, updated and controlled)

12. Levels of IOT

Ma’am ne iska 5-6 pages ka answer diya tha with diagrams. So I skipped it.
13. What is IOT gateway

An IoT gateway bridges the communication gap between devices, sensors,


equipment, systems, and the cloud.
By systematically connecting the cloud, IoT gateway offers local processing and
storage, as well as an ability to autonomously control field devices based on data
inputs by sensors.
IoT gateways also enable customers to securely aggregate, process and filter data
for analysis.
It helps ensure that the federated data generated by devices and systems can travel
securely and safely from the edge to the cloud.

14. Diff between stateful & stateless


15.Diff between REST and Web Socket

16.What are websockets? give applications, features and when to use websockets

-WebSocket is a computer communications protocol, providing full-duplex


communication channels over a single TCP connection.
- it is a bidirectional communication in client and server.
- websocket comm. starts with establishment phase where a dedicated connection is
created between client and server which is maintained until the client exclusively closes it.
-with websockets, one can build multiplayer games, chat apps and collaboration softwares
that work on the open web.
-when to use websockets -
When a client needs to react quickly to a change (especially one it cannot predict), a
WebSocket may be best. Consider a chat application that allows multiple users to chat in
real-time. If WebSockets are used, each user can both send and receive messages in real-
time. WebSockets allow for a higher amount of efficiency compared to REST because they do
not require the HTTP request/response overhead for each message sent and received.
Features of websocket :
17.Diff between HTTP & Web socket.
18. What does constrained environment mean for IOT / M2M.

19.Explain COAP Client Web Connectivity

*Nahi mila. Answer mile toh bhej dena*


20.Explain HTTP and it’s features

The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed,


collaborative, hypermedia information systems.
HTTP is a generic and stateless protocol which can be used for other purposes as well
using extensions of its request methods, error codes, and headers.
Basically, HTTP is a TCP/IP based communication protocol, that is used to deliver data
(HTML files, image files, query results, etc.) on the World Wide Web. The default port is
TCP 80, but other ports can be used as well. It provides a standardized way for
computers to communicate with each other. HTTP specification specifies how clients'
request data will be constructed and sent to the server, and how the servers respond to
these requests.
Features :
There are three basic features that make HTTP a simple but powerful protocol:
HTTP is connectionless: The HTTP client, i.e., a browser initiates an HTTP request
and after a request is made, the client waits for the response. The server processes
the request and sends a response back after which client disconnect the
connection. So client and server knows about each other during current request
and response only. Further requests are made on new connection like client and
server are new to each other.

HTTP is media independent: It means, any type of data can be sent by HTTP as long
as both the client and the server know how to handle the data content. It is
required for the client as well as the server to specify the content type using
appropriate MIME-type.

HTTP is stateless: As mentioned above, HTTP is connectionless and it is a direct


result of HTTP being a stateless protocol. The server and client are aware of each
other only during a current request. Afterwards, both of them forget about each
other. Due to this nature of the protocol, neither the client nor the browser can
retain information between different requests across the web pages.

21.Functions of communication gateway


In-network computi ng, Gateways play a major role in communicati ng between
the servers or systems. Without the internet, you couldn't be able to connect the
systems. Whichever type of network you use in your home or business, the
functi on would be the same.
A gateway is implemented in soft ware, in hardware or in the mixture of both.
They are the best way of communicati on especially in between the servers and so
the devices/systems. It supervises the client's requirements fi rstly and then off ers
online services to the clients.
In a workplace, the gateway is the machine or processor that routes out the
traffi c from a parti cular workstati on to the outside network. It works as an
entrance to a network that interlinks the other network to each other.

22.Explain REST based communication API


A RESTful API is an application program interface (API) that uses HTTP requests to GET, PUT,
POST and DELETE data.

An API for a website is code that allows two software programs to communicate with each
other. The API spells out the proper way for a developer to write a program requesting
services from an operating system or other application.

A RESTful API -- also referred to as a RESTful web service or REST API -- is based on
representational state transfer (REST), an architectural style and approach to
communications often used in web services development. 

A RESTful API breaks down a transaction to create a series of small modules. Each module
addresses a particular underlying part of the transaction. This modularity provides
developers with a lot of flexibility, but it can be challenging for developers to design their
REST API from scratch. Currently, several companies provide models for developers to use;
the models provided by Amazon S3, Cloud Data Management Interface (CDMI)
and OpenStack Swift are the most popular.

A RESTful API uses existing HTTP methodologies defined by the RFC 2616 protocol. They use
GET to retrieve a resource; PUT to change the state of or update a resource, which can be
an object, file or block; POST to create that resource; and DELETE to remove it.

23.Explain Web socket based communication API

The WebSocket API is an advanced technology that makes it possible to open a two-way


interactive communication session between the user's browser and a server. With this API,
you can send messages to a server and receive event-driven responses without having to poll
the server for a reply.Websocket APIs follow the exclusive pair communication model.
24.Give application where wireless sensor networks are used

The development of wireless sensor networks was motivated by military applications such as
battlefield surveillance; today such networks are used in many industrial and consumer
applications, such as industrial process monitoring and control, machine health monitoring,
and so on. Some applications include :

Area monitoring
Health care monitoring
Environmental/Earth sensing
1 Air pollution monitoring
2 Forest fire detection
3 Landslide detection
4 Water quality monitoring
5 Natural disaster prevention
Industrial monitoring
1 Machine health monitoring
2 Data logging
3 Water/waste water monitoring
4 Structural health monitoring

25.Explain IOT Communication models

1.Request-Response Model
Request-response model is communication model in which the client sends requests to the
server and the server responds to the requests. When the server receives a request, it
decides how to respond, fetches the data, retrieves resource representation, prepares the
response, and then sends the response to the client. Request-response is a stateless
communication model and each request-response pair is independent of others.

2.Publish-Subscribe Model
Publish-Subscribe is a communication model that involves publishers, brokers and
consumers. Publishers are the source of data. Publishers send the data to the topics which
are managed by the broker. Publishers are not aware of the consumers. Consumers
subscribe to the topics which are managed by the broker. When the broker receive data for
a topic from the publisher, it sends the data to all the subscribed consumers.

3.Push-Pull Model
Push-Pull is a communication model in which the data producers push the data to queues
and the consumers Pull the data from the Queues. Producers do not need to be aware of the
consumers. Queues help in decoupling the messaging between the Producers and
Consumers. Queues also act as a buffer which helps in situations when there is a mismatch
between the rate at which the producers push data and the rate rate at which the consumer
pull data.
4.Exclusive Pair Model
Exclusive Pair is a bidirectional, fully duplex communication model that uses a persistent
connection between the client and server. Connection is setup it remains open until the
client sends a request to close the connection. Client and server can send messages to each
other after connection setup. Exclusive pair is stateful communication model and the server
is aware of all the open connections.

26.Explain communication gateway & proxies between COAP objects


diagrammatically
*nahi mila

27. Function of MQTT broker

The MQTT protocol defines two types of network entities: a message broker and a


number of clients. An MQTT broker is a server that receives all messages from the
clients and then routes the messages to the appropriate destination clients.
The job of an MQTT broker is to filter messages based on topic, and then distribute
them to subscribers. There is no direct connection between a publisher and
subscriber. All clients can publish (broadcast) and subscribe (receive). MQTT
brokers do not normally store messages.

28. IPV4 VS IPV6


29.IP addressing in IOT

30.Classes of IPV6

31.Explain 6LOWPAN
32.RFID and it’s applications in IOT

Radio frequency identification system (RFID) is an automatic technology and aids machines
or computers to identify objects, record metadata or control individual target through radio
waves. Connecting RFID reader to the terminal of Internet, the readers can identify, track
and monitor the objects attached with tags globally, automatically, and in real time, if
needed. This is the so-called Internet of Things (IoT). RFID is often seen as a prerequisite for
the IoT.
Applications :

33.Issues in RFID – Technological challenges & Security challenges

RFID has been implemented in different ways by different manufacturers; global standards
are still being worked on. It should be noted that some RFID devices are never meant to
leave their network (as in the case of RFID tags used for inventory control within a
company). This can cause problems for companies.

RFID systems can be easily disrupted

Since RFID systems make use of the electromagnetic spectrum (like WiFi networks or
cellphones), they are relatively easy to jam using energy at the right frequency. Although this
would only be an inconvenience for consumers in stores (longer waits at the checkout), it
could be disastrous in other environments where RFID is increasingly used, like hospitals or
in the military in the field.

RFID Reader Collision


Reader collision occurs when the signals from two or more readers overlap. The tag is
unable to respond to simultaneous queries. Systems must be carefully set up to avoid this
problem; many systems use an anti-collision protocol (also called a singulation protocol.
Anti-collision protocols enable the tags to take turns in transmitting to a reader.

RFID Tag Collision

Tag collision occurs when many tags are present in a small area; but since the read time is
very fast, it is easier for vendors to develop systems that ensure that tags respond one at a
time.

Security, privacy and ethics problems with RFID

The contents of an RFID tag can be read after the item leaves the supply chain

RFID tags are difficult to remove

RFID tags can be read without your knowledge

RFID tags can be read a greater distances with a high-gain antenna

RFID tags with unique serial numbers could be linked to an individual credit card number

34.What is Participatory sensing

Participatory sensing (PS), an emerging sensing paradigm through organizing people and
their mobile devices as sensors, is regarded as a promising solution to solve large-scale
urban issues.
PS has been implemented in many applications such as transportation, environmental
monitoring, public health, etc. These applications are of high relevance for smart cities.
Smart cities rely on the infrastructures established by government and industrial agencies to
sense urban dynamics.
PS can complement these infrastructures by involving "human sensors" and obtaining
insights into people's activities. In this paper, the key features and challenges of PS are
surveyed. A prototype PS platform is designed for efficient collection and management of
smartphone sensing and survey data.

35.Industrial IOT

The Industrial Internet of Things or IIoT is defined as “machines, computers and people
enabling intelligent industrial operations using advanced data analytics for transformational
business outcomes”.
Industrial IoT that initially mainly referred to an industrial framework whereby a large
number of devices or machines are connected and synchronized through the use of software
tools and third platform technologies in a machine-to-machine and Internet of
Things context.Such systems will increasingly be able to intelligently respond and even
change their course of action based on the information received through the feedback loops
established within the framework.
To summarize, here are some of the key benefits of IIoT in an industry context
Improved and intelligent connectivity between devices or machines
Increased efficiency
Cost savings
Time savings
Enhanced industrial safety

36.Automative IOT

The advent of IoT in automotive industry has opened new avenues for carmakers and buyers all across
the world. With usage at both industrial and commercial level, IoT in automotive sector has become a
prominent hotspot for variegated multi-purpose applications. From connected cars to automated
transport systems, the applications of Internet of Things have made a deep dent in the global
automotive market.

1. Fleet Management:
The implementation of IoT in automotive sector has brought in a huge development in the
field of fleet management. Trucks nowadays are integrated with weight measurement,
location tracking, and several other sensors.The volume of sensory data gathered from a
large fleet of such trucks is stored into a cloud application. This data is then processed
through different analytics features and conceptualized into a visual format. A fleet operator
can easily go through this information to monitor different parameters associated with its
fleet

2. Connected Cars:

Connected cars facilitate fast transmission of data and increase drivers’ response time
through enhanced vehicle communication.The idea of connected cars is not new. In fact,
according to an estimation by Gartner, there will be more than 250 million connected cars in
the world by the end of the year 2020. These cars are connected over an IoT network.

3. Automotive Maintenance System:


The sensors embedded in different components of a car collect data and share it to a
platform. This data is then processed by an algorithm that can analyze the future outcomes
of the component based on its performance. IoT automotive maintenance system also helps
a person to take necessary steps to prevent its car parts from sudden breakdown. Just like
dashboard indicators of a vehicle, this system alerts the driver about probable malfunctions.
However, the alerts are sent to the driver’s mobile, way before the problem even occurs.
This helps the driver to make cost-effective and time-saving steps to avoid component
failure while driving.

37.Sources of Data in the PS process & phases PS for IOT applications and sensors

You might also like