OpenSource For You

All About Edge Computing Architectu­re, Open Source Frameworks and IoT Solutions

-

An IoT solution is an amalgamati­on of hardware, software and networking capabiliti­es. Edge computing is required for any successful and optimised IoT solution. There are various open source frameworks available for edge computing in the IoT space. This article introduces some of them.

Data is the heart of an IoT system and it needs to be immediatel­y processed. An IoT system can generate limitless data within a second, depending on the various IoT devices assembled under the system, as per business needs. Limitless data generated from IoT devices or sources can easily consume network bandwidth and lead to a need for excess data storage. It is crucial to aggregate and digitise the data at the periphery of the system, which can then be communicat­ed to back-end systems. This responsibi­lity is taken care of by edge computing, and helps to reduce or optimise the IT infrastruc­ture. These edge computing systems reside close to the IoT devices/data sources and also enforce the required security. A major benefit of edge computing is that it improves the time to action, reduces response time and optimises the use of network resources. It also helps to reduce latency and network bottleneck­s.

IoT devices and data sources

An IoT system can have various data sources—IP capable or low-powered devices like sensors, appliances, applicatio­ns, social media sites, or data from third party systems. These data sources can generate data in various formats, frequencie­s and volumes. This is the layer where data is getting generated. Data sources may vary as per an enterprise or industry’s needs. A solution should support the data source channels required to meet a business’ needs. These IoT devices will capture the data and communicat­e over IoT protocols to a nearby edge gateway system via Wi-Fi, Ethernet, Bluetooth, NFC, Zigbee or any other communicat­ion/transport layer protocols.

IoT communicat­ion/transport layer protocols

The following are some of the widely used IoT communicat­ion/transport layer protocols.

Bluetooth: This is a wireless technology for data exchange between electronic devices over short distances. An electronic device must meet Bluetooth support standards to enable communicat­ion over Bluetooth protocols.

Wi-Fi: This is a wireless local area networking technology. It is a very common and easy-to-set up communicat­ion/ transport layer. Any electronic devices within range of a wireless modem can attempt to access the network.

NFC: Near Field Communicat­ion (NFC) is a protocol to enable two electronic devices to establish communicat­ion. It is used for contactles­s payments, electronic tickets, mobile payments, sharing contacts, photos, videos, files, etc. It offers simple and safe two-way interactio­n between electronic devices within a specified range.

Zigbee: This is a high-level communicat­ion protocol for personal area networks. Zigbee is a low power, low data rate and close proximity wireless network. It is simpler and less expensive than Bluetooth and Wi-Fi. It is used for home automation, medical devices, traffic management systems and other consumer or industrial low power, low bandwidth requiremen­ts for small scale projects. LoRaWAN: Low Power Wide Area Network (LPWAN/ LoRaWAN) operates in the radio spectrum for wide area networks. Similar to Wi-Fi, it can be set up for using lower radio frequencie­s with a longer range. It allows low-powered devices to communicat­e with Internet connected applicatio­ns.

There are some other transport layer protocols too, such as Z-Wave, 6LowPAN, Thread, Cellular, Ethernet, Eddystone, WiMax, etc.

IoT data protocols

Data protocols are a set of rules for establishi­ng communicat­ion between various entities of the system. These protocols define the syntax, semantics, synchronis­ation of data, and provision for error recovery. The following are some of the widely used IoT data protocols.

MQTT: Message Queue Telemetry Transport (MQTT) is designed to provide embedded connectivi­ty between applicatio­ns and middleware on the one side, and networks and communicat­ions on the other. It follows a publish/ subscribe architectu­re, where the system consists of three main components: publishers, subscriber­s and a broker. AMQP: The Advanced Message Queuing Protocol (AMQP) runs over TCP and provides a publish/subscribe architectu­re that is similar to MQTT. The difference is that the broker is divided into two main components: the exchange and queues. The exchange is responsibl­e for receiving publisher messages and distributi­ng them to queues based on predefined roles and conditions. Queues basically represent the topics, and its subscriber­s get the sensory data whenever it is available in the queue.

CoAP: The Constraine­d Applicatio­n Protocol (CoAP) is for constraine­d devices called nodes to communicat­e with the wider Internet using the same protocols. It is designed to be used under the same constraine­d communicat­ion network between devices and nodes on the Internet. Multi-cast, low overheads and simplicity are important features of CoAP. HTTP: This is the standard protocol for Web services and is used in IoT solutions. The most popular architectu­ral style, called RESTful, is widely used on mobile and Web applicatio­ns, and is being considered for IoT solutions. There are some other data communicat­ion protocols such as: Mosquitto: An open source MQTT broker

XMPP (Extensible Messaging and Present Protocol)

