Fog and Edge notes
Fog and Edge notes
79
Index Page
Fog and Edge Computing – Principles and Paradigms
Chapter 3 – Internet of Vehicles (IoV) (Page 81)
- Connected Vehicles: Concepts and Architectures
- Challenges in IoV
- Energy E iciency
- Advantages of Middleware
Page | 79
80 Fog and Edge Computing – Principles and Paradigms
- System Model
- Middleware Components
Page | 80
81
Chapter 3
Internet of Vehicles (IoV)
Page | 81
82 Fog and Edge Computing – Principles and Paradigms
Vehicle-to-Pedestrian (V2P)
This involves direct communications
between a vehicle and pedestrians, within
close proximity of the vehicle.
One important aspect of V2P is the
pedestrian detection system that can be
implemented in a number of ways:
1. within vehicles (for blind spot warning,
incident ahead warning, etc.);
2. embedded within the roadside
infrastructure (e.g. lane closure warning);
and
3. carried by pedestrians (e.g. smart devices Architecture of a local context aware
to warn the drivers). system
Example: Vehicle to Pedestrian (V2P)
Telstra in partnership with Cohda Wireless,
who have successfully conducted V2P
technology experiments over a mobile
network in South Australia.
V2X (Vehicle-to-Everything)
Communication
It refers to the technology and processes that
allow vehicles to communicate with
different parts of the traffic system around
them. Protocol stack for IoV
Page | 82
Chapter 3 – Internet of Vehicles (IoV) 83
• Employs visual, tactile, and audible alerts, 1. within vehicles (for blind spot
or a combination of these, to warn drivers to warning, incident ahead warning,
take appropriate action to avoid crashes, etc.);
e.g., change speed or change direction.
2. embedded within the roadside
Vehicle-to-Infrastructure (V2I) infrastructure (e.g., lane closure
• This refers to a vehicle being connected to warning); and
highway infrastructure that includes traffic
3. carried by pedestrians (e.g., smart
lights, traffic signal sensors, road sensors,
devices to warn the drivers).
speed cameras, communication satellites,
parking meters, bus stops, etc. V2X (Vehicle-to-Everything)
• Communication is wireless and bi- Communication
directional. • It refers to the technology and processes
• Hardware technologies and components that allow vehicles to communicate with
include sensors such as RFID, radars, and different parts of the traffic system around
cameras. Communication takes place using them.
dedicated DSRC frequencies which are • In this respect, V2X is a context-aware
similar to V2V connectivity. system that includes V2V, V2I, and V2P
• The purpose is to capture infrastructure communication
data to provide travellers with real-time
advisory information to change speed, apply Internet of Vehicles: Architecture,
brakes, follow diverted routes, or avoid Protocols, and Security
certain situations. • The concept of Vehicular Ad-hoc
Networks (VANETs) was conceived over a
Vehicle-to-Cloud (V2C) decade ago and has since then been a very
This refers to a vehicle being wirelessly active area of research both in academia and
linked up to a cloud environment mainly to: industry as the number of vehicles
connected to the IoT increases, new
1. access, transfer, share, and analyse
requirements of VANETs (such as inter-
information; and make decisions in
vehicular, vehicular infrastructure and
real time;
vehicular-Internet, vehicular personal
2. store and retrieve data; and devices, and intra-vehicular
communications) are emerging.
3. provision and consume other cloud-
• The main problems of VANETs is its
based services
limited capacity for processing all the
Vehicle-to-Pedestrian (V2P) information that is collected by themselves
• This involves direct communications and other actors (such as sensors and mobile
between a vehicle and pedestrians, within devices) around the environment.
close proximity of the vehicle. • Vehicles must evolve into “smart” objects
• One important aspect of V2P is the equipped with a multi-sensor platform, with
pedestrian detection system that can be a set of communication technologies, robust
implemented in a number of ways: computational units.
• IP-based connectivity to the Internet, and a
direct or indirect connection to other
Page | 84
Chapter 3 – Internet of Vehicles (IoV) 85
vehicles and with all devices around the congestion traffic level, or vehicular
environment. safety services) for large cities or
• The concept of VANETs is evolving into even a whole country.
the Internet of Vehicle (IoV). • By using intelligent systems on
• The basic principle of a VANET is that a vehicles and different cyber-physical
vehicle is a mobile node that enables it to systems (such as sensors, vehicles,
connect to other vehicles thereby creating a and mobile devices) in cities we can
network. develop a global network that
• Vehicles are connected or disconnected as provides different services to
they fall inside or outside of the coverage vehicles and the humans associated
range. with them.
• VANETs are considered to be a • IoV also refers to vehicles, humans,
conditioned network with mobility components of the transportation
constraints, affected by the number of infrastructure, and a set of devices
connected vehicles, and several factors such allocated in the environment,
as traffic jams, tall buildings, and bad driver connected through an all IP-based
behaviors which affect its performance and infrastructure, that exchange
use. information directly or indirectly to
• VANETs lack the processing capacity for contribute toward a more efficient,
handling global information. safer, and greener world of
• VANETs do not have the capacity to transportation.
analyze, process, and evaluate the global
Benefits of IoV
information that is collected from the
• The IoV might be defined as a platform
different vehicles that are part of the
that enables the exchange of information
network.
between the car and its surroundings through
• VANETs are well suited for short-term
different communication media.
applications or for small scale services such
• As a result of the integration of the IoT
as collision prevention or road hazard
technology with Intelligent Transportation
control notifications services.
Systems (ITSs), IoV will create an
• In contrast, IoV integrates two
integrated network for supporting different
technological visions:
functions (such as intelligent traffic
1. Vehicle’s Networking management, dynamic information services,
intelligent vehicle control, among others).
2. Vehicle’s Intelligence
• IoV is composed of three fundamental
• IoV focuses on the integration of
components:
objects such as humans, vehicles,
things, networks, and environments 1. Intervehicular network
to create an intelligent network based
2. Intravehicular network
on computing and communication
capabilities that supports services 3. Vehicular mobile Internet
(such as global traffic efficiency and
management service based on • IoV allows vehicles to be permanently
pollution levels, road conditions, connected to the Internet, forming an
Page | 85
86 Fog and Edge Computing – Principles and Paradigms
• (4) Service layer specifies the services that sources (vehicle internal sensors and the
the different types of cloud (public cloud, navigation system, data collected from inter-
private cloud, and enterprise cloud) offer to vehicle communication, data from sensors,
drivers based on subscription, data center, or traffic lights, and signals among others)
on-demand. located on the roads.
• IoV allows vehicles and drivers to be (iii) Data Filtering and Preprocessing Layer:
connected to the Internet, and therefore, • This layer analyzes the collected
enables them to have access to a broad range information to avoid the transmission of
of service providers. irrelevant information and reduce the
• This access will facilitate commercial network traffic.
business services’ integration with vehicles • Transmission decisions are based on a
hence creating the vehicle-to-business service profile created for the vehicle which
(V2B) communication. has subscribed or active services.
• SAP research proposed a service-based
(iv) Communication Layer:
architecture based on the service-oriented
• This layer selects the best network to send
architecture and the event-driven
the information by using several selection
architecture.
parameters such as congestion and QoS
• V2B integration architecture specifies two
level in the different available networks,
dedicated components:
information relevance, privacy, and security,
1. The vehicle integration platform as a among others.
back-end system enabling efficient
(v) Control and Management Layer:
information exchange between
• This layer is responsible for managing
enterprise applications and vehicles.
different network service providers that are
2. The back-end integration manager within the IoV environment.
that connects in-vehicle components. • In this layer, different policies (such as
traffic management, traffic engineering, and
The proposed seven-layer IoV
packet inspection) and functions are applied
architecture
to better manage the information received.
(i) User Vehicle Interface Layer:
• This layer provides direct interaction with (vi) Processing Layer:
the driver through a management interface • This layer processes large amounts of
to coordinate all driver notifications and information using various types of cloud
select the best display element for the computing infrastructures locally and
current situation or event to help reduce remotely.
driver’s distractions. • The results of the processed information
• For example, if there is a collision risk can be used by massive data services
with a vehicle ahead, a set of lights on the providers to further improve the service or
car’s dashboard can activate while a sound to develop new applications.
is emitted to alert the driver. • The results obtained after processing can
also be used by various government
(ii) Data Acquisition Layer:
agencies in the development of future
• This layer collects data from various
Page | 87
88 Fog and Edge Computing – Principles and Paradigms
infrastructures, V2B services, and policies to • Based on the vehicle’s profile (service
help improve or better manage road traffic. requirements) and the available information
in the environment (such as available
(vii) Security Layer:
network access technologies, available
• This is a transversal layer that has direct
network service providers, QoS of each
communication with the rest of the layers.
network, costs, and others), the best network
• It is responsible for all security functions
is selected using some intelligent algorithm
(such as data authentication, integrity, non-
(implemented in the communication layer).
repudiation, and confidentiality, access
• All the information transmitted through the
control, availability, among others) within
network is managed through a set of
the proposed architecture.
mechanisms (such as policies and rules,
• The layer is designed to support mitigating
network flow processing and classification,
solutions for addressing various types of
packet inspection, among others) to maintain
security attacks (such as cyberattacks and
high efficiency for all services delivered
others) in IoV.
within the environment.
Communication example of the proposed • The preprocessed information is classified
seven-layered architecture (e.g., as private and business), and then sent
• Proposed seven-layered IoV architecture to the most suitable cloud for analyzing,
based on Contreras-Castillo et al. processing, storing, and availability based
• When a vehicle starts its engine, it triggers on the information type
the initialization process to authenticate
Standards for IoV
itself with the IoV network and begins the
• IoV involves many participants, and the
environmental data acquisition process.
connectivity must be assured between all
• This acquisition step collects all the
participants. One of the main challenging
information generated by vehicles, humans,
issues for the interconnection of vehicles is
and roadside infrastructures (car sensors,
interoperability.
location, pollution level sensors, traffic
• To ensure this, we need to develop
lights, signs, cell phones, mobile devices,
standards for the IoV framework.
body area networks, among others) within
• International organizations and consortia
the mobility area of the vehicular network.
such as Internet Engineering Task Force,
• The collected information is filtered and
EPCglobal, Institute of Electrical and
preprocessed to obtain the most relevant
Electronics Engineers, European Committee
information to be transmitted to:
for Standardization (CEN), European
1. The driver, using one of the Telecommunications Standards Institute
interaction mechanisms such as (ETSI), led by the World Wide Web
visual, acoustic or haptic; Consortium (W3C) are investing a lot of
efforts to define standards and protocols for
2. The network depending on the IoV.
coverage, type, and sensitivity of the • The W3C is focusing on standards for
information; or application developers which will provide
3. Discarded to reduce the load on the more accurate access to vehicle data (such
IoV network. as vehicle identification, acceleration and
speed, tire pressure, battery status, and
Page | 88
Chapter 3 – Internet of Vehicles (IoV) 89
Autonomous vehicles need high bandwidth MAC protocols for IoV should support
and low latency for transmitting sensory different types of applications with different
data or receiving necessary information requirements for QoS (such as low delay or
from outside. At the same time, the high- failure rates).
speed movement of vehicles imposes strict
MAC protocols need to solve several
limits on delay and reliability. 5th
problems, such as the hidden station
Generation mobile networks (5G), as the
problem or the shared bandwidth among the
successor of LTE, is a new access
communicating vehicles. Some protocols,
technology that aims to bring reliable and
such as IEEE 802.11p or DMAC
low-latency transmissions.
(decentralized), use OFDM (Orthogonal
Physical Layer Protocol Frequency Division Multiplexing)
technology and a CSMA (Carrier Sense
When a protocol for the physical layer is
Multiple Access) mechanism to control
designed, factors such as multipath fading
medium access and avoid collisions.
and Doppler frequency shifts caused by the
movement of vehicles must be considered. IEEE 802.11p provides reliability and low
latency requirements in intervehicular
Some recent efforts have focused on using
communications. DMAC increases the reuse
infrared and radio waves for vehicle-to-
of the transmission channel to improve
vehicle communications because they offer
performance and reduce collisions using
line-of-sight and broadcast communications.
directional antennas.
Dedicated Short-Range Communication
Another type of MAC protocol uses the
(IEEE 802.11p WAVE) is based on IEEE
ALOHA approach in its transmission
1609 standards and describes techniques and
scheduler. In this category, some protocols,
interface processes controlled by the MAC
such as ADHOC MAC or VC-MAC, have
layer for public safety and private
recently been proposed as alternatives for
applications.
cooperative communication in VANETs.
The frequency band is divided into six These protocols aim to use spatial
service channels used for different reusability to maximize network throughput,
application types (frequency range 5.855– guarantee QoS, address terminal problems,
5.875 MHz for ITS nonsafety applications and reduce transmission collisions.
and frequency range 5.875–5.905 MHz for
Routing Protocols in IoV
safety and traffic efficiency applications)
and one control channel. Transmission Strategy-Based Routing
Protocols
The main idea of the IEEE 802.11p WAVE
protocol is to integrate PHY and MAC These focus on transmitting data from a
layers of the IEEE 802.11 wireless standard single node to a destination node through all
to allow data exchange among vehicles and nodes in a specified geographical region or
roadside devices in the 5.9 GHz band. via multihop transmissions. These protocols
may suffer from high delays in finding
MAC Layer Protocols
routes and excessive network flooding,
which can disrupt communications.
Page | 90
Chapter 3 – Internet of Vehicles (IoV) 91
Some challenges include ensuring delay- Hickey mentioned that one way to analyze
tolerant protocols maintain network security threats is to identify mitigation
coverage while limiting transmissions and techniques used in comparable critical
ensuring delay-sensitive protocols avoid infrastructure systems. He argued that
congestion while maintaining a high disrupting a vehicle’s sensors or
delivery ratio with low latency. communication is difficult, but the threat is
real and could have severe consequences for
Target Networks Routing Protocols drivers, passengers, and infrastructure.
These protocols consider different access To address security concerns, the National
technologies in IoV. Unlike traditional Institute of Standards and Technology
VANET routing protocols that assume (NIST) proposed a framework to improve
homogeneous networks, IoV must handle critical infrastructure cybersecurity. Some
heterogeneous models, requiring real-time researchers have also developed secure V2V
handoff strategies, gateway node selection, and V2I communication schemes for
optimal wireless technology usage, IP VANET applications.
addressing, and mobility management.
IoV security solutions must meet key
Security in IoV requirements, such as ensuring user privacy,
Zhang stated that IoVs, like other securing communication channels, and
technologies, have many security preventing unauthorized access.
vulnerabilities. Vehicles operate in
Page | 91
92 Fog and Edge Computing – Principles and Paradigms
Chapter 4
Optimization Problems in Fog and Edge
Computing
Page | 92
Chapter 4 – Optimization Problems in Fog and Edge Computing 93
Page | 93
94 Fog and Edge Computing – Principles and Paradigms
Page | 94
Chapter 4 – Optimization Problems in Fog and Edge Computing 95
Page | 95
96 Fog and Edge Computing – Principles and Paradigms
Page | 96
Chapter 4 – Optimization Problems in Fog and Edge Computing 97
specifications, enhancing reliability and in an end device and partly offloaded from
security. the end device to an edge resource, this may
Model Checking: Uses tools like lead to a situation in which the total
UPPAAL or PRISM to verify execution time is determined by the sum of
performance, security, and reliability multiple computation and data transfer steps.
properties by systematically Resource Usage
exploring possible system states. This particularly applies to end devices,
Theorem Proving: Employs logic- which typically have very limited CPU and
based verification methods using memory capacity. Edge resources typically
tools such as Coq or Isabelle to offer higher capacities, but also those
prove the correctness of algorithms capacities can be limited, given that edge
and protocols. resources may include machines like routers
Simulation & Testing: Uses that do not offer exhaustive computational
frameworks like iFogSim, capabilities.
FogTorch, or EdgeCloudSim to To some extent, CPU usage can be
simulate real-world scenarios and compromised with execution time, i.e.,
evaluate system behavior under overbooking the CPU may lead to a
various conditions. situation where the application is still
running, but more slowly. This may be
Metrics - Further Quality Attributes acceptable for some applications, but not for
Independently from the specific application time-critical ones.
– and hence, problem variant – some metrics Memory poses a harder constraint on
play an important role in fog computing. resource consumption since overbooking the
Performance memory may lead to more serious problems
Performance is related to the amount of time like application failure. Beyond CPU and
needed to accomplish a certain task. In a fog memory, also network bandwidth can be a
computing setting, it is important to note scarce resource, both between end devices
that accomplishing a task usually involves and edge resources and between edge
multiple resources, often on different levels resources and the cloud. The use of network
of the reference model. The completion time bandwidth may have to be either minimized
of the task may depend. or constrained by an upper bound.
Some of these steps might be made in Energy Consumption
parallel (e.g., multiple devices can perform Energy is consumed by all resources as well
computations in parallel), whereas others as the network. Even idle resources and
must be made one after the other (e.g., the unused network elements consume energy,
results of a computation can only be but their energy consumption increases with
transferred once they have been computed). usage. Energy consumption is important on
Completion time = Computation time of each layer of the fog, but in different ways.
multiple resources + Time for data For end devices, battery power is often a
transfer between the resources. bottleneck, and thus preserving it as much as
The total execution time depends on the possible is a primary concern. Edge
critical path of compute and transfer steps. resources are typically not battery-powered;
For instance, if a computation is partly done hence, their energy consumption is less
Page | 97
98 Fog and Edge Computing – Principles and Paradigms
Page | 98
Chapter 4 – Optimization Problems in Fog and Edge Computing 99
the need for exchanging data over orders of degree higher than the
the network, which in turn decreases number of data centers in a
the likelihood of eavesdropping, distributed cloud.
man-in-the-middle, and other 2. Problems involving edge resources
and end devices
network-based attacks. Minimizing
o The collaboration of end
the number of resources used also
devices with edge resources
helps in decreasing risks related to (e.g., offloading computations)
information security. is a typical fog computing
Trade-offs in Optimization problem, and because of the
Increasing redundancy may be limited resources of end
beneficial for improving reliability devices, optimization plays a
but at the same time, it can lead to vital role in such cases.
higher costs. Computation Offloading
Preferring service providers with The technique where computations are
high reputation is advantageous from migrated from resource-intensive end
devices to resource-rich infrastructures,
the point of view of security but may
such as Cloud or nearby edge devices.
also lead to higher costs.
All three layers can be optimized
Constraining co-location options
together.
may improve privacy but may lead to The difficulties relate on one hand to the
worse performance or higher energy computational complexity of large-scale
consumption. optimization problems involving
decision variables for all fog resources.
Optimization Opportunities along the Fog Many different technical issues would
Architecture have to be integrated into a single
Optimization problems in fog computing optimization problem to capture the
can be classified according to which layer(s) different optimization concerns of the
of the three-layer fog model are involved. cloud, the edge resources, and the end
Real fog computing problems involve at devices, which is challenging in itself.
least two layers. Changes to the cloud, the edge
This consideration leads to the following resources, and the end devices are
classification of optimization problems in typically made by different stakeholders
fog computing: on different time scales, which is also a
1. Problems involving the cloud and the rationale for independent optimization
edge resources of the different fog layers.
o This is a meaningful setting, Optimization Targets in Fog Layers
which allows, for example, to Data-related optimization: Decisions
optimize overall energy have to be made about which pieces of
consumption of cloud and edge data are stored and processed in the fog
resources, subject to capacity architecture.
and latency constraints. Code-related optimization: Program
o This setup shows some code can be deployed on multiple
similarity to distributed cloud resources, and the goal is to find the
computing; a potential optimal placement of the program code.
difference is that the number of
edge resources can be in several
Page | 99
100 Fog and Edge Computing – Principles and Paradigms
Page | 100
Chapter 4 – Optimization Problems in Fog and Edge Computing 101
Page | 101
102 Fog and Edge Computing – Principles and Paradigms
Chapter 5
Middleware for Fog and Edge Computing
Page | 102
Chapter 5 – Middleware for Fog and Edge Computing 103
Page | 103
104 Fog and Edge Computing – Principles and Paradigms
Page | 104
Chapter 5 – Middleware for Fog and Edge Computing 105
Page | 105
106 Fog and Edge Computing – Principles and Paradigms
Page | 106
Chapter 5 – Middleware for Fog and Edge Computing 107
Page | 107
108 Fog and Edge Computing – Principles and Paradigms
Page | 108
Chapter 5 – Middleware for Fog and Edge Computing 109
Lu et al. proposed a lightweight privacy Recent research shows that several human-
preserving scheme using Chinese remainder dependent contexts have patterns.
theorem . These patterns can be learned to intelligently
Wang et al. proposed Laplacian mechanism manage the operations between multiple
query model that deals with privacy devices.
preservation of location- aware services . 2.2 Selection of Participating Devices
Dsouza et al. proposed Policy- based access FEA employs devices from the environment
control mechanisms for fog computing. that can sense and/or process the data a
cquired in the FEA applications.
1.c. Device Discovery Selection of the surrogate device can be
Device discovery allows the new devices to based on different policies designed in the
participate and leave the network as they middleware.
become available in the network. Research shows several policies such as
MQTT is used as the standard publish- fairness- based selection , game theoretic ,
subscribe message API, which is a context optimization , and resource
lightweight messaging protocol designed for optimization approaches that are used in
constrained devices and low- bandwidth surrogate selection.
high-latency unreliable networks. Participating users are selected based on
Fog and edge- distributed middleware can different criterion ranging from simple user
also use pub- sub as a service from a third context such as the location of the device to
party such as Nearby Message , or PubNub selection based on the reputation of user task
that may be integrated into the middleware. completion history.
These services Following are different surrogate selection
may provide security , scalability , and techniques.
reliability for Energy- Aware Selection
message exchange. Remaining battery is critical to every mobile
The Nearby Messages API is a publish- user and it determines the amount of
subscribe API that lets you paas small binary resources that the device owner may share.
payloads between internet- connected Selection of surrogates is a trade- off
Android and iOS devices between the quality of information gathered
and the remaining battery on the device with
Middleware Components an incentive budget.
Components of middleware commonly used Delay Tolerance- Based Selection
in fog and edge applications are discussed in Real- time applications and Streaming data
the following subsections. application require the processing to be
Context Monitoring and Prediction completed in a given time constraint .
FEA can adapt to dynamic changes in the Performance- based selection of surrogates
user environment using the context- aware is proposed in incentivized schemes.
design of middleware. Context- Aware Selection.
This may involve continuous monitoring of Context- aware functionality is used in many
relevant context and adaptive actions that mobile applications .
are based on changes in the context. Applications are designed to adapt
Page | 109
110 Fog and Edge Computing – Principles and Paradigms
Page | 110
Chapter 5 – Middleware for Fog and Edge Computing 111
Sensors/Actuators
The sensors handle the important task of
obtaining real- time data from the
environment and user’s surrounding.
The information obtained through sensors is
used in several forms.
Sensor data may be acquired in the FEA
application itself.
It can also be used to evaluate and extract
context information of the device user.
In more complex applications, the closed-
loop information is acquired and analyzed
and further used for taking real- time actions
using the actuators.
Page | 111