You are on page 1of 48

Architecture Reference

Model
Module 2
Of
IoT fundamentals

Text Book: “Chapter 5” - Arshdeep Bahga, Vijay Madisetti - Internet


of Things_ A Hands-On Approach-Universities Press (India) Private
Limited (2015)
Module 2 - Topics

• Domain Model,
• Information Model,
• Functional Model,
• Communication and security model,
• SOA based architecture.
IoT Design Methodology that includes:
• Purpose & Requirements Specification
• Process Model Specification
• Domain Model Specification
• Information Model Specification
• Service Specifications
• IoT Level Specification
• Functional View Specification
• Operational View Specification
• Device & Component Integration
• Application Development
Introduction
• Designing IoT systems can be a complex and
challenging task as these systems involve interactions
between various components such as IoT devices and
network resources, web services, analytics
components, application and database servers.
• IoT system designers - often tend to design IoT
systems keeping specific products/services in mind.
• IoT System design are tied to specific product/service
choices made.
• IoT System designed in such away in updating the
system design to add new features or replacing a
particular product/service choice for a component
becomes very complex, and in many cases may require
complete re- design of the system.
IoT Design Methodology Steps
Purpose & Requirements Specification

The first step in IoT system design methodology is to


define the purpose and requirements of the system.

In this step, involves the following steps such as


• the system purpose,
• behavior and
• requirements such as (such as data collection
requirements, data analysis requirements, system
management requirements, data privacy and security
requirements, user interface requirements, ...) are captured.
Purpose & Requirements Specification

• Purpose : A home automation system that allows


controlling of the lights in a home remotely using a
web application.
• Behavior : The home automation system should
have auto and manual modes. In auto mode, the
system measures the light level in the room and
switches on the light when it gets dark. In manual
mode, the system provides the option of manually
and remotely switching on/off the light.
• System Management Requirement : The system
should provide remote monitoring and control
functions.
Process Specifications

• The second step in the IoT design methodology is to


define the process specification.

• In this step, the use cases of the IoT system are


formally described based on and derived from
the purpose and requirement specifications.
Process Specifications
•  Purpose : A home automation system that allows
controlling of the lights in a home remotely using a
web application.
• Behavior : The home automation system should
have auto and manual modes. In auto mode, the
system measures the light level in the room and
switches on the light when it gets dark. In manual
mode, the system provides the option of manually
and remotely switching on/off the light.
• System Management Requirement : The system
should provide remote monitoring and control
functions.
Process Specifications

• Data Analysis Requirement : The system should


perform local analysis of the collected data.

• Application Deployment Requirement : The


application should be deployed locally on the
device, but should be accessible remotely.

• Security Requirement : The system should have


basic user authentication capability.
Process Specifications
In this step, the use cases of the IoT
system are formally described
based on and derived from the
purpose and requirement
specifications.
Domain Model Specification

• The third step in the IoT design methodology is to


define the Domain Model.
• The domain model describes the main concepts,
entities and objects in the domain of IoT system
to be designed and relationships between objects.
• Domain model provides an abstract representation
of the concepts, objects and entities in the IoT
domain, independent of any specific technology
or platform.
Domain Model Specification

• For example, a Domain Model for a smart home IoT


system include entities such as smart thermostats, smart
lighting systems, and security cameras, as well as the
relationships between them.

• The Domain Model also define the behavior of each entity,


such as how the smart thermostat communicates with
the smart lighting system to adjust the temperature and
lighting levels in the home.
Domain Model Specification

• The entities, objects and concepts defined in the domain


model include:
• Physical Entity : Physical Entity is a discrete and
identifiable entity in the physical environment (e.g. a
room, a light, an appliance, a car, etc.)
For example: In home automation, there are two physical
entities involved. 1. Room in the home, 2. Light Appliance.

•  Virtual Entity : Virtual Entity is a representation of the


Physical Entity in the digital world.
For Example: One virtual entity room to be monitored and
another for the appliance to be controlled.
Domain Model Specification
• Device provides a medium for interactions between
Physical Entities and Virtual Entities. Devices are either
attached to Physical Entities or placed near Physical
Entities.
For example: In Home automation, the device is a single-
board mini computer which has light sensor and actuator
attached to it.
• Resource :- Resources are software components which
can be either "on-device" or "network-resources". On-
device resources are hosted on the device and include
software components that either provide information on
or enable actuation upon the Physical Entity to which
the device is attached. Network resources include the
software components that are available in network.
Domain Model Specification