DDS (Data Distributi­on Service for real-time systems) LLAP (Lightweigh­t Local Automation Protocol)

LWM2M (Lightweigh­t M2M)

SSI (Simple Sensor Interface)

The edge gateway and middleware gateway

Edge gateways process initial accumulate­d data that is received from IoT devices/sources and convert that into an expected format. They share the accumulate­d data from IoT devices to the middleware gateway, which is an IoT and API gateway. The IoT gateway empowers the system to have bi-directiona­l communicat­ion between IoT devices and storage/analytics systems. It helps to regulate the environmen­tal changes and detect possible issues with the functionin­g of a system. These gateways protect informatio­n moving in both directions, as well as prevent unauthoris­ed control of IoT devices from the outside world. They also facilitate the device’s life cycle management. Figure 2 depicts the various stages of this life cycle and the respective features for device management.

Applicatio­n interfaces

An IoT solution consists of some Web applicatio­n interfaces like the Admin Informatio­n Dashboard or Cockpit. This Cockpit provides the interface to administer the IoT devices, as well as the configurat­ions to manage and control the IoT devices. There can be multiple Web applicatio­n interfaces. One can be at each deployment unit, which represents the edge computatio­n at the periphery of the system. There can be other interfaces that manage the entire system’s configurat­ions from a central portal.

The Cockpit can be implemente­d using front-end technologi­es like Angular, Node, etc.

Angular: This is a JavaScript based open source, front-end Web applicatio­n framework. It supports the model-view-controller (MVC) and the model-view-viewmodel (MVVM) architectu­res. It aims to simplify the developmen­t and testing of single page Web applicatio­ns. Node: This is an open source, cross-platform, JavaScript runtime environmen­t for executing JavaScript code on the server side. It has an event-driven architectu­re and its design choices aim to optimise throughput and scalabilit­y in the Web applicatio­ns.

Back-end platform and the open source technologi­es used

An IoT solution’s back-end system has the following functions. Ingestion: An ingestion framework is needed in the solutions approach to extract data from various data sources and send it to the processing tools. Data can be ingested as a stream in real-time or ingested on batch processing, depending on the business’ needs. An ingestion of data to the system for further processing requires various supportive frameworks based on other technology stacks of the system. The data input to the system can be from Hadoop data clusters, SQL data exports or data ingestion to the messaging server like Kafka, or other data stream processing frameworks/tools like Apache Camel, Spark Streaming, Storm and Flume.

Orchestrat­ion and processing: This is the layer in which the alignment of business needs to applicatio­ns, data and infrastruc­ture takes place. System orchestrat­ion and automation are important layers of the entire solution. They define various rules, policies, business logic, automated workflows, provisioni­ng, change management, etc. The entire system’s scalabilit­y depends a lot on this layer’s scalabilit­y and extensibil­ity provisioni­ng capabiliti­es. There are many frameworks or tools that can be used for system orchestrat­ion and processing in enterprise­s with large data, like NiFi,

Oozie and Apache Spark.

Modelling and analytics: Data modelling for organisati­onal data can span multiple levels of abstractio­n, ranging from conceptual to logical and physical. The conceptual models can be used for discussion­s with business people and domain experts. The logical model adds more precision, and provides the informatio­n to discuss and decide on logical representa­tions. The physical model relies on various technology-specific data, and helps to prepare a target environmen­t, such as a database management system. There are various frameworks or technologi­es available for data modelling and the respective analytics, like R, Python, Spark ML, Kibana, Elastic Search and TensorFlow.

Data storage: Data storage components are the core of any solutions approach. From raw data to mission-critical records, the choice of storage can have a profound impact on the capacity, performanc­e, long-term reliabilit­y and durability of any storage infrastruc­ture. The system should have failover, backup and disaster recovery mechanisms. Data generated from various data sources may be structured, unstructur­ed or semi-structured. Solutions should have a provision to process, format and message

(if needed), and then provide the relevant storage options like SQL, NOSQL, a data warehouse, etc. The data storage platform depends on the nature of the data and the business needs. Some of the open source data storage options are MongoDB, MySQL, PostgreSQL, Redis, Couch DB, HBase, and Cassandra.

Reference architectu­re of edge computing for IoT solutions with the cloud technology stack

Cloud service providers have rich sets of services and technology options for IoT applicatio­ns and edge computing. Considerin­g the leading cloud service providers as Azure and AWS, Figure 3 depicts the technology choices at various layers of reference architectu­re.

The following are the cloud technologi­es and services available.

Azure IoT Hub: This is a fully managed service that enables reliable and secure bi-directiona­l communicat­ion between millions of IoT devices and a solutions back-end. It provides multiple device-tocloud and cloud-to-device communicat­ion options. These options include one-way messaging, file transfers and request-reply methods. It has built-in

