You are on page 1of 23

IOT GATEWAY, IOT EDGE COMPUTING, IOT

PROGRAMMING
INTRODUCTION

Programming for IoT is usually a polyglot (multiple languages) effort since the Internet-of-Things (IoT)
is a system of inter-related computing devices that are provided with unique identifiers and the ability to
transfer data over a network. The choice of programming-language depends on the capability and
purpose of the device. IoT encompasses a variety of devices including edge devices, gateways, and cloud
servers.The most popular languages in IoT are Java, C, C++, Python, Javascript, Node.js, Assembler,
PHP, C#, Lua, R, Go, Ruby, Swift and Rust in descending order of popularity. This is from a 2017
online survey co-sponsored by Eclipse IoT Working Group, IEEE IoT, AGILE IoT and IoT Council in
which 713 individuals participated.
Other languages include Parasail, Microsoft P, Eclipse Mita, Kotlin, Dart, MicroPython, and B#.
• Edge Devices - These are constrained-resource embedded systems. For very small devices
(higher constraints), Assembly and C are the languages of choice. A better processor and
more computing power on the device enables one to use C, Python, Node.js, Java. The
focus is to minimize instruction count, and maximize execution speed and resource
management.
• Gateways - Gateways manage communication and do analysis of data from many devices
through several different buses. More languages can be run on these devices because of their
increased computing power, including C, C++, Java, Python, and Node.js.
• Cloud - With the nearly unlimited computing capability that's available, frameworks
like Apache Hadoop and HiveQL can compute and process large IOT datasets. Statistical
computing and visualization can be done using languages like R or Julia.
The features to consider when evaluating IoT programming frameworks

• Scalability - Programming frameworks that support diverse programming patterns that are able to
perform load-balancing dynamically.
• Concurrency - Real-time communication between millions of devices and applications mean
millions of concurrent connections. Thread locking is not efficient in such situations.
• Coordination - Programming language support for explicitly (control driven) or implicitly (data
driven) orchestrating the role of computing elements.
• Heterogeneity - Programming framework gives guidance on how computations are mapped to the
computing elements.
• Fault tolerance - Applications should be able to gracefully go from online to offline state as
networks partition and heal their connections.
• Light footprint - In terms of runtime overhead and in terms of programming effort the framework
should be light.
• Support for latency and sensitivity - In geographically distributed applications, pushing all
computations to the cloud is not ideal. The programming framework has to handle these
requirements dynamically.
I.O.T. GATEWAY

Fig. 1) IOT Gaateway


INTRODUCTION

Gateway provides a bridge between different communication technologies which means we can say
that a Gateway acts as a medium to open up connections between the cloud and
controller(sensors/devices) in Internet of Things (IoT). With the help of gateways, it is possible to
establish device-to-device or device-to-cloud communication. A gateway can be a typical hardware
device or software program. It enables a connection between the sensor network and the Internet along
with enabling IoT communication, it also performs many other tasks such as this IoT gateway
performs protocol translation, aggregating all data, local processing, and filtering of data before
sending it to the cloud, locally storing data and autonomously controlling devices based on some
inputted data, providing additional device security. The below figure shows how IoT Gateways
establish communication between sensors and the cloud (Data System).
As IoT devices work with low power consumption(Battery power) in other words they are energy
constrained so if they will directly communicate to cloud/internet it won’t be effective in terms of
power. So they communicate with Gateway first using short range wireless transmission
modes/network like ZigBee, Bluetooth, etc as they consume less power or they can also be connected
using long range like Cellular and WiFi etc. Then Gateway links them to Internet/ cloud by converting
data into a standard protocol like MQTT. using ethernet, WiFi/cellular or satellite connection. And in
mostly Gateway is Mains powered unlike sensor nodes which are battery powered. In practice there
are multiple Gateway devices.
Let’s think about a simple IoT gateway, then our smartphone comes into picture as it can
also work as a basic IoT gateway when we use multiple radio technologies like WiFi,
Bluetooth, Cellular network of smart phone to work on any IoT project in sending and
receiving data at that time this also acts as a basic IoT Gateway.
Working of IoT Gateway :

• Receives data from sensor network.


• Performs Pre processing, filtering and cleaning on unfiltered data.
• Transports into standard protocols for communication.
• Sends data to cloud.

IoT Gateways are key element of IoT infrastructure as Gateways establish connection for communication
and also performs other task as described above. So IoT Gateway is one of most essential thing when we
start think about an IoT ecosystem.

Fig.2) IOT gateway working


One reason why an IoT gateway tends to be more complex than a Wi-Fi router is that IoT devices use
several different protocols. These protocols include Z-Wave, BACnet, Bluetooth Low Energy and Zigbee.
As such, an IoT gateway might need to support a variety of protocols to service all the IoT devices in an
organization.
In addition to supporting these protocols, the gateway must be able to route each type of IoT traffic to the
appropriate destination. Data from a collection of industrial sensors might need to be sent to a database in
the Amazon Web Services cloud, whereas data from building security sensors might need to be directed to a
SaaS vendor that operates a cloud-based security portal.
Another reason why IoT gateways can be more complex than Wi-Fi routers is that IoT gateways might need
to locally cache data in case internet connectivity fails or the gateway is flooded with more data than it can
handle.
Additionally, IoT gateways often support failover clustering, or the ability to scale out to support
increasingly large workloads.
IoT Gateways In The IoT Architecture