For example: The resource in Home automation is the


operating system that runs on the single-board mini computer.

• Service : Services provide an interface for interacting with


the Physical Entity. Services access the resources hosted on
the device or the network resources to obtain information
about the Physical Entity or perform actuation upon the
Physical Entity.
For example: In Home automation, 1. Mode service, 2. State,
3. controller
Domain Model Specification
• Following are Sub-models of
the IoT Domain model:

• IoT Information Model


• IoT Functional Model
• IoT Communication Model
• IoT Trust, Security and Privacy
model
Information Model Specification
• The fourth step in the IoT design methodology is
to define the Information Model.
• Information Model defines the structure of all the
information in the IoT system, for example,
attributes of Virtual Entities, relations, etc.
• Information model does not describe the specifics
of how the information is represented or stored.
• To define the information model, we first list the
Virtual Entities defined in the Domain Model.
• Information model adds more details to the
Virtual Entities by defining their attributes and
relations.
Information Model Specification

• For example, an Information Model for a smart city IoT system include data
types such as temperature readings, traffic data, and air quality
measurements, as well as attributes such as the location, time, and source of
the data.

• The Information Model would also define the relationships between the data
types, such as how temperature readings are related to air quality
measurements, and the rules and constraints that govern the data, such as the
maximum and minimum values for each data type.
Information Model Specification
Service Specifications
• The fifth step in the IoT design methodology is to define
the service specifications.

• Service specifications -define the services in the IoT system,

• service types,
• service inputs/output,
• service endpoints,
• service schedules,
• service preconditions and
• service effects.
Service Specifications

• From the process


specification and
information model, we
identify the states and
attributes.
• For each state and
attribute we define a
service.
• These services either
change the state or
attribute values or
retrieve the current
values.
Service Specifications
The Mode Service
focuses on managing
different operational
modes or states of the
home automation
system.
Controller Mode
Service Service
The Controller
Service acts as the
central hub or brain
of the home
A native service in automation system.
an IoT platform
Representational State Transfer
include device
(REST) is a set of architectural
management
principles by which you can design
features like State
web services and web APIs
firmware updates, Service
(Application programming
remote
interface) that focus on a system's
configuration, real-
resources and how resource states
time monitoring.
are addressed and transferred.
IoT Level Specifications

• The sixth step in the IoT


design methodology is to
define the at least one of the
IoT level for the system.
A smart
thermostat
Representational State Transfer (REST) service resource can
is used for communication and data exchange include
between different components using standard temperature
HTTP protocols. control,
For instance, the smart home automation system scheduling,
use REST services to allow the mobile app or web and energy
interface to interact with the controller service. usage
The app can send commands to the controller monitoring.
service to turn on/off lights or adjust thermostat
settings via REST APIs.
Functional View Specification
• It is the Seventh step in the IoT design methodology.

• A functional group is a collection of devices or sensors that


work together to perform a specific task or function.

• Functional groups can be composed of devices that are


located in different physical locations and connected to
different networks, but they are organized and managed as a
single entity.
• One example of a functional group in IoT is a smart lighting
system. In this system, a group of smart light bulbs, sensors,
and controllers work together to provide automated lighting
control and energy savings.
Functional Model
The Functional Groups (FG) included in a Functional View include:

Device : The device FG contains devices for monitoring and control. In the home
automation example. the device FG includes a single board mini-computer, a light
sensor and relay switch(actuator).

Communication : The communication FG handles the communication for the IoT


system. The Communication FG represents the various communication
mechanisms employed by the relevant devices to transfer information between
the physical world components and the digital world.

In the IoT smart home system, the digital world comprises the software
components, applications, and platforms that allow users to remotely monitor and
control the physical devices. This can include mobile apps, web interfaces, or voice
assistants that provide users with a digital interface to interact with their smart home.
Functional Model
• Services: The service FG includes various services involved in the IoT
system such as services for device monitoring, device control services,
data publishing services and services for device discovery.

Example: In IOT home automation A device monitoring service enable users