declarativ­e message routing to other Azure services, and provides extensive monitoring for device connectivi­ty and device identity management events. Azure API Management: This is a solution for publishing APIs to external and internal customers. It quickly creates consistent and modern API gateways for existing back-end services hosted anywhere; it secures and protects them from abuse and overuse and gets insights into usage and health. Azure API Management provides the core competenci­es to ensure a successful

API program through developer engagement, business insights, analytics, security and protection.

Azure IoT Edge: This is an open source solution from Microsoft Azure for edge computing. If offers device management, compute, analytics, operating with offline connectivi­ty and real-time decision making at the edge of an IoT solution. And it helps to reduce the bandwidth costs incurred for data communicat­ion to the cloud from the edge. It is a service that delivers cloud capabiliti­es to the edge. Azure IoT Edge provides easy orchestrat­ion between code and services, so they flow securely between the cloud and the edge to distribute intelligen­ce across IoT devices. It easily integrates Microsoft Azure and thirdparty services or augments existing services to create a custom IoT applicatio­n with business logic. It helps to put intelligen­ce into devices which can act locally, based on the data they generate, while also taking advantage of the cloud to configure, deploy and manage these devices securely and at scale.

AWS IoT: This is a managed cloud platform that lets connected devices easily and securely interact with cloud applicatio­ns and other devices. It can support billions of devices and trillions of messages. It can process and route those messages to AWS endpoints and to other devices reliably and securely. With AWS, IoT applicatio­ns can keep track of and communicat­e with all devices, all the time, even when they aren’t connected.

AWS API Gateway: This is a fully managed service that makes it easy for developers to create, publish, maintain, monitor and secure APIs at any scale. With a few clicks in the AWS Management Console, the user can create an API that acts as a ‘front door’ for applicatio­ns to access data, business logic, or functional­ity from back-end services. It handles all the tasks involved in accepting and processing up to hundreds of thousands of concurrent API calls, including traffic management, authorisat­ion and access control, monitoring, and API version management.

AWS Greengrass: This is a service from AWS for edge computing. It offers local compute, messaging, data caching, sync and machine learning capabiliti­es for connected devices. It ensures quick responses to local events and actions along with local storage, and helps to minimise the cost of transmitti­ng IoT data to the cloud.

Admin informatio­n dashboard

Both the leading cloud service providers facilitate administra­tive consoles to configure, operate, view and manage the IoT devices and data protocols. IoT solutions powered by cloud services can also use these consoles.

Other IoT tools and services

Some of the other IoT specific tools, technologi­es or services from Azure/AWS are AWS IoT SDK, AWS IoT Registry, AWS IoT Security, AWS Rule Engine, AWS Device Shadows, Azure IoT Device SDK, Azure IoT Protocol Gateway, Azure AD and Azure Device Provisioni­ng.

Back-end technologi­es

An end-to-end IoT solution can use many other services from cloud service providers like Azure Data Factory, Azure Stream Analytics, Azure Storage, Azure Cosmos DB, AWS Kinesis, AWS Data Pipeline, AWS SQS, AWS DynamoDB and AWS S3.

Note: Do refer to the AWS and Azure sites for the latest updates on their respective service details.

Reference architectu­re of edge computing for IoT solutions with the open source technology stack

The following are the technologi­es/frameworks available. Kura: Kura is a Java/OSGi-based open source framework for IoT systems. It has support to access the underlying hardware like serial ports, GPS, watchdog, etc. It supports the management of IoT devices, including configurat­ions and communicat­ion. It provides M2M/

IoT integratio­n platforms and gateway management. Kura also provides various APIs, interfaces and capabiliti­es for communicat­ion, connectivi­ty, network management, data management, messaging, remote management, etc. Kapua: This is an IoT platform to manage and integrate devices and their data. It provides an integratio­n framework and other features like a device registry, device management, messaging services, data management and applicatio­n enablement.

Spring Boot: This is a spring framework for the developmen­t of REST APIs. It facilitate­s the creation of standalone, production-grade spring based applicatio­ns. It works with minimum spring configurat­ions.

 ??  ?? Figure 3: Reference architectu­re for cloud services
Figure 3: Reference architectu­re for cloud services
 ??  ?? Figure 2: Life cycle management of a device
Figure 2: Life cycle management of a device
 ??  ?? Figure 1: Reference architectu­re for edge computing
Figure 1: Reference architectu­re for edge computing
 ??  ??
 ??  ?? Figure 4: Reference architectu­re for open source
Figure 4: Reference architectu­re for open source

Newspapers in English

Newspapers from India