IoT infrastructure can be divided into four architectural layers. These include:
• Sensor Layer: At the sensor layer, devices collect data for future processing. IoT devices operate at
this layer.
• Network or Data Acquisition Layer: At this layer, data is aggregated from multiple sources and
securely transmitted to processing systems. Data acquisition systems (DAS) are responsible for
aggregating and converting data to a desired format. IoT gateways operate at this level to provide
secure connectivity between IoT devices and processing infrastructure.
• Data Pre-processing Layer: At this layer, IoT sensor data undergoes pre-processing and basic data
analytics to reduce data volume before it is transmitted on to cloud-based infrastructure. IoT edge
devices operate at this layer.
• Cloud Analysis or Application Layer: Cloud-based infrastructure performs in-depth data analytics
and provides applications and users with access to data and analytic results. Data storage or
warehousing may also occur at this layer.
Advantages of Gateway

Protocol translation: IoT devices typically use different communication protocols, and a gateway can
translate between these protocols to enable communication between different types of devices.
Data aggregation: A gateway can collect data from multiple IoT devices and aggregate it into a single
stream for easier analysis and management.
Edge computing: Gateways can perform edge computing tasks such as data processing, analytics, and
machine learning, enabling faster and more efficient decision-making.
Security: Gateways can act as a secure access point for IoT devices, providing a layer of protection
against cyber threats.
Scalability: Gateways can support a large number of IoT devices and can be easily scaled up or down to
meet changing needs.
Improved reliability: Gateways can help to improve the reliability of IoT devices by managing network
connectivity and providing a backup mechanism in case of network failure.
Cost-effective: Gateways can be a cost-effective way to manage and control a large number of IoT
devices, reducing the need for expensive infrastructure and IT resources.
What does an IoT gateway do?

An IoT gateway acts as a network router, routing data between IoT devices and the cloud. Early on,
most gateway devices only sent traffic in one direction: from the IoT device to the cloud. Now it's
common for gateway devices to handle both inbound and outbound traffic. Outbound traffic streams are
used to send IoT data to the cloud, while inbound traffic is used for device management tasks, such as
updating firmware. Some IoT gateways do more than just route traffic, they can also preprocess data
locally at the edge before sending it to the cloud. In doing so, the device might deduplicate, summarize
or aggregate data as a way of reducing the volume of data that must be forwarded to the cloud. This can
improve response times and reduce network transmission costs.
IOT EDGE COMPUTING

INTRODUCTION

Edge computing takes place at or near the physical location of either the user or the source of the data. By
placing computing services closer to these locations, users benefit from faster, more reliable services with
better user experiences, while companies benefit by being better able to support latency-sensitive
applications, identify trends, and offer better products and services.
Edge computing is one way that a company can use and distribute a common pool of resources across a
large number of locations to help scale centralized infrastructure to meet the needs of increasing numbers
of devices and data.
How are IoT and edge related?

IoT benefits from having compute power closer to where a physical device or data source actually exists.
In order for the data produced by IoT devices to react faster or mitigate issues, it needs to be analyzed at
the edge, rather than traveling back to a central site before that analysis can take place.
Edge computing is a local source of processing and storage for the data and computing needs of IoT
devices. Here are some of the benefits of using IoT and edge together:
• Reduced latency of communication between IoT devices and the central IT networks.
• Faster response times and increased operational efficiency.
• Improved network bandwidth.
• Continued systems operation offline when a network connection is lost.
• Local data processing, aggregation, and rapid decision making via analytics algorithms and machine
learning.
• An IoT gateway can send data from the edge back to the cloud or centralized datacenter, or to the edge
systems to be processed locally.
The Goal Of IoT Edge

Just as edge computing aims to bring resources and data storage closer to the sources themselves in order
to improve response time, latency, and other issues, IoT Edge aims to achieve similar goals. IoT devices
inherently encompass a significant amount of data that can interrupt user experience and security. IoT
Edge computing processes its data closer to the origin source to reduce any friction or latency within the
cloud.
Edge devices are computing systems deployed near the location of the user or device that uses them. This
geographic proximity minimizes the network latency between the edge device and its user, enabling it to
provide faster and more reliable services.
IoT edge devices are intended to provide additional computing power for resource-constrained IoT
devices. IoT devices can collect and transmit data to IoT edge systems and rapidly receive results without
needing to perform calculations themselves.
Components of the IOT edge system

Typically, an IoT edge system includes the following components:


