7CS4 IOT Unit-3
7CS4 IOT Unit-3
(7CS4-01)
Unit-3. Architecture & Reference Model
• The most basic architecture is a three-layer architecture. It has three layers, namely,
the perception, network, and application layers.
3 Major Layers Of IoT Architecture
The three-layer architecture has been the dominant model for IoT applications. The
three layers are Perception (or Devices), Network, and Application.
• Perception: The sensors themselves are on this layer. This is where the data comes
from. The data could be gathered from any number of sensors on the connected
device. Actuators, which act on their environment, are also at this layer of the
architecture.
• Network: The network layer describes how large amounts of data are moving
throughout the application. This layer connects the various devices and sends the
data to the appropriate back-end services.
• Application: The application layer is what the users see. This could be an
application to control a device in a smart-home ecosystem, or a dashboard showing
the status of the devices which are part of a system.
5 Additional Layers Of IoT Architecture
One is the five-layer architecture, which additionally includes the processing and business
layers. The five layers are perception, transport, processing, application, and business
layers The role of the perception and application layers is the same as the architecture
with three layers.
• Transport: This layer describes the transfer of data between the sensors in the
Perception layer and the Processing layer through various networks.
• Processing: Sometimes referred to as the Middleware layer, this one stores, analyzes,
and pre-processes the data coming from the Transport layer. In modern software
applications, this is often located on the edge of the cloud for low latency
communications.
• Business: This layer is often referred to as the Business Intelligence layer. Located at a
higher level than the Application layer, the Business layer describes everything that has
to do with the stakeholders. Decision-making will be done here based on the data
found and consumed at the Application layer.
4 Main Stages Of IoT Architecture
Another way to describe an IoT solution architecture is using a four-stage approach.
This architecture describes the various building blocks that constitute the IoT
solution. In this scenario, more emphasis is put on edge computing than the other
proposed designs.
• Devices: This stage is about the actual devices in the IoT solutions. These
devices could be sensors or actuators in the Perception layer. Those devices will
generate data (in the case of sensors) or act on their environment (in the case of
actuators). The data produced is converted in a digital form and transmitted to
the internet gateway stage. Unless a critical decision must be made, the data is
typically sent in a raw state to the next stage due to the limited resources of the
devices themselves.
• Internet gateways: The internet gateway stage will receive the raw data from the
devices and pre-process it before sending it to the cloud. This internet gateway could
be physically attached to the device or a stand-alone device that could communicate
with sensors over low power networks and relay the data to the internet.
• Edge or fog computing: In order to process data as quickly as possible, you might
want to send your data to the edge of the cloud. This will let you analyze the data
quickly and identify if something requires immediate attention. This layer typically
would only be concerned with recent data that is required for time-critical operations.
Some pre-processing might be done at this stage, too, to limit the data that is
ultimately transferred to the cloud.
• Cloud or data center: In this final stage, the data is stored for later processing. The
application and business layers live in this stage, where dashboards or management
software can be fed through the data stored in the cloud. Deep analysis or resource-
intensive operations such as machine learning training will happen at this stage.
IoT Reference
Model
IoT Reference Model
• The IoT Reference Model
aims at establishing a
common grounding and a
common language for IoT
architectures and IoT
systems.
o The abstraction level of the IoT Domain Model has been chosen in such a way that
its concepts are independent of specific technologies and use-cases.
o Based on the IoT Domain Model, the IoT Information Model has been developed.
o Defines the structure (e.g. relations, attributes) of IoT related information in an IoT
system on a conceptual level without discussing how it would be represented.
1. Physical Entity
2. Virtual Entity
3. Device
4. Resource
5. Service
Domain Model Contd…
1. Physical Entity: The IoT System provides information about the physical
entity (using Sensor) or perform actuation upon the physical entity (e.g.
Switching on a light).
4. Resource: Resources are the software Components which can be either “on-
device” or “network resources”.
o A number of these Functionality Groups (FG) build on each other, following the
relations identified in the IoT Domain Model.
o The Functionality Groups provide the functionalities for interacting with the
instances of these concepts or managing the information related to the concepts,
e.g. information about Virtual Entities or descriptions of IoT Services.
o The functionalities of the FGs that manage information use the IoT Information
Model as the basis for structuring their information.
Functional Model
Device functional group
The Device FG contains all the possible functionality hosted by the
physical Devices that are used for increment the Physical Entities. This
Device functionality includes sensing, actuation, processing, storage, and
identification components, the sophistication of which depends on the
Device capabilities.
REST
Ignores component implementation details.
Focus on roles of components, their interactions and their
interpretation of data elements.
Example: Airline Reservation Service
Premier
Customer
Representative
Premier Members
F.F.
Answering
Airline Reservations Customer
Machine Representative
Frequent Flyer Members
Regular
Customer
Representative
Regular Members
Approach 2:
Telephone Numbers are Cheap! Use Them!
The airline provides several telephone numbers - one number for premier
members, a different number for frequent flyers, and still another for
regular customers.
Premier
1-800-Premier Customer
Representative
Premier Members
F.F.
1-800-Frequent Customer
Representative
Frequent Flyer Members
Regular
Customer
1-800-Reservation
Representative
Regular Members
Discussion
client
Premier
Premier Members Customer
client
Regular Members
Approach 1:
Disadvantages
• There is currently no industry accepted practice (rules) for expressing
priorities, so rules would need to be made. The clients must learn the rule, and
the Web service application must be written to understand the rule.
• This approach is based upon the incorrect assumption that a URL is
"expensive" and that their use must be rationed.
• The Web service is a central point of failure. It is a bottleneck. Load balancing
is a challenge.
• It violates Tim Berners-Lee Web Design, Axiom 0 (see next slide).
Web Design, Axiom 0
(Tim Berners-Lee, director of W3C)
• Axiom 0: all resources on the Web must be uniquely identified with a URI.
URL1
resource1
URL2
resource2
URL3
resource3
Approach 2:
URLs are Cheap! Use Them!
The airline provides several URLs - one URL for premier members, a
different URL for frequent flyers, and still another for regular customers.
Premier
http://www.kings-air/reservations/premier Member
client Reservation
Premier Members Service
Frequent
http://www.kings-air/reservations/frequent-flyer Flyer
client Reservation
Frequent Flyer Members Service
Regular
http://www.kings-air/reservations/regular Member
client Reservation
Service
Regular Members
Approach 2:
Advantages
• The different URLs are discoverable by search engines and UDDI registries.
• It's easy to understand what each service does simply by examining the URL,
i.e., it exploits the Principle of Least Surprise.
• There is no need to introduce rules. Priorities are elevated to the level of a
URL. "What you see is what you get."
• It's easy to implement high priority - simply assign a fast machine at the
premier member URL.
• There is no bottleneck. There is no central point of failure.
• Consistent with Axiom 0.
Recap
• We have looked at a reservation service.
• We have seen a telephone-based version and a Web-based version of the
reservation service.
• With each version we have seen two main approaches to implementing the
service.
• Which approach is the REST design pattern and which isn't? See the
following slides.
This Aren't the
REST Design Pattern
Premier
Customer
Representative
Premier Members
F.F.
Answering
Airline Reservation Customer
Machine Representative
Frequent Flyer Members
Regular
Customer
Representative
Regular Members
This is the
REST Design Pattern
Premier
1-800-Premier Customer
Representative
Premier Members
F.F.
1-800-Frequent Customer
Representative
Frequent Flyer Members
Regular
1-800-Reservation Customer
Representative
Regular Members
This aren't the
REST Design Pattern
client
Premier
Premier Members Customer
client
Regular Members
This is the
REST Design Pattern
Premier
http://www.kings-air/reservations/premier Member
client Reservation
Premier Members Service
Frequent
http://www.kings-air/reservations/frequent-flyer Flyer
client Reservation
Frequent Flyer Members Service
Regular
http://www.kings-air/reservations/regular Member
client Reservation
Service
Regular Members
Two Fundamental Aspects of the REST
Design Pattern
• Resources
Every distinguishable entity is a resource. A resource may be a Web site, an
HTML page, an XML document, a Web service, a physical device, etc.
Resources
3. The other benefit of using REST is its pervasiveness. On the server side, there are
a variety of REST-based frameworks for helping developers create RESTful web
services, including REST let and Apache CXF.
Disadvantages Of REST
1. The benefit of REST using HTTP constructs also creates restrictions, however.
Many of the limitations of HTTP likewise turn into shortcomings of the REST
architectural style. For example, HTTP does not store state-based information
between request-response cycles, which means REST-based applications must
be stateless and any state management tasks must be performed by the client.
2. Similarly, since HTTP doesn't have any mechanism to send push notifications
from the server to the client, it is difficult to implement any type of services
where the server updates the client without the use of client-side polling of the
server or some other type of web hook.
1. A URI is used to define a resource’s identity. Here, the word identifier means to
distinguish one resource from the next regardless of the method used (location, name, or
both). In contrast, a URL is used to link a program, a component of the webpage, or the
webpage. With the aid of the accessing technique (protocols such as FTP, https, HTTP,), it
helps to retrieve the location of a resource.
2. While URIs don’t concern themselves with protocol specifications, the URL specifies the
kind of protocol to be used.
3. Since URL uses a scheme of URI, it is a subset of the URI. Therefore, a URL can be a
URI, but a URI can never be a URL
Challenges
In IOT
IOT Challenges
1. Design Challenges
2. Development Challenges
3. Security Challenges
4. Other Challenges
IOT Design Challenges
IOT Development Challenges
IOT Development Challenges:
1. IoT Protocols
2. Security
3. Privacy
4. Data Flood
5. IPV6 Adoption
6. Analytics
7. Fragmentation
8. Interoperability
9. QoS
10.Power Management
IOT Security Challenges
Solution:
IOT Other Challenges
1. Resource Consumption
2. Reliability
3. Fragmentation
4. Security
5. Privacy
ASSIGNMENT
Q1. What are the architectural constraints of REST?