Eiot Unit 4 Notes
Eiot Unit 4 Notes
INTRODUCTION OF IOT
IoT comprises things that have unique identities and are connected to internet. By
2020 there will be a total of 50 billion devices /things connected to internet. IoT is not limited
to just connecting things to the internet but also allow things to communicate and exchange
data.
Definition:
A dynamic global n/w infrastructure with self configuring capabilities based on
standard and interoperable communication protocols where physical and virtual ―thingsǁ
have identities, physical attributes and virtual personalities and use intelligent interfaces, and
are seamlessly integrated into information n/w, often communicate data associated with users
and their environments.
Characteristics:
1. Dynamic & Self Adapting: IoT devices and systems may have the capability to
dynamically adapt with the changing contexts and take actions based on their
operating conditions, user‗s context or sensed environment. Eg: the surveillance
system is adapting itself based on context and changing conditions.
2. Self-Configuring: allowing a large number of devices to work together to provide
certain functionality.
3. Inter Operable Communication Protocols: support a number of interoperable
communication protocols and can communicate with other devices and also with
infrastructure.
4. Unique Identity: Each IoT device has a unique identity and a unique identifier (IP
address).
5. Integrated into Information Network: that allow them to communicate and
exchange data with other devices and systems.
Applications of IoT:
1. Home
2. Cities
3. Environment
4. Energy
5. Retail
6. Logistics
7. Agriculture
8. Industry
9. Health & Life Style
In which the client sends request to the server and the server replies to requests. Is a
stateless communication model and each request-response pair is independent of others.
HTTP works as a request-response protocol between a client and a server. A web browser may
be the client, and an application on a computer that hosts a website may be the server.
Example: A client (browser) submits an HTTP request to the server; then the server returns a
response to the client. The response contains status information about the request and may also
contain the requested content.
Publish-Subscibe Model:
Involves publishers, brokers and consumers. Publishers are source of data. Publishers send
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 receives data for a topic from the publisher, it sends the data to all the subscribed
consumers.
Push-Pull Model: in which data producers push data to queues and consumers pull data from
the queues. Producers do not need to aware of the consumers. Queues help in decoupling the
message between the producers and consumers.
Exclusive Pair: is bi-directional, fully duplex communication model that uses a persistent
connection between the client and server. Once connection is set up it remains open until the
client send a request to close the connection. Is a stateful communication model and server is
aware of all the open connections.
A "Thing" in Internet of Things (IoT) can be any object that has a unique identifier and
which can send/receive data (including user data) over a network (e.g., smart phone,
smartTV, computer, refrigerator, car, etc.).
• IoT devices are connected to the Internet and send information about themselves or about
their surroundings (e.g. information sensed by the connected sensors) over a network (to
other devices or servers/storage) or allow actuation upon the physical
entities/environment around them remotely.
IoT Device Examples
A home automation device that allows remotely monitoring the status of appliances
and controlling the appliances.
• An industrial machine which sends information abouts its operation and health
monitoring data to a server.
• A car which sends information about its location to a cloud-based service.
• A wireless-enabled wearable device that measures data about a person such as the number
of steps walked and sends the data to a cloud-based service.
Basic building blocks of an IoT Device
• Sensing: Sensors can be either on-board the IoT device or attached to the device.
• Actuation: IoT devices can have various types of actuators attached that allow taking
actions upon the physical entities in the vicinity of the device.
• Communication: Communication modules are responsible for sending collected data to
other devices or cloud-based servers/storage and receiving data from other devices and
commands from remote applications.
• Analysis & Processing: Analysis and processing modules are responsible for making
sense of the collected data.
Raspberry Pi GPIO
Raspberry Pi Interfaces
1. Serial: The serial interface on Raspberry Pi has receive (Rx) and transmit (Tx) pins for
communication with serial peripherals.
2. SPI: Serial Peripheral Interface (SPI) is a synchronous serial data protocol used for
communicating with one or more peripheral devices.
3. I2C: The I2C interface pins on Raspberry Pi allow you to connect hardware modules. I2C
interface allows synchronous data transfer with just two pins - SDA (data line) and SCL
(clockline).
Characteristics
First, the cloud computing of IoT is an on-demand self service, meaning it‗s there
when you need it. Cloud computing is a web-based service that can be accessed without any
special assistance or permission from other people; however, you need at minimum some sort
of internet access.
Second, the cloud computing of IoT involves broad network access, meaning it offers several
connectivity options. Cloud computing resources can be accessed through a wide variety of
internet-connected devices such as tablets, mobile devices and laptops. This level of
convenience means users can access those resources in a wide variety of manners, even from
older devices. Again, though, this emphasizes the need for network access points.
Third, cloud computing allows for resource pooling, meaning information can be shared with
those who know where and how (have permission) to access the resource, anytime and
anywhere. This lends to broader collaboration or closer connections with other users. From
an IoT perspective, just as we can easily assign an IP address to every "thing" on the planet,
we can share the "address" of the cloud-based protected and stored information with others
and pool resources.
Fourth, cloud computing features rapid elasticity, meaning users can readily scale the service
to their needs. You can easily and quickly edit your software setup, add or remove users,
increase storage space, etc. This characteristic will further empower IoT by providing elastic
computing power, storage and networking.
Finally, the cloud computing of IoT is a measured service, meaning you get what you pay
for. Providers can easily measure usage statistics such as storage, processing, bandwidth and
active user accounts inside your cloud instance. This pay per use (PPU) model means your
costs scale with your usage. In IoT terms, it's comparable to the ever-growing network of
physical objects that feature an IP address for internet connectivity, and the communication
that occurs between these objects and other internet-enabled devices and systems; just like
your cloud service, the service rates for that IoT infrastructure may also scale with use.
Service and Deployment
Service models
Service delivery in cloud computing comprises three different service models:
software as a service (SaaS), platform as a service (PaaS), and infrastructure as a service
(IaaS).
Software as a service (SaaS) provides applications to the cloud‗s end user that are
mainly accessed via a web portal or service-oriented architecture-based web service
technology. These services can be seen as ASP (application service provider) on the
application layer. Usually, a specific company that uses the service would run, maintain and
give support so that it can be reliably used over a long period of time.
Platform as a service (PaaS) consists of the actual environment for developing and
provisioning cloud applications. The main users of this layer are developers that want to
develop and run a cloud application for a particular purpose. A proprietary language was
supported and provided by the platform (a set of important basic services) to ease
communication, monitoring, billing and other aspects such as startup as well as to ensure an
application‗s scalability and flexibility. Limitations regarding the programming languages
supported, the programming model, the ability to access resources, and the long-term
persistence are possible disadvantages.
Infrastructure as a service (IaaS) provides the necessary hardware and software upon
which a customer can build a customized computing environment. Computing resources, data
storage resources and the communications channel are linked together with these essential IT
resources to ensure the stability of applications being used on the cloud. Those stack models
can be referred to as the medium for IoT, being used and conveyed by the users in different
methods for the greatest chance of interoperability. This includes connecting cars, wearables,
TVs, smartphones, fitness equipment, robots, ATMs, and vending machines as well as the
vertical applications, security and professional services, and analytics platforms that come
with them.
Deployment models
Deployment in cloud computing comprises four deployment models: private cloud,
public cloud, community cloud and hybrid cloud.
A private cloud has infrastructure that‗s provisioned for exclusive use by a single
organization comprising multiple consumers such as business units. It may be owned,
managed and operated by the organization, a third party or some combination of them, and it
may exist on or off premises.
A public cloud is created for open use by the general public. Public cloud sells
services to anyone on the internet. (Amazon Web Services is an example of a large public
cloud provider.) This model is suitable for business requirements that require management of
load spikes and the applications used by the business, activities that would otherwise require
greater investment in infrastructure for the business. As such, public cloud also helps reduce
capital expenditure and bring down operational IT costs.
A community cloud is managed and used by a particular group or organizations that
have shared interests, such as specific security requirements or a common mission. Finally, a
hybrid cloud combines two or more distinct private, community or public cloud
infrastructures such that they remain unique entities but are bound together by standardized
or proprietary technology that enables data and application portability. Normally, information
that‗s not critical is outsourced to the public cloud, while business-critical services and data
are kept within the control of the organization.
CLOUD STORAGE API
A cloud storage API is an application program interface that connects a locally-based
application to a cloud-based storage system, so that a user can send data to it and access and
work with data stored in it. To the application, the cloud storage system is just another target
device, like tape or disk-based storage. An application program interface (API) is code that
allows two software programs to communicate with each other. The API defines the correct
way for a developer to write a program that requests services from an operating system (OS)
or other application. APIs are implemented by function calls composed of verbs and nouns.
The required syntax is described in the documentation of the application being called.
How APIs work
APIs are made up of two related elements. The first is a specification that describes
how information is exchanged between programs, done in the form of a request for
processing and a return of the necessary data. The second is a software interface written to
that specification and published in some way for use. The software that wants to access the
features and capabilities of the API is said to call it, and the software that creates the API is
said to publish it.
Why APIs are important for business
The web, software designed exchange information via the internet and cloud
computing have all combined to increase the interest in APIs in general and services in
particular. Software that was once custom-developed for a specific purpose is now often
written referencing APIs that provide broadly useful features, reducing development time and
cost and mitigating the risk of errors.APIs have steadily improved software quality over the
last decade, and the growing number of web services exposed through APIs by cloud
providers is also encouraging the creation of cloud-specific applications, internet of things
(IoT) efforts and apps to support mobile devices and users.
Three basic types of APIs
APIs take three basic forms: local, web-like and program-like.
Local APIs are the original form, from which the name came. They offer OS or middleware
services to application programs. Microsoft's .NET APIs, the TAPI (Telephony API) for voice
applications, and database access APIs are examples of the local APIform.
Web APIs are designed to represent widely used resources like HTML pages and are
accessed using a simple HTTP protocol. Any web URL activates a web API. Web APIs are
often called REST (representational state transfer) or RESTful because the publisher of REST
interfaces doesn't save any data internally between requests. As such, requests from many
users can be intermingled as they would be on the internet.
Program APIs are based on remote procedure call (RPC) technology that makes a remote
program component appear to be local to the rest of the software. Service oriented
architecture (SOA) APIs, such as Microsoft's WS-series of APIs, are program APIs.
IoT / Cloud Convergence
Internet-of-Things can benefit from the scalability, performance and pay-as-you-go
nature of cloud computing infrastructures. Indeed, as IoT applications produce large volumes
of data and comprise multiple computational components (e.g., data processing and analytics
algorithms), their integration with cloud computing infrastructures could provide them with
opportunities for cost-effective on-demand scaling. As prominent examples consider the
following settings:
A Small Medium Enterprise (SME) developing an energy management IoT product,
targeting smart homes and smart buildings. By streaming the data of the product (e.g., sensors
and WSN data) into the cloud it can accommodate its growth needs in a scalable and cost
effective fashion. As the SMEs acquires more customers and performs more deployments of
its product, it is able
tocollectandmanagegrowingvolumesofdatainascalableway,thustakingadvantageofa ―pay-as-
you-growǁmodel. Moreover, cloud integration allows the SME to store and process massive
datasets collected from multiple (rather than a single)deployments.
A smart city can benefit from the cloud-based deployment of its IoT systems and
applications. A city is likely to deploy many IoT applications, such as applications for smart
energy management, smart water management, smart transport management, urban mobility
of the citizens and more. These applications comprise multiple sensors and devices, along
with computational components. Furthermore, they are likely to produce very large data
volumes. Cloud integration enables the city to host these data and applications in a cost-
effective way. Furthermore, the elasticity of the cloud can directly support expansions to
these applications, but also the rapid deployment of new ones without major concerns about
the provisioning of the required cloud computing resources.
A cloud computing provider offering pubic cloud services can extend them to the IoT
area, through enabling third-parties to access its infrastructure in order to integrate IoT data
and/or computational components operating over IoT devices. The provider can offer IoT
data access and services in a pay-as-you-fashion, through enabling third-parties to access
resources of its infrastructure and accordingly to charge them in a utility-based fashion.
These motivating examples illustrate the merit and need for converging IoT and cloud
computing infrastructure. Despite these merits, this convergence has always been challenging
mainly due to the conflicting properties of IoT and cloud infrastructures, in particular, IoT
devices tend to be location specific, resource constrained, expensive (in terms of
development/ deployment cost) and generally inflexible (in terms of resource access and
availability). On the other hand, cloud computing resources are typically location
independent and inexpensive, while at the same time providing rapid and flexibly elasticity.
In order to alleviate these incompatibilities, sensors and devices are virtualized prior to
integrating their data and services in the cloud, in order to enable their distribution across any
cloud resources. Furthermore, service and sensor discovery functionalities are implementing
on the cloud in order to enable the discovery of services and sensors that reside in different
locations.
Based on these principles the IoT/cloud convergence efforts have started since over a
decade i.e. since they very early days of IoT and cloud computing. Early efforts in the
research community (i.e. during 2005-2009) have focused on streaming sensor and WSN data
in a cloud infrastructure. Since 2007 we have also witnessed the emergence of public IoT
clouds, including commercial efforts. One of the earliest efforts has been the famous
Pachube.com infrastructure (used extensively for radiation detection and production of
radiation maps during earthquakes in Japan). Pachube.com has evolved (following several
evolutions and acquisitions of this infrastructure) to Xively.com, which is nowadays one of
the most prominent public IoT clouds. Nevertheless, there are tens of other public IoT clouds
as well, such as ThingsWorx, ThingsSpeak,Sensor-Cloud, Realtime.io and more. The list is
certainly nonexhaustive. These public IoT clouds offer commercial pay-as-you-go access to
end-users wishing to deploying IoT applications on the cloud. Most of them come with
developer friendly tools, which enable the development of cloud applications, thus acting like
a PaaS for IoT in the cloud. Similarly to cloud computing infrastructures, IoT/cloud
infrastructures and related services can be classified to the following models:
Infrastructure-as-a-Service (IaaS) IoT/Clouds: These services provide the means for
accessing sensors and actuator in the cloud. The associated business model involves the
IoT/Cloud provide to act either as data or sensor provider. IaaS services for IoT provide
access control to resources as a prerequisite for the offering of related pay-as-you-go services.
Platform-as-a-Service (PaaS) IoT/Clouds: This is the most widespread model for IoT/cloud
services, given that it is the model provided by all public IoT/cloud infrastructures outlined
above. As already illustrate most public IoT clouds come with a range of tools and related
environments for applications development and deployment in a cloud environment. A main
characteristic of PaaS IoT services is that they provide access to data, not to hardware. This is
a clear differentiator comparing to IaaS.
Software-as-a-Service (SaaS) IoT/Clouds: SaaS IoT services are the ones enabling their
uses to access complete IoT-based software applications through the cloud, on-demand and in
a pay-as-you-go fashion. As soon as sensors and IoT devices are not visible, SaaS IoT
applications resemble very much conventional cloud-based SaaS applications. There are
however cases where the IoT dimension is strong and evident, such as applications involving
selection of sensors and combination of data from the selected sensors in an integrated
application. Several of these applications are commonly called Sensing-as-aService, given
that they provide on-demand access to the services of multiple sensors. Note that SaaS IoT
applications are typically built over a PaaS infrastructure and enable utility-based business
models involving IoT software and services.