to check the current temperature and humidity readings from different smart
sensors placed around the house.
A device control service would allow users to remotely control the lights in
different rooms.
A data publishing service in an IoT home automation system could publish
real-time energy consumption data from different devices to a cloud-based
platform.
A device discovery service in an IoT home automation system could
automatically detect and list all the compatible smart devices present in the
network, such as smart lights, smart plugs, or smart thermostats.
• Management: The management FG includes all
functionalities that are needed to configure and manage the
loT system.
• Example: In the IoT home automation system, the management
functionalities can provide an interface that allows users to add
new smart devices to the system. Also, checks the status of
connected devices, ensure data is being transmitted correctly,
and identify any devices that are offline or experiencing
problems.

• Security : The security FG includes security mechanisms for


the loT system such as authentication, authorization, data
security, etc.
• In the IoT home automation system, authentication mechanisms
may involve the use of unique usernames and passwords,
biometric authentication, or device-specific authentication keys.
Users or devices need to provide the correct credentials to gain
access to the system and control the connected devices.
• Application : The application FG includes applications that provide an
interface to the users to control and monitor various aspects of the
IoT system. Applications also allow users to view the system status and
the processed data.

• In the IoT home automation system, the application can provide a


user interface with buttons, sliders, or voice commands that allow
users to control individual or groups of devices.
• Also, it can provide a status screen where users can see the current
status of their devices, such as whether lights are on or off, the
temperature in different rooms, or the security system's armed
status.
Operational View specifications
• In this step, various options pertaining to the loT system deployment and
operation are defined, such as, service hosting options, storage options,
device options, application hosting options, etc.
• Example: In the IoT home automation system, the Operational View
Specifications involve choosing to host the services on a cloud platform
like Amazon Web Services (AWS). This allows users to access and control
their smart home devices remotely through the cloud infrastructure.
• Operational View specifications for the home automation example are s
follows:
• Devices: Computing device (Raspberry Pi), light dependent resistor
(sensor), relay switch (actuator).
• Communication APls: REST APIs (Application programming Interface)
• Communication Protocols: Link Layer - 802.11, Network Layer -
1Pv4/1Pv6, Transport TCP, Application - HTTP.
Device and Component Integrations
The ninth step in the IoT design methodology is the
integration of the devices and components.
Application Development
The application has controls for the mode (auto on or
auto off) and the light (on or off).
 
In the auto mode, the IoT system controls the light
appliance automatically based on the lighting
conditions in the room.
• When auto mode is enabled the
light control in the application is
disabled and it reflects the
current state of the light.
• When the auto mode is disabled,
the light control is enabled and it
is used for manually controlling
the light.
Communication and security model
• It refers to the methods and protocols used for devices to exchange
information and data. It involves the mechanisms and techniques
employed for data transmission, connectivity, between IoT devices.
• Request-Response is a 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 representations,
prepares the response, and then sends the response to the
client.
• Request-Response model is a stateless communication model
and each request-response pair is independent of others.
• Let's explain the Request-Response communication
model using a simple example of ordering food at a
restaurant:
• We have a client (the customer) and a server (the
restaurant). The client sends requests to the server,
and the server responds to those requests.
• The client in this example is the customer who wants to
order food. The client sends a request to the server,
specifying their food preferences, such as the type of
dish, quantity, and any specific requirements.
• The server is the restaurant staff who receives and
processes the customer's requests. The server takes
the customer's order, prepares the food accordingly,
and sends a response back to the client.
Communication and security 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 receives data for a topic from the
publisher, it sends the data to all the subscribed
consumers.
• A simple example of a news publishing system:
• In this example, we have publishers, brokers, and consumers.
Publishers are the source of news articles, brokers manage topics,
and consumers receive the news articles based on their interests.
• Publishers: Publishers in the news publishing system are news
agencies or organizations that produce news articles. They are
responsible for creating and sending news articles to the system.
• Brokers: Brokers act as intermediaries in the communication process.
They manage different topics or categories of news, such as
sports, politics, entertainment, etc. Brokers receive news articles
from publishers and handle the distribution to the relevant
consumers.
• Consumers: Consumers are individuals or devices that are interested
in receiving news articles. They subscribe to specific topics
managed by the brokers. Consumers indicate their preferences by
subscribing to topics they are interested in, such as subscribing to
the sports topic to receive sports-related news.
Communication and security model
• Push-Pull : 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 at which the consumers
pull data.
• Example: News Article Publishing and Consumption
1.Producers (Publishers):
• News Agencies: These are the producers or publishers of news
articles. Each news agency generates multiple news articles on a daily
basis.
• Pushing Data to Queues: The news agency pushes the newly created
news articles into respective queues based on their categories, such as
"politics," "sports," "entertainment," or "business." The producers do
not need to be aware of the specific consumers who will consume these
articles.
2.Consumers (Subscribers):
• News Readers: These are the consumers or subscribers who are
interested in reading news articles.
• Pulling Data from Queues: News readers subscribe to the queues
corresponding to their preferred news categories, such as "politics,"
"sports," "entertainment," or "business." They continuously pull
data from these queues, fetching the latest news articles available.
Communication and security model
• Exclusive Pair : Exclusive Pair is a bi-directional, fully
duplex communication model that uses a persistent
connection between the client and server.
• Once the 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 a stateful communication model and the
server is aware of all the open connections.
Various Layers of Communication loT
Model
• Device : An loT system comprises of devices that provide sensing,
actuation, monitoring and control functions.
• Communication: The communication block handles the
communication for the loT system.
• Services : An loT system uses various types of IoT services such as
services for device monitoring, device control services, data
publishing services and services for device discovery.
• Management : Management functional block provides various
functions to govern the loT system.
• Security: Security functional block secures the loT system and by
providing functions such as authentication, authorization, message
and content integrity, and data security.
• Application : loT applications provide an interface that the users can
use to control and monitor the loT system. Applications also allow
user to view the system status and view or analyze the processed
data.
Service-Oriented Architecture (SOA)

