IoT Concepts and Applications Lecture 7.pdf

Full Transcript

Lecture 7 IoT System Architecture Part I By: Dr. Hajar Esmaeil As-Suhbani IT, 4th Level Outline  IoT Architecture  Physical Design of IoT  Logical Design of IoT  IoT Enabling Technologi...

Lecture 7 IoT System Architecture Part I By: Dr. Hajar Esmaeil As-Suhbani IT, 4th Level Outline  IoT Architecture  Physical Design of IoT  Logical Design of IoT  IoT Enabling Technologies  IoT Levels  IoT layers and Protocol Stack 2 IoT Architecture  The term IoT architecture refers to the framework which defines how various IoT elements (e.g., devices, networks, sensors, applications) interact within an IoT environment.  Typically, IoT architecture consists of several layers and components which perform a variety of functions from physical devices, and data acquisition systems, to network devices communicating IoT data to data processing applications, and IoT data storage. 3 IoT Four Layers Architecture Figure 1 Four layer IoT Architecture 4 …IoT three Layers Architecture  perception Layer:  Includes objects to be detected (from physical moving objects, such as humans, cars, ) or factors to be observed ( temperature, or humidity).  Includes sensors, other hardware such as; embedded systems, RFID tags and readers and others.  The network layer:  It is responsible for processing the received data from the Perception Layer.  It is in charge of transmitting data to the application layer through various network technologies, such as wireless/wired networks and Local Area Networks (LAN).  The main media for transmission include 3G, 4G, 5G, WiFi, Bluetooth, Zigbee, infrared technology, and so on.  Huge quantities of data will be carried by the network. 5 …IoT three Layers Architecture  Middleware Layer:  Crucial to provide a middleware to store and process this massive amount of data.  Application Layer:  It is the layer at the top of the architecture and is responsible for delivery of various applications to different users in IoT.  It realizes the use of smart objects by a set of functions to users to meet defined requirements.  The applications can be from different industry segments such as: manufacturing, logistics, retail, environment, public safety, healthcare, food and drug etc. 6 Physical and Logical Designs of IOT  IoT is the physical devices that are connected to a network.  These physical devices are called node devices.  These are embedded with sensors, software, and other technologies to exchange data with other devices and systems over the Internet.  With IoT, digital systems can record, monitor, and adjust each interaction between connected things.  Hence now we can connect everyday objects like kitchen appliances, cars, thermostats, etc to the internet via embedded devices.  This makes communication streamlined between people, processes, and things.  To understand IoT properly we need to understand the Logical and Physical Designs of IOT. 7 Physical Design of IoT  The Physical design of IoT deals with the individual devices connected to the IoT network and the protocols used to create a functional IoT environment.  Each IoT device can perform tasks of remote sensing, actuating, monitoring, etc., due to the IoT network they are connected to.  These can also transmit information through different types of wireless or wired connections.  They can generate data, which is used to perform analysis and perform operations for improving the system. 8 Physical Design of IoT: Node Devices (Things)  Things in IoT refers to IoT devices, which have unique identities.  Node devices (things) are used to build a connection, process data, and provide interfaces, and storage, in an IoT system.  They generate data that can be analyzed by the IoT system and program to perform operations and improve the system.  Connectivity: Devices like USB hosts and ETHERNET provides connectivity between the devices and the server.  Processor: Processors like CPU and other units process the data. This is used to improve the decision quality of an IoT system.  Audio/Video Interfaces: System interfaces like HDMI and RCA devices record audio and videos.  Input/Output interface: Devices like UART, SPI, CAN, etc give input and output signals to sensors and actuators.  Storage Interfaces: IoT devices like SD, MMC, and SDIO generate data. Storage interfaces store those data.  Controlling of activity: Devices like DDR and GPU control the activity of an IoT system. 9 Figure1 Generic block Diagram for IoT Devices 10 Physical Design of IoT: IoT Protocols  A protocol is a set of rules that governs the communication between two or more devices.  A protocol defines the rules and synchronization of communication and possible error recovery methods.  IoT protcols help to establish Communication between IoT Device (Node Device) and Cloud based Server over the Internet.  It help to sent commands to IoT Device and received data from an IoT device over the Internet. 11 Figure2 IoT Protocols with respect to TCP/IP protocol stack 12 Physical Design of IoT: IoT Protocols: Link Layer Protocols  The link layer is responsible for establishing and terminating links between the nodes.  The packets or datagrams travel through these links.  The link layer also defines the format of packet that is to be communicated across the link and is responsible for physical addressing.  The link layer also handles error detection, retransmission, flow control and access of the link. 13 Table 1 Summary of link layer protocols 14 Physical Design of IoT: IoT Protocols: Network Layer Protocols  The main role of the network layer is transfer the packet from sender to receiving host.  The network layer also handles routing, which involves selecting the next node and forwarding the packets across the communication path.  The network layer is also responsible for logical addressing (like IP address) and for congestion control which prevents the network from being overloaded with traffic.  Different protocols at network layer are:  IPv4 (32-bit addresses): This is a protocol address that is a numerical label assigned to each device connected to the network.  IPv6 (128-bit addresses): It is a successor of IPv4 that uses 128 bits for an IP address. It is developed to deal with long-anticipated problems.  6LoWPAN: IPv6 over Low power Wireless Personal Area Network. 15 Physical Design of IoT: IoT Protocols: Transport Layer Protocols  The main role of transport layer is providing end-to-end communication between the applications running on hosts.  The transport layer provides a logical communication channel through which the end applications can communicate with each other.  The transport layer is implemented on the end hosts.  It is not present in the routers.  The transport layer is also responsible for the reliable delivery of the message across the end nodes, flow control and multiplexing and demultiplexing of the channels at end nodes.  Different protocols at transport layer are:  TCP (Transmission Control Protocol): It is a connection-oriented protocol.  UDP (User Datagram Protocol): It is a connectionless protocol. 16 Physical Design of IoT: IoT Protocols: Application Layer Protocols  The application layer is where the users of an IoT application interact with the IoT application/system.  The application layer allows the users to interact with the IoT sensors and access other services provided by the communication network.  The application layer provides services like authentication, naming, message formatting, email, etc, to the users. Different protocols at transport layer are:  HTTP (HyperText Transfer Protocol):  Uses TCP, Stateless, Request-Response Model.  It is a protocol that presents in an application layer for transmitting media documents.  It is used to communicate between web browsers and servers.  It makes a request to a server and then waits till it receives a response and in between the request server does not keep any data between the two requests. 17 Physical Design of IoT: IoT Protocols: … Application Layer Protocols  CoAP (Constrained Application Protocol): Uses UDP, Request-Response Model.  XMPP (Extensible Messaging and Presence Protocol): Real-time communication, For sending XML data.  MQTT (Message Queue Telemetry Transport):  It is a machine-to-machine connectivity protocol that was designed as a publish/subscribe messaging transport.  It is used for remote locations where a small code footprint is required.  No security.  Used with low power devices.  AMQP (Advanced Message Queuing Protocol):  Supports both point-to-point and publisher-subscriber models.  High performance and secure protocol.  Uses TCP. 18 Physical Design of IoT: IoT Protocols: … Application Layer Protocols  WebSocket:  Full-duplex connection over a single socket connection.  This protocol enables two-way communication between a client and a host that can be run on an untrusted code in a controlled environment.  This protocol is commonly used by web browsers.  Uses TCP.  DDS (Data Distribution Service):  Middleware standard, Reliable than MQTT.  Follows publish-subscribe model.  Uses UDP. 19 Logical Design of IoT  It is the actual design of the IoT system.  It illustrates the assembling and configuration of the components i.e. computers, sensors, and actuators.  The logical design of internet of things includes:  IoT Functional Blocks  IoT Communication Models  IoT Communication APIs 20 Logical Design of IoT: IoT Functional Blocks  Different functional blocks in an IoT system or application are device, communication, services, application, management, and security.  The functional blocks of IoT systems provide sensing, identification, actuation, management, and communication capabilities to the IoT ecosystem.  The Functional blocks of IoT are:  Device: Devices provide sensing, actuation, monitoring, and control functions to the IoT ecosystem.  Communication: Manages communication for the IoT system.  Services: Services perform the functions of device monitoring, device control, data publishing, and device discovery.  Management: Gives functions to govern the IoT system.  Security: Provides security to the IoT system. It performs authentication, authorization, message and content integrity, and data security functions.  Application: An interface where the users can control and monitor various aspects of the IoT system. It allows the users to view the system status and analyze the processed data. 21 Figure 3 IoT Functional Blocks 22 Logical Design of IoT: IoT Communication Models  The communication models of IoT are used for communicating between the system and the server.  Internet of things supports different communication models between the entities in an IoT system.  These communication models are:  Request-Response Model  Publish-Subscribe Model  Push-Pull Model  Exclusive Pair Model 23 Logical Design of IoT: IoT Communication Models: Request-Response Model  In this communication model, the client (IoT device) sends requests to the server and the server responds to their requests.  After receiving a request, the server decides how to respond by fetching the data, retrieving resource representation, preparing the response, and then sending the response to the client.  This model is stateless because the data between requests is not retained, therefore each request is handled independently.  The request-response protocol between a client and a server is HTTP. 24 Figure 4 Request-Response Model 25 Logical Design of IoT: IoT Communication Models: Publisher-Subscriber Model  This model is made up of three entities: 1. Publisher: It is the source of data that sends the data to the topic. 2. Consumers: They subscribe to the topics. The consumers consume the data published by the publishers. A consumer is generally the IoT application through which the users interact. 3. Brokers:They accept data from publishers and send it to the consumers.  The publisher always publishes messages at a pre-defined interval. The sensors in IoT can be thought of as publishers. The publishers publish data as topics.  The broker is an entity that maintains different topics to which consumers subscribe. The broker is generally a server.  The published messages of publishers are maintained by the broker.  A consumer can subscribe to one or more topics maintained by a broker. 26 Figure 5 Publisher-Subscriber Model 27 Logical Design of IoT: IoT Communication Models: Push-Pull Model  This model is made up of data publishers, data consumers, and data queues. 1. Publishers: They publish the message and push it into the queue. The sensors in IoT can be thought of as publishers of data. 2. Queues: It helps in decoupling the messages between the producer and consumer. One or more queues store that data pushed by the publishers. 3. Consumers: They present on the other side and they pull the data out of the queue.The consumers pull the messages from the queues and consume the messages. A consumer is generally the IoT application through which the users interact.  Unlike the publish-subscribe model, there is ordering of messages in push- pull model. 28 Figure 6 Push-Pull Model 29 Logical Design of IoT: IoT Communication Models: Exclusive Pair  The main entities in an exclusive pair model are client and server.  It is a bi-directional model that includes full-duplex communication between client and server.  The client and server establish a full duplex connection for sending and receiving data.  Before sending a request, the client establishes a connection with the server and then sends the request.  The data requests can be one or more.  The server receives these requests through the same connection and sends back responses.  After the data transfer is complete, the connection between the client and server is terminated.  Unlike publish-subscribe model, exclusive pair model is stateful.  The client sends a request and the server keeps the record of all the connections.  So, the server can automatically identify that the request is coming from a previous client or not.  In this model, only WebSocket-based communication API is based. 30 Figure 7 Exclusive Pair 31 Logical Design of IoT: IoT Communication APIs  An Application Programming Interface (API) provides an unified interface to access the server resources.  An API is the one which connects the things together in the Internet of Things.  APIs act as a point of interaction between the IoT devices and the Internet and/or other elements within the network.  In IoT there two types of communication APIs: 1. REST-based communication APIs 2. WebSocket-based communication APIs 32 Logical Design of IoT: IoT Communication APIs: REST-based communication APIs  In a REST-based communication, the client sends HTTP or HTTPS requests like GET, POST, PUT, DELETE, etc., to the server where the REST-based API will accept these requests, process them and send back responses.  The responses sent back to the clients will be in Extensible Markup Language (XML) or JavaScript Object Notation (JSON) format.  Example: Accuweather.com.  Users can see the weather at a given location though accuweather’s weather application in their mobiles.  This application uses a REST API provided by accuweather to access the weather details. When a user selects a location in the mobile app, the application sends a HTTP or HTTPS request.  Accuweather’s server responds back with the weather details. 33 Figure 8 REST-based communication 34 Figure 9 Accuweather.com. 35 Logical Design of IoT: IoT Communication APIs: WebSocket-based Communication APIs  WebSocket-based API creates full-duplex communication between clients and servers.  It follows exclusive Web pair communication model.  WebSocket-based communication is stateful.  This Communication API does not require a new connection to be set up for each message to be sent between clients and servers.  Once the connection is set up the messages can be sent and received continuously without any interruption.  WebSocket APIs are suitable for IoT Applications with low latency or high throughput requirements. 36 Figure 9 WebSocket-based Communication 37 THANK YOU!

Use Quizgecko on...
Browser
Browser