• IoT Devices: These are the sensors, actuators, and devices that collect data or interact with the physical
world. Examples include temperature sensors, cameras, and smart thermostats.
• Edge Gateway: The edge gateway acts as a bridge between the IoT devices and the edge computing
infrastructure. It collects data from sensors, preprocesses it, and sends relevant data to the edge
computing nodes or the cloud.
• Edge Computing Nodes: These are the computing devices that perform data processing and analytics
at the edge. They can be industrial PCs, edge servers, or even specialized hardware designed for edge
computing tasks.
• Edge Software: Specialized software and algorithms run on edge computing nodes to analyze and filter
data. Machine learning models, rules engines, and custom applications may be deployed for specific
tasks.
• Connectivity: Edge systems often need to communicate with the cloud or central data centers for
remote management, monitoring, and to transmit important data. This is typically done using wired or
wireless connectivity.
• Management and Monitoring: Tools and software are used to manage and monitor the health
and performance of edge devices and applications. These tools ensure that the system operates
efficiently and can be updated remotely.
IoT edge systems are widely used in various industries, including manufacturing, transportation,
healthcare, agriculture, and smart cities, where real-time data analysis, low latency, and reliability are
essential for successful IoT deployments.
Advantages
An IoT (Internet of Things) edge system refers to the computing infrastructure and devices that are
positioned at the edge of a network, closer to where data is generated or collected by IoT devices. These
systems are designed to process, analyze, and sometimes even take immediate actions on the data locally,
before sending relevant information to centralized cloud-based servers or data centers. This approach
offers several advantages:
• Low Latency: By processing data at the edge, near the source, you can reduce the time it takes to
analyze and respond to critical events. This is crucial for applications where real-time or near-real-
time responses are required, such as autonomous vehicles, industrial automation, and healthcare.
• Bandwidth Efficiency: Edge systems can filter and preprocess data locally, sending only relevant
information to the cloud. This reduces the amount of data that needs to be transmitted over the
network, saving bandwidth and associated costs.
• Privacy and Security: Storing and processing data locally can enhance data privacy and security.
Sensitive information can be kept on-premises, reducing the risk of data breaches or unauthorized
access.
• Robustness: Edge systems can continue to operate even when the network connection is unreliable or
disrupted. This ensures the continuity of critical services.
• Scalability: Distributed edge systems can be scaled horizontally to accommodate growing IoT
deployments without overloading centralized cloud servers.
Applications of IOT edge system

1) Industrial Automation and Manufacturing:


• Predictive Maintenance: Edge systems can analyze data from sensors on manufacturing equipment
to predict when maintenance is needed, reducing downtime.
• Quality Control: Real-time analysis of data from sensors can identify defects in products as they are
being manufactured.
• Process Optimization: Edge analytics can help optimize manufacturing processes to improve
efficiency and reduce waste.
2) Smart Cities:
• Traffic Management: Edge devices can process data from traffic cameras and sensors to optimize
traffic flow and reduce congestion.
• Environmental Monitoring: Edge systems can monitor air quality, noise levels, and other
environmental factors to improve urban planning.
• Public Safety: Edge analytics can be used for video surveillance, gunshot detection, and emergency
response systems.
3) Healthcare:
• Remote Patient Monitoring: Edge devices can collect and analyze health data from wearable
devices, providing real-time monitoring and early warning for medical conditions.
• Hospital Asset Tracking: Tracking and managing medical equipment in a hospital environment using
IoT edge systems.
• Drug Storage and Monitoring: Ensuring the proper storage and conditions of pharmaceuticals.
4) Agriculture:
• Precision Farming: Edge systems can analyze data from sensors in the field to optimize irrigation,
fertilization, and pest control.
• Livestock Monitoring: Tracking the health and behavior of livestock using wearable sensors and edge
analytics.
• Crop Monitoring: Analyzing data from drones and ground sensors to assess crop health and yield
predictions.
5) Energy Management:
• Grid Optimization: IoT edge systems can analyze data from smart meters and sensors on the power
grid to optimize energy distribution and reduce losses.
• Building Automation: Monitoring and controlling HVAC systems, lighting, and other building
functions for energy efficiency.
• Renewable Energy: Managing and optimizing the generation and distribution of energy from
renewable sources like solar and wind.
6) Retail:
• Inventory Management: Using IoT edge devices to track inventory levels and automate restocking.
• Customer Analytics: Analyzing customer behavior in physical stores for better marketing and store
layout decisions.
• Loss Prevention: Using edge analytics for video surveillance and theft detection.
7) Transportation and Logistics:
• Fleet Management: Tracking vehicles, monitoring driver behavior, and optimizing routes for logistics
companies.
• Asset Tracking: Monitoring the location and condition of valuable assets during shipping and
transportation.
• Supply Chain Visibility: Real-time monitoring of goods in transit for improved supply chain
management.
8) Smart Homes:
• Home Automation: Controlling and monitoring smart devices such as thermostats, security cameras,
and lighting.
• Security: Local processing of security camera feeds and doorbell cameras for quicker response to
security events.
9) Environmental Monitoring:
• Wildlife Tracking: Tracking the movement and behavior of wildlife for conservation purposes.
• Weather Stations: Collecting and analyzing weather data in remote locations.
10) Edge AI:
• Running machine learning models on edge devices for tasks such as image recognition, natural
language processing, and voice recognition.

You might also like