• SOA is a style of software design where services are


provided to the other components by application
components, through a communication protocol
over a network. Its principles are independent of
vendors and other technologies.
• In SOA, a number of services communicate with
each other, in one of two ways: through passing data
or through two or more services coordinating an
activity.
• A simple example of an online shopping application:
• Imagine you have an online shopping application that
consists of various components, such as a product catalog,
shopping cart, payment gateway, and order management.
In a traditional architecture, these components would be
tightly coupled, meaning they directly interact with each
other.

• They communicate with each other through a


communication protocol over a network, such as HTTP or
SOAP, following standardized interfaces.

• However, in a Service-Oriented Architecture (SOA), these


components are designed as services that provide specific
functionality. Each component becomes an independent
service that can be accessed and used by other
components in the application.
SOA based architecture
Typically, Service-Oriented Architecture is implemented with web services, which
makes the “functional building blocks accessible over standard internet protocols.”
• Service/APIs: In IoT home automation, services can represent various
functionalities such as temperature control, lighting control, security
monitoring, or energy management. Each service exposes an API
that allows other components, such as applications or devices, to
interact with it.
• Application: The applications can be mobile apps, web applications, or
even backend systems that enable users to control and monitor their
smart home devices. For instance, a mobile app can provide an
interface for users to remotely control the lighting, thermostat, or
security system in their home.
• Application Server: The application server provides the runtime
environment for hosting and executing the applications. The
application server in this scenario would host the mobile app and
provide the necessary resources, such as processing power and
storage, to ensure smooth operation.
• Managed Runtime Environment: The managed runtime
environment is responsible for executing the applications within the
application server. In the case of IoT home automation, it can be a
platform that supports the development and execution of
applications in the IoT domain.
• Operating System: The operating system is the software that
manages the hardware resources and provides services for running
the applications. Examples include Linux-based operating systems
like Raspberry Pi OS.
• Hypervisor: Hypervisors are typically used in scenarios where
multiple virtual machines need to run on a single physical device.
• Let's say you have a powerful server machine with ample computing resources such as
CPU, memory, and storage. Instead of running a single operating system and
applications directly on that server, you can use a hypervisor to create multiple virtual
machines on it. Each virtual machine can run its own operating system, such as
Windows or Linux, and host its own set of applications.
• Storage: Refers to the infrastructure for storing data generated by
the devices, applications, or services. This can include databases to
store sensor data, configuration data, or user preferences.
• Network: It enables communication between different components. It
includes local area networks (LANs), wireless protocols, and internet
connectivity. The devices, applications, and services communicate
over the network to exchange information and perform actions.
Examples of network technologies include Wi-Fi, Zigbee, or
Bluetooth.
Assignments

1. Write in details about the communication model with necessary


block diagrams.
2. Briefly explain SOA with necessary diagrams.
3. Brief about the weather monitoring IoT system modeling based on
steps involved in IoT architecture models.
4. Write notes on the steps involved in IoT architecture model with
flow diagram.

You might also like