• Non ci sono risultati.

Deployment and Management of Fog Applications

N/A
N/A
Protected

Academic year: 2021

Condividi "Deployment and Management of Fog Applications"

Copied!
296
0
0

Testo completo

(1)

Department of Computer Science

Doctoral Programme in Computer Science (XXXII Cycle)

Deployment and Management

of Fog Applications

PhD Thesis

Stefano Forti

SUPERVISOR:

(2)
(3)

"... when we recognise the battle against chaos, mess, and unmastered complexity as one of computing science’s major callings, we must admit that beauty is our business." [E. W. Dijkstra]

(4)
(5)

F

og computing will support new applications based on the Internet of Things (IoT) by enabling computation all through the IoT to Cloud continuum. Par-ticularly, the Fog will make it possible to support applications with stringent (hardware, end-to-end latency, bandwidth, security, uptime) requirements by de-ploying application services wherever they are best-placed to properly fulfil all such requirements. Being Fog infrastructures highly dynamic and heterogeneous, they will likely be subject to failures, server workload variations, and changing network conditions, what makes way challenging to optimally deploy and manage application services on top of them.

The first objective of this thesis is to propose and prototype suitable (declarative) models and probabilistic predictive methodologies to support the QoS-, context-, cost-and security-aware deployment of multi-service IoT applications cost-and VNF chains to Fog infrastructures. The second objective of this thesis is to design and prototype simulation environments to support the design and assessment of correct and effec-tive management policies for Fog applications, by predicting their performance with respect to application uptime, alerting, energy consumption, convergence speed, and robustness against failures and workload variations. Finally, some preliminary ef-forts towards a lightweight monitoring tool for Fog infrastructures are also discussed. The proposed prototype monitoring tool collects all data needed by the predictive methodologies we propose for both deployment and management of Fog applications.

The main contributions of this thesis reside in the fact that the proposed models and predictive methodologies are all capable of capturing the intrinsic dynamicity of Fog infrastructures (e.g., failures, workload, churn) as well as the interactions between deployed services and IoT devices. Additionally, the work presented in this thesis is among the first to consider security and trust aspects to decide on the deployment of application services to Fog infrastructures, and to focus on the modelling and simulation of an industrial application management platform, viz. CISCO FogDirector.

(6)
(7)

F

irst and foremost, I would like to thank my supervisor Antonio for the contin-uous help, support and fruitful discussions we had over the last four years. This thesis would not have been possible without his scientific and human guidance as well as without his dedicated commitment and passion towards his work. This journey would not have been the same without his (incredibly good) travel suggestions, his funny jokes, and his pet hate for capitalising article titles. Now that it is time for taking stock, Antonio made me understand why, as computer scientists, “beauty is our business”. Fantastic.

For science is collaboration, I wish to thank all the amazing people I had the chance to work with and who contributed to the research presented in this thesis. Thanks to Ahmad, my first travel companion in the academic world, for his insights on how to plan the writing of a paper. Thanks to Carlos and Isaac as their scientific creativity and enthusiasm are immense: I wish I can visit you in Palma again soon. Thanks to Gian-Luigi who helped me in including security in this work and believed in the Giò project from the very beginning (also funding it!). Thanks to Alessandro and Marco for their invaluable work on the FogDirSim and FogMon prototypes. Thanks to Federica, and fingers crossed for our first journal submission. Thanks to my internal committee – Stefano Chessa, Antonio Cisternino and Rajkumar Buyya – for their pertinent feedback throughout the last three years.

Thanks to Davide and Luca for all the great times we have spent together, for the ambitious projects we have managed to carry out and for those that are yet to see the light. Wherever life will bring us, I will never forget these years of close friendship and training for life. Thanks to Jacopo, Leonardo and Matteo who were there in many challenging moments of these years. Thanks to all the Pisa CoderDojo mentors and ninjas for their inspiring attitude to programming and life. Thanks to all the students I have met as they always taught me something back their own.

Thanks to Nico, friend of a lifetime, looking forward to celebrating many other milestones. Thanks to Arianna, Alessandro and Emanuela, you are four-leaf clovers. Thanks to Mum and Dad for their endless love and support in life, and for teaching me that honesty and hard work always pay off. Thanks to my brother Marco, brilliant and wise young man, for making me constantly proud of him. Thanks, Family. You are on every page of this manuscript.

(8)
(9)

1 Introduction 1

1.1 Context . . . 1

1.2 Thesis Objectives . . . 6

1.3 Thesis Contents . . . 9

1.4 Main Contributions . . . 13

2 Fog Application Placement: A Survey 15 2.1 Introduction . . . 15

2.2 Setting the Stage . . . 17

2.3 Algorithmic Perspective . . . 23

2.4 Modelling Perspective . . . 33

2.5 Open Problems and Research Challenges . . . 46

3 Predictive Analysis to Support Fog App Deployment 49 3.1 Introduction . . . 49

3.2 Motivating Example . . . 52

3.3 Predictive Analysis withFogTorchΠ . . . 56

3.4 Motivating Example Continued . . . 69

3.5 Comparing iFogSim andFogTorchΠ . . . 73

3.6 Genetic Algorithms Extension ofFogTorchΠ . . . 76

(10)

4 Secure Fog Deployments, with Trust 93

4.1 Introduction . . . 93

4.2 Background: TheProbLogLanguage . . . 96

4.3 Methodology and Implementation . . . 97

4.4 Motivating Example . . . 113

4.5 Algebraic Extensions ofSecFog . . . 119

4.6 Related Work: Security and Trust Models . . . 124

5 QoS-aware Placement of VNF chains at the Edge 127 5.1 Introduction . . . 127

5.2 Motivating Example . . . 130

5.3 EdgeUsherMethodology . . . 135

5.4 EdgeUsherat Work . . . 145

5.5 Related Work: Placement of VNF Chains . . . 149

6 Modelling Fog Application Management 155 6.1 Introduction . . . 155

6.2 Background: CISCO FogDirector . . . 156

6.3 Motivating Example . . . 157

6.4 Modelling the Behaviour of FogDirector . . . 159

6.5 Overview of FogDirMime . . . 167

6.6 Motivating Example Continued . . . 170

7 Simulating Fog Application Management 173 7.1 Introduction . . . 173

7.2 Motivating Scenario . . . 177

7.3 Architecture and Implementation ofFogDirSim . . . 181

7.4 Experiments . . . 195

(11)

8 Fog Infrastructure Monitoring 207

8.1 Introduction . . . 207

8.2 Design and Implementation ofFogMon . . . 208

8.3 Case Study . . . 220

8.4 Related Work: Fog Infrastructure Monitoring . . . 225

9 Conclusions 229 9.1 Summary of the Thesis . . . 229

9.2 Assessment of Contributions . . . 230

9.3 Future Work . . . 234

A FogTorchΠModel 237 A.1 Model . . . 237

A.2 Complexity Analysis . . . 243

B Termination and Correctness ofEdgeUsher 247

(12)
(13)

C

H A P

1

I

NTRODUCTION

1.1

Context

T

he Internet of Things (IoT) has been undergoing tremendous growth since

the last years, with connected cyber-physical systems actually changing the way we live and work. Such a trend is not going to arrest in the near future. Indeed, self-driving cars, autonomous domotics systems, energy production plants, agricultural lands, supermarkets, health-care, embedded AI will more and more exploit devices and Things that are an integral part of the Internet and of our existence without us being aware of them. In these regards, CISCO expects more than 50 billion of connected entities (people, machines and connected Things) by 2021, and estimates they will have generated around 850 Zettabytes of information by that time, of which only 10% will be useful to some purpose [1, 2]. As a consequence, enormous amounts of data – the so-called Big Data [3] – are collected by IoT sensors and stored in Cloud data centres [4].

(14)

becoming hard to accomplish due to the volume and geo-distribution of those devices, and to the fact that the considerable increase in the amount of data produced (and consumed) at the edge of the network was not accompanied by a comparable increase of available bandwidth from/to the Cloud [5, 6]. On the other hand, the need to reduce latency for time-sensitive applications, to eliminate mandatory connectiv-ity requirements, and to support computation or storage closer to where data is generated 24/7, is evident [7].

Current deployment models for IoT applications consist either of

(1) IoT+Edge deployments (i.e., Edge computing [8, 9]) where data is processed locally at the edge of the Internet to determine reactions to sensed events (Figure 1.1(a)), or of

(2) IoT+Cloud deployments [10, 11] where Things send data to Cloud data centres for further processing/analytics purposes, awaiting for a response, and only minor computation happens in situ (Figure 1.1(b)).

(15)

Despite supporting low-latency responses to sensed events, IoT+Edge deployments do not permit to easily share collected data across different systems, nor to perform real-time analytics on substantial amounts of data, due to the limited available resources at the edge (e.g., constrained or battery powered devices). Conversely, IoT+Cloud requires a stable Internet connection, and induces higher latencies and costs to transfer data to the Cloud. Also, IoT+Cloud deployments might incur in performance degradation due to network congestion at the edge and core of the Internet.

Overall, both the IoT+Edge and IoT+Cloud models are insufficient to support the IoT momentum, either overloading edge capabilities or requiring stable Internet connectivity, without supporting the IoT applications demand for low latencies and prompt decision-making. Thus, the need to provide processing power, storage and networking capabilities to run IoT applications all through the continuum from the IoT to the Cloud has been highlighted by various authors, such as [13] and [14].

In this context, a new utility computing paradigm took off, aiming at connecting the ground (IoT) to the sky (Cloud), and it has been named Fog computing [15]. The Fog aims at better supporting time-sensitive and bandwidth-hungry IoT applications by selectively pushing their components/services closer to where data is produced and by exploiting a geographically distributed multitude of heterogeneous devices (e.g., personal devices, gateways, micro-data centres, embedded servers) spanning the continuum from the IoT to the Cloud (Figure 1.1(c)). In its reference

architec-ture1, the OpenFog Consortium (OFC), which has been fostering2 academic and

industrial research in the field from 2015 to 2018, gave the following definition of Fog computing:

Fog computing is a system-level horizontal architecture that distributes resources and services of computing, storage, control and networking anywhere along the continuum from

1The OFC reference architecture was adopted as the IEEE 1934-2018 standard [16]. 2Since February 2019, the OFC merged with the Industrial Internet Consortium [17].

(16)

Cloud to Things, thereby accelerating the velocity of decision making. Fog-centric architecture serves a specific subset of business problems that cannot be successfully implemented using

only traditional cloud-based architectures or solely intelligent edge devices.

Based on such definition, the NIST has also recently proposed a conceptual architec-ture for Fog computing [18]. The Fog configures as a powerful enabling complement to the IoT+Edge and to the IoT+Cloud scenarios, featuring a new intermediate layer of cooperating devices that can autonomously run services and complete specific business missions, contiguously with the Cloud and with cyber-physical systems at the edge of the network.

In parallel to the increase in the complexity of network infrastructures, modern large-scale applications are not monolithic anymore [19]. Indeed, IoT applications running on top of Fog computing infrastructures are made from independently deployable, distributed services (or components, or microservices) that work to-gether and must meet some (hardware, software, IoT and QoS) requirements [20]. For instance, containerisation technologies (e.g., Docker, LXC) already enable the lightweight deployment and management of application services to distributed infrastructures.

Following this trend, network technologies are also evolving to enable the deliv-ery of customised end-to-end services [21]. Particularly, to make a more effective usage of network resources and to contain deployment costs, technologies such as Software-Defined Networking (SDN) and Network Function Virtualisation (NFV) are used more and more often in production environments [22], by decoupling control functions from actual data forwarding and allowing programming traffic flows from a (logically) centralised point.

Deploying and managing Fog applications is therefore a challenging task. Indeed, it requires to suitably and dynamically map each of the (possibly many) application components (i.e., functionalities) to the computational node(s) that will host them at runtime. Future tools for the deployment and management of IoT applications

(17)

should consider application requirements (i.e., hardware, software, IoT, QoS), in-frastructure capabilities (i.e., hardware, software, IoT devices, network conditions, security countermeasures) and deployers’ desiderata (i.e., business and security poli-cies, cost constraints) to efficiently support adaptive segmentation of functionalities from the Cloud to the IoT.

On this line, Bonomi et al. [15] first proposed a software architecture for Fog computing platforms. They considered it crucial for such architecture to implement an orchestration layer for Fog services, as sketched in Figure 1.2. The Fog orches-tration layer, based on a Monitor-Analyse-Plan-Execute (MAPE) loop, should to provide dynamic, adaptive deployment and life-cycle management of multi-service IoT applications. Orchestration Layer Monitor Analyse Plan Execute Abstraction Layer

Compute Network IoT

Multi-service IoT Applications

Storage

Figure 1.2: Fog orchestration [15].

Particularly, such MAPE loop is expected to enact the QoS- and context-aware management of Fog applications by repeating some well-defined phases:

Analyse - process data about the application, the infrastructure and its monitored

performance so to take informed decisions on how to (re-)distribute application services,

(18)

Plan - identify the actions sequence to (re-)distribute services to different Edge or Cloud nodes based on QoS data and specified policies,

Execute - orderly perform the deployment of all services or redistribute part of the

application, and

Monitor - monitor QoS performance of both the infrastructure and the running

application to check if it complies to some target metrics.

WhilePlancan be largely automated (i.e., solutions exist to determine the actions

needed to achieve a set deployment) and Executeis usually fully automated (e.g.,

[23–25]), the Analyse phase calls for novel predictive methodologies that support

(human or automated) decision-making, based on historical data coming from the

Monitorphase, which is crucial to support theAnalysephase and to which only few efforts have been devoted for the specific case of Fog infrastructures.

1.2

Thesis Objectives

This thesis aims at contributing to the design and prototyping of new models and algorithms to support the QoS- and context-aware orchestration of (multi-service) IoT applications in Fog scenarios by means of predictive methodologies. The work

described in this manuscript mainly falls within theAnalysephase of the MAPE loop

depicted in Figure 1.2. Particularly, this thesis targets two open research problems:

Fog Application Deployment – Whilst some application functionalities are

nat-urally suited to the Cloud (e.g., service back-ends) and others are natnat-urally suited to edge devices (e.g., industrial control loops), there are applications for which functionality segmentation is not as straightforward (e.g., short to medium term analytics).

(19)

Fog computing should support deployment to the IoT-Cloud continuum, taking into account both the application requirements and the current state of the infrastructure for what concerns hardware and software capabilities, link bandwidths and latencies, security capabilities, and fault events [16]. This will be especially crucial for those applications that are business-, mission- or life-critical.

Concrete questions like: “How many and how powerful Fog nodes do I need to adequately deploy my application?”, “Should I deploy this service to the Cloud, to the new Fog-as-a-Service opened in my city, or to my premises’ gateway?”, “Is there any service I should deploy to a different node after this link failure?”, “Can I consider this deployment secure?”, or “Should I better upgrade this node or access link connection?” may be hard to answer even for simple applications. Similar questions are to be answered also when deploying chains of Virtual Network Functions (VNF), which additionally requires solving the problem of routing traffic flows between deployed VNFs, while meeting requirements on latency and bandwidth.

Overall, freeing developers from having to manually segment the function-alities of their applications over the continuum from Cloud to IoT – whilst helping them sizing their infrastructures – is crucial to achieve scalability and extensibility of Fog platforms, hence for the success of this new computing paradigm.

Objective O1. This thesis aims at contributing to supporting the

QoS-, context-, cost- and security-aware deployment of IoT applica-tions and VNF chains to Fog infrastructures by providing a suitably high-level modelling of such problem(s) and algorithms to solve it, while considering dynamicity, failures and churn of substrate infras-tructures.

(20)

Fog Application Management – After first deployment, managing IoT

applica-tions in Fog computing (highly distributed) scenarios [26] requires to decide on which node each application should be kept at each moment in time, depend-ing on different infrastructure conditions and always considerdepend-ing application requirements in terms of hardware (e.g., RAM, CPU) and QoS (e.g., uptime, energy).

This process normally involves human decision-makers (i.e., application op-erators) that should design and implement suitable management scripts to (or manually) guarantee the fulfilment of all such requirements throughout the application life-cycle, viz. from application first deployment to retirement. Unfortunately, bad or poor management choices can lead to unsatisfactory service QoS, waste of electrical power or money, and – worst of all – customer (and, therefore, financial) losses due to bad service placement, overloading of Fog devices and service downtime, respectively.

For instance, application operators have to decide where to suitably migrate applications when their deployment nodes undergo failures or overloading situations due to environmental factors, or when to increase the resources allocated to an application when it has to deal with a workload higher than expected, or again how many replicas of a certain application are needed to guarantee a satisfactory uptime. Finally, they can consider purchasing new hardware to extend their infrastructure if the current setup does not suitably satisfy the application needs.

Overall, designing, tuning and enacting correct and effective application man-agement policies in highly distributed Fog computing scenarios is a challenging research problem, which calls for suitable tooling and support [27].

Objective O2. This thesis aims at contributing to supporting the

(21)

for Fog computing applications, both by providing a formal modelling of the API and functioning of an industrial application management tool, CISCO FogDirector, and by providing simulation environments, based on such modelling, capable of predicting management KPIs against varying deployment conditions.

1.3

Thesis Contents

The rest of this thesis is organised as follows. As sketched in Figure 1.3, Chapters 2–5 focus on the problem of multi-service application deployment in Fog scenarios, Chapters 6–7 focus on the management of Fog applications, and Chapter 8 describes our first steps in Fog infrastructure monitoring. Detailedly:

O1. Fog Application Deployment Chapters 2–5

O2. Fog Application Management Chapters 6–7 O1, O2. Fog Infrastructure Monitoring

Chapter 8 Introduction

Conclusions Appendices

Figure 1.3: Graphical plan of the thesis.

Chapter 2 provides an exhaustive overview – both from an algorithmic and from a

modelling viewpoint – on the state of the art related to solving the problem of deploying multi-service (or multi-component) IoT applications to Fog infras-tructures, in such a way to satisfy all functional and non-functional application requirements. The chapter also points to directions for future work, some of which are first addressed by this thesis work.

(22)

The results discussed in this chapter have been published in the article [28] in the Software: Practice and Experience journal.

Chapter 3 proposes a (probabilistic) modelling of multi-service IoT applications

and Fog infrastructures, and a set of algorithms to perform predictive analyses when selecting the best application deployment(s), in a QoS-, context- and cost-aware manner. The model captures hardware, software, IoT and network QoS application requirements, and the corresponding infrastructure capabil-ities along with their operational costs. The proposed algorithms include an exhaustive backtracking search to determine eligible deployments, its parallel Monte Carlo version to probabilistically vary the representation of available Fog infrastructure so to estimate the QoS-assurance of eligible deployments, and a more efficient version of this latter, which relies upon genetic algorithms to speed-up the search when placing multiple applications at a time. Both the

model and the algorithms have been open-sourced in theFogTorchΠprototype

tool, which is used on lifelike examples to illustrate applicability of the devised predictive methodologies. Closely related work on predictive analyses for Fog application deployment is discussed at the end of the chapter.

The results discussed in this chapter extend those published in a book chapter [29], by summarising the results published in the article [30] in the IEEE Internet of Things Journal and in four conference articles [31–34].

Chapter 4 presents a declarative methodology that permits to express security

re-quirements for IoT applications, as well as infrastructure security capabilities, in a simple and declarative manner, and to automatically obtain an explain-able assessment of the security level of the eligible application deployments. The proposed methodology also considers the impact of trust relations among different stakeholders using or managing Cloud-Edge infrastructures, and it permits embedding various semiring-based trust models. A lifelike example is

(23)

used to showcase the prototyped implementation of the methodology,SecFog, and the possibility to exploit it along with the predictive analysis described in Chapter 3. Closely related work on security and trust issues in distributed scenarios is discussed at the end of the chapter.

The results discussed in this chapter have been published in the article [35] in the Future Generation Computer Systems journal.

Chapter 5 illustrates a probabilistic declarative methodology to the problem of

how to best place VNF chains onto Fog infrastructures – open-sourced in the

EdgeUsherprototype tool. TheEdgeUsherprototype can determine all eligible placements and traffic routings for a set of VNF chains onto a Fog infras-tructure so to satisfy all the hardware, IoT, security, bandwidth, and latency requirements associated with the input VNF chains. It exploits probability dis-tributions to model the dynamic behaviour of Fog infrastructures with respect to hardware resources and network QoS, and it correspondingly ranks the set of valid placements according to such probabilities. Some closely related work on VNF placement solutions is discussed at the end of the chapter.

The results discussed in this chapter have been described in the article [36] currently under consideration for journal publication.

Chapter 6 illustrates a simple operational semantics of the main features of CISCO FogDirector, one of the first available tools supporting the management of the entire life cycle of IoT applications deployed to Fog infrastructures. Such semantics provides a compact reference for the tool and it has been proto-typed into the core of a simulation environment of FogDirector application

management, FogDirMime, which is showcased over a motivating example.

(The discussion of related work on modelling and simulating Fog application management is postponed to the next chapter.)

(24)

The results discussed in this chapter have been published in the article [37] in the Software Intensive Cyber-Physical Systems journal.

Chapter 7 pursuing the formal effort described in Chapter 6, presents a

proto-type simulation environment,FogDirSim, fully compliant to FogDirector API.

FogDirSimpermits comparing different application management policies ac-cording to a set of well-defined performance indicators (viz., uptime, energy consumption, resource usage, type of alerts) and by considering probabilistic variations and failures of application workload and of the underlying infras-tructure. A lifelike example is used in this chapter to validate the prototype and to show its usefulness in selecting the best management policy. Some closely related work on Fog computing application management simulators is discussed at the end of the chapter.

The results discussed in this chapter have been published in the article [38] in the Simulation Modelling Practice and Theory journal.

Chapter 8 presentsFogMon, a lightweight distributed prototype monitoring tool, which measures data about hardware resources (viz., CPU, RAM, HDD) at the available Fog nodes, end-to-end network QoS (viz., latency and bandwidth)

between those nodes, and detects connected IoT devices.FogMonis organised

into a peer-to-peer architecture and it shows a very limited footprint on both hardware and bandwidth. Such kind of tool (and the related methodologies) represents a key enabler for the work presented in this thesis. The usage of

FogMonon a real testbed in the area of Pisa, Italy, is presented. Some closely related work on Fog infrastructure monitoring is discussed at the end of the chapter.

The results discussed in this chapter have been described in the conference article [39] (an extended version of which is currently under consideration

(25)

for journal publication).

Chapter 9 concludes the thesis by summarising and assessing the results achieved in the context of supporting the QoS-, context-, cost- and security-aware multi-service Fog application deployment and management, and by pointing to some possible directions for future work.

1.4

Main Contributions

Overall, the main contributions of this thesis can be summarised as follows:

• a thorough, original survey of existing approaches to multi-service application deployment to Fog infrastructures,

• a set of probabilistic predictive methodologies to support the QoS-, context- and cost-aware deployment of multi-service IoT applications and VNF chains to

Fog infrastructures, open-sourced in the prototypesFogTorchΠandEdgeUsher,

• a declarative methodology to automatically assess, in an explainable manner, the security level of application deployments while considering different types of trust relations among different stakeholders, open-sourced in the prototype

SecFog,

• a simple formal model and a discrete-event simulator of CISCO FogDirector, which permit to experiment and compare different Fog application

manage-ment policies, open-sourced in the prototypesFogDirMimeandFogDirSim, and

• a lightweight monitoring technique for Fog infrastructures, open-sourced in

(26)
(27)

C

H

A

P

2

F

OG

A

PPLICATION

P

LACEMENT

: A S

URVEY

2.1

Introduction

F

og computing should ensure that computation over IoT data happens

wher-ever it is best-placed, based on various application (e.g., hardware, software, QoS) or stakeholder (e.g., cost, business-related) requirements. Since mod-ern software systems (e.g., service-oriented and microservice-based architectures) are more and more often made from distributed, (numerous) interacting compo-nents, it is challenging to determine where to deploy each of them so to fulfil all set requirements.

Fog computing architectures substantially differ from Cloud architectures. Par-ticularly, according to recent literature [40–45]:

– Fog nodes feature limited and very heterogeneous resources, whilst data centre nodes feature high (and virtually unbounded) computational, storage and power capabilities,

(28)

span wide large-scale networks reaching closer to (human and machine) end-users, whilst Cloud data centres are located in few geographic locations all over the world and connect directly to fibre backbones,

– end-to-end latency between Cloud nodes within data centres is usually negligi-ble and bandwidth availability is guaranteed via redundant links, whilst in Fog domains network QoS between nodes can largely vary due to the presence of a plethora of different (wired or wireless) communication and Internet access technologies,

– Fog nodes are owned and managed by various service providers (from end-users to Internet Service Providers to Cloud operators) and might also oppor-tunistically include available devices (e.g., crowd-computing, ad-hoc networks) whereas largest Cloud data centres are in the hands of a few big players. Due to all these differences, Fog computing calls for new and specific methodologies to optimise the distribution of application functionalities and the usage of the avail-able infrastructure, by suitably dealing with (possibly) limited hardware resources and large-scale deployments, unstable connectivity and platform/operators hetero-geneity, and (node or link) failures [46]. Lately, following this line, a significant amount of research has considered the problem of optimally placing application components or services based on different – and sometimes orthogonal – constraints. However, to the best of our knowledge, no comprehensive and systematic survey of these efforts exists in the literature.

This chapter aims precisely at offering an exhaustive overview of the solutions proposed to solve the multi-service application placement problem in the Fog, by providing the reader with two complementary perspectives on this topic:

P1. an algorithmic perspective that reviews state-of-the-art contributions based on the methodologies that they employed to address Fog application placement, along with a study on the available prototypes and experiments, and

(29)

P2. a modelling perspective that analyses which (functional and non-functional) constraints and which optimisation metrics have been considered in the litera-ture to determine best candidate application placements.

The rest of this chapter is organised as follows. After describing the methodology followed to realise this survey (Section 2.2), a comprehensive analysis of state-of-the-art related to Fog application placement under P1 (Section 2.3) and P2 (Section 2.4) is presented. Finally, based on both P1 and P2, some open problems and future research challenges are pointed out (Section 2.5).

2.2

Setting the Stage

This survey includes research articles that deal with Fog application placement with the objective of optimising non-functional requirements of the system. To set the stage, we start by defining the considered application placement problem:

Let A be a multi-component (or multi-service) application with a set of requirements R and let I be a distributed Fog infrastructure. Solutions to the Fog Application Placement Problem (FAPP) are mappings from each component of A to some computational node in I, meeting all requirements set by R and optimising a set of objective metrics O used to evaluate their quality. Solution mappings can be many-to-many, i.e. a component can be placed onto one or more nodes and a node can host more than one component.

It is worth noting that FAPP can be solved or adjusted also at runtime (i.e., when A is running), in case that some requirements in R cannot be met by the current solution mapping or whenever O can be further optimised as Fog infrastructure conditions change over time.

(30)

The concept of FAPP and the underlying technology are very recent, and the boundary with other technologies is not always clear. In this survey, we include all the articles that deal with the placement of applications that are generally available for the users and that can benefit from the adoption of the Fog computing paradigm. Focussing on existing approaches to solve FAPP, we will exclude those works that only deal with dispatching or scheduling of (user or IoT) requests, as they represent a phase that is subsequent to the placement of the application services. Similarly, we will exclude research in the field of task offloading (i.e., outsourcing of the computation of a given function to get a result back) from one node to a better (e.g., more powerful or reliable, closer) one, which is covered in detail by other recent surveys [47, 48].

A problem similar to FAPP has been studied in the context of Software Defined Networking (SDN), and literature on the placement of Virtual Network Functions (VNFs) onto SDN substrates has been already thoroughly analysed in exhaustive recent surveys (e.g. [49–52]). Such a problem is known as VNF embedding and includes the joint placement of virtual function services and the routing of traffic flows between them. FAPP significantly differs from VNF embedding as the latter assumes to have the possibility of programming network flows from a (logically) centralised point of control in the infrastructure. As Fog application deployments will likely span various service providers, these might not always support SDN across their infrastructures, hence the previous assumption might be too stringent when considering Fog scenarios in general. Thus, also to avoid overlapping with existing surveys on SDN and VNF placements, in what follows we will exclude results in those areas. Finally, research in the field of mobile offloading, shifting the processing and execution from mobile terminals to the network or edges nodes, will be also excluded.

To the best of our knowledge, this is the first survey that covers the state of

(31)

computing ∧ (service ∨ application) ∧ (placement ∨ deployment)). The search was carried out, with the help of Google Scholar, in the following libraries: IEEE Xplore Digital Library, Wiley Online Library, ACM Digital Library and Web of Science. To fully capture the advances in the field, both journal and conference articles were collected during the search phase. Additionally, the references in selected articles were also analysed to find more related work in the FAPP domain. At the end of this first step, the 110 articles we collected were carefully screened. After a more accurate and deeper selection process, where references in the field of offloading, dispatching, scheduling and VNF embedding were removed, we selected 38 articles to be analysed further.

Table 2.1 offers a complete bird’s-eye view of the set of the analysed papers high-lighting their main strengths and weaknesses, the algorithm they employ, and the availability of an open-source prototype implementation. Focussing the definition of FAPP from an optimisation point of view, the common elements in any optimisation process are the following:

Decision variables – They are the items whose values need to be determined

during the optimisation process. In the case of the FAPP, they can be the binary decision variables (or, equivalently, the mapping functions) that indicate if a component of A is allocated (or not) to a Cloud or Fog node of I. All the articles that we have included in our study rely on similar decision variables.

Objective function – The objective function measures the suitability of a solution

(a specific value assigned to the decision variables) for the optimisation process. The optimisation can be addressed to maximise or minimise the value of the objective function. In a more general way, the objective function represents the concerns of the optimisation and defines the metrics that are optimised by fixing the values of the decision variables. In our case, the objective functions measure the metrics O of candidate solutions to FAPP.

(32)

Constraints over the decision variables – They define the requirements R

that must be satisfied by each specific case of the decision variables. Solutions (values of the decision variables) that do not satisfy the constraints are rejected as possible solutions to FAPP.

Domain variables or parameters – They commonly are the fixed values which

are known previously to the optimisation process. We also include here other variables, metrics or items related to the optimisation but that are not con-straints neither optimisation objectives.

Algorithms – They are the algorithms proposed to find the values of the

deci-sion variables that achieve the best objective value while the constraints are satisfied. The problem of finding solution mappings between application com-ponents in A and Fog/Cloud nodes in I, whilst minimising/maximising the values of the objectives functions O and satisfying the constraints in R, is NP-hard. Moreover, when several opposite optimisation objectives are consid-ered, it is necessary to determine a trade-off between the objectives because some of them may increase when the others decrease. Indeed, FAPP needs to be solved by evaluating – at worst – all the possible solutions, i.e., assuming the application is made of m services and the infrastructure is composed of

n nodes, nm different candidate solutions. Such complexity can be tamed by

using heuristics which permit to find sub-optimal solutions. It is important to consider that Fog computing is a large-scale and dynamic domain, where real implementations have to deal with huge quantities of Fog nodes and applications.

Overall, we have organised the description and presentation of the articles from the point of view of the elements of the optimisation process: algorithms (Section 2.3), constraints and parameters (Section 2.4.1), and objective functions (Section 2.4.2).

(33)

Table 2.1: Overview of the analysed articles.

Ref. Alg. Strengths Weaknesses Open

Prototype [53][54] S Heuristic search. Modelling of IoT, Fog and Cloud. Extension to

a well-known Cloud simulator. Medium-scale experiments (up to 80 Fog nodes).

Static tree-based infrastructures and DAG applications only. No complexity analysis.

X

[55] S First-fit service placement and distributed a posteriori optimi-sation of delays and idle resource usage.

Static tree-based infrastructures and DAG applications only. Lack of details on possible real-world implementation. Small-scale example (up to 30 Fog nodes).

[56] S Distributed placement strategy based on local data of each node. Validated on a real application topology. Improved network usage with respect to users demand.

Static tree-based infrastructures and DAG applications only. In-creased number of service migrations. Small-scale experiments (up to 25 Fog nodes).

[57] S Heuristic search for best placement and migration plan. Uncer-tainty in user mobility and data rates is considered. Large-scale example (up to 1000 Fog nodes).

Use of simple prediction mechanisms. Cubic-time complexity.

[58] S Heuristic search. Arbitrary application and infrastructure topologies. High scalability and large-scale experiments (up to 20000 nodes). Comparison with exhaustive and first-fit.

Static infrastructure conditions. No codebase released.

[59] S Exhaustive search. Medium-scale experiments (50 nodes). Hints for a distributed extension to the approach.

Linear application chains and static tree-based infrastructure only. Quadratic-time complexity.

[60] S Heuristic search. Online implementation with Kubernetes. Linearithmic-time complexity. Real laboratory testbed.

Only considers generic device capacity. Does not consider infras-tructure topology nor network QoS. Small-scale experiments (5 Fog nodes).

[61] S Heuristic search. Linearithmic time complexity. Preliminary hints for a benchmark.

Static tree-based infrastructures and DAG applications only. Small-scale example (up to 13 Fog nodes).

[62] MP Detailed framework and architectural proposal for solving FAPP with ILP.

No implementation nor evaluation is available. [63] MP MINLP and linearisation into MILP. Joint solution of FAPP and

task distribution to minimise operational costs. Medium-scale experiments (up to 100 Fog nodes).

Data trace of the experiments are not provided. Static infras-tructure conditions.

[64] MP ILP and problem relaxation. Workload variations according to users mobility. Data migration costs. Small-scale example (20 nodes), comparison with GA and classical ILP.

Cubic-time complexity. Static tree-based infrastructures and DAG applications only.

[65] MP MINLP and linearisation into MILP. Joint solution of FAPP and task distribution to minimise response times. Medium-scale example (up to 80 nodes).

No complexity analysis provided. Complex formulation.

[66] MP MINLP and linearisation into MILP. Comparison with greedy strategy.

No complexity analysis provided. Static infrastructure condi-tions. Small-scale example (' 10 nodes). Not very detailed ex-perimental settings.

[67] MP ILP. Optimising latency for resource allocation. Only models two application types and generic device capacity. Small-case example (6 Fog nodes).

[68] MP Mixed-cast Flow Problem. Joint solution of FAPP and requests routing to minimise operational costs. Mock data traces used for experiments.

Not very detailed experimental settings.

[69] MP ILP. QoE-placement, aware of (fuzzy) user expectations. Com-parison with other 3 heuristic algorithms.

Static tree-based infrastructures and DAG applications only. No complexity analysis provided.

[70, 71] MP ILP. Distributed management of Fog colonies (infrastructure portions). Modelling of IoT, Fog and Cloud nodes.

Static tree-based infrastructures. Simplistic linear cost model. Small-scale example.

[72] GA GA. Distributed management of Fog colonies (infrastructure portions). Modelling of IoT, Fog and Cloud nodes. Poly-time complexity. Comparison with first-fit and ILP strategies.

Static tree-based infrastructures. Fitness function based on constraints satisfaction instead of optimisation metrics. Small-scale example (10 Fog nodes).

[73] MP ILP. Heuristic to solve an equivalent problem. Considering communication energy consumption. Complexity proof. Large-scale experiments (1000 Fog nodes).

Experiments focus only on energy results.

[74] MP LP. Decomposition of the primal problem into sub-problems to optimise the power consumption-delay tradeoff.

Static infrastructure conditions. Small-scale example (8 nodes).

[75] MP ILP. Management of Fog colonies (infrastructure portions). Ex-tensive comparison of Cloud-only, Fog-only and Fog-to-Cloud placements. Real smart-city scenario.

Static tree-based infrastructures. Small-scale experiments (1 Cloud, 1 Fog node).

[76][77][78] MP ILP. Heuristic QoS-aware extension of Apache Storm dis-tributed framework. Real small testbed (8 nodes). Medium-scale simulation (up to 100 Fog nodes). Complexity proof.

Worst-case exp-time. Placement policy might deteriorate appli-cation availability when many operators are involved.

X

[79] BI GA. Perspective and future directions in FAPP with a focus on GA and their parallel implementation.

Preliminary work. Simple case study. [80] BI GA. Distributed strategy for handling application replicas and

guaranteeing reliability against probabilistic infrastructure failures. Comparison with ILP.

Limited scalability. Small-scale example (5 Fog nodes).

[81] GT Stackelberg games. FAPP modelled as sub-problems of pairing subscribers to needed resources, and of deciding resource prices.

No dynamic conditions considered. Small-scale example (20 Fog nodes).

[82] GT Stackelberg games. Pricing analysis using Stackelberg game in a three-tiered network model (student-project allocation algo-rithm).

No dynamic conditions considered. Some details missing on experimental settings.

[83] DL Q-learning. Service migration and user mobility are considered. Medium-scale experiments (70 nodes) with real-world driver traces.

Complex formulation. Cubic-time complexity. Parameter tuning not very clear.

[84] DP 0-1 Knapsack. Load and energy adaptive strategy according to the resource availability.

No algorithmic details. Small-scale example (9 nodes). [85] DP Knapsack problem. Exploratory work in symbiotic search.

Com-parison with FCFS policy and traditional solvers.

Very small-scale example.

[86] CN Network science. Mobility of users is considered. Extension to a well-known Cloud simulator.

Static tree-based infrastructures. Medium-scale example (80 Fog nodes).

(34)

Table 2.1, Table 2.2, and Table 2.3 give an overview of the characteristics of the analysed articles according to such three elements, respectively:

Algorithms view point – The analysis of the algorithms proposed in the articles has shown that various algorithmic approaches have been proposed to optimise FAPP (Figure 2.1). We have grouped and analysed the articles in Section 2.3 by those optimisation algorithms resulting in two main groups, with the highest number of articles proposing search-based and mathematical programming solutions to FAPP. Other types of algorithms – i.e., bio-inspired, game theoreti-cal, deep learning, dynamic programming, and complex networks algorithms – have been only studied in a more limited number of articles.

Constraints view point – In the case of the constraints, we analysed the articles and classified the constraints into a two-level taxonomy (Figure 2.2). In a first level, we considered constraints related to the main elements of Fog architectures, i.e. network constraints, available Fog nodes, energy constraints, and application requirements. By further analysing the articles, we detected that network constraints related to the available Fog network topology (e.g. availability of IoT devices, existing communication links), to the experienced end-to-end latency (or communication time) among nodes, to bandwidth availability, and to link reliability. We also sub-divided node-related constraints relating them to the availability of hardware resources (e.g., RAM, CPU, storage) and of particular software frameworks (e.g., libraries, OSs). Similarly, application constraints are related with the type and number of requests that are generated in the systems (workload), to the organisation and interrelation between application components or services (dependencies), and to the possibility for the users to set conditions in the application placement or to choose between a set of alternative placements (user preferences). Lastly, energy constraints are only related to the power consumption and a second classification was not

(35)

considered for them.

Objective functions view point – From the analysis of the optimisation objectives, we observed that the articles could be again described by a two-level taxonomy (Figure 2.3). Particularly, optimising network usage was a common objective, attempting to reduce communication delay (often including processing times) and network bandwidth consumption. Similarly, many approaches attempted an optimisation on the amount of hardware resources allocated to application deployment and to energy objectives, related to the power consumption that the execution of applications generates in the Fog layer. With respect to sys-tem performance, the optimisation focus was on overall QoS-assurance (e.g., measured as the number of requests executed before a specific deadline or as the likelihood to satisfy certain constraints on QoS requirements), on the execution time of the application requests, or on the overhead due to migra-tions of application components or services from different Fog or Cloud nodes. Finally, operational cost (due to hardware, software and bandwidth purchase) for keeping an application deployment up and running was often considered among the optimisation objectives.

2.3

Algorithmic Perspective

In this section, all reviewed approaches are analysed according to the algorithms or methodologies that they use for solving FAPP. As aforementioned, we identified three main classes of algorithms which have been exploited in the literature (Figure 2.1). Namely:

• search-based algorithms, such as (heuristic) backtracking search, or first- and best-fit application placement,

(36)

Figure 2.1: Taxonomy of FAPP algorithms.

• mathematical programming algorithms, such as integer or mixed integer linear programming,

• other algorithms like game theoretical or deep learning.

The rest of this section is organised according to this classification with the goal of providing the reader with a complete overview of the state of the art related to frameworks used for solving FAPP (Sections 2.3.1 to 2.3.3). For each reviewed approach, we indicate the availability of open source research prototypes and the size of the experiment used for assessing or testing it. Strengths and weaknesses of each work are also summarised in Table 2.1.

2.3.1

Search-based Algorithms

Being FAPP an NP-hard problem, the first solutions which have been exploited to solve it are search algorithms along with greedy or heuristic behaviour [87].

Among the first proposals investigating this direction, Gupta et al. [53] and Mahmud et al. [54] proposed a Fog-to-Cloud search algorithm as a first way to deter-mine an eligible (composite) application placement of a given (Directed-Acyclic) IoT application to a (tree-structured) Fog infrastructure. The search algorithm proceeds Edge-ward, i.e. it attempts the placement of components Fog-to-Cloud by considering hardware capacity only, and allows merging homologous components from different application deployments. An open-source tool – iFogSim – implementing such strat-egy has been released and used to compare it with Cloud-only application placement

(37)

over two quite large use cases from VR gaming (3 application components scaled up to 66, 1 Cloud, up to 80 Fog nodes) and video-surveillance (4 application components, scaled up to 19, 1 Cloud, up to 17 Fog nodes). Building on top of iFogSim, Mahmud et al. [55] refined the Edge-ward algorithm with an a posteriori management policy to guarantee the specified application service delivery deadlines and to optimise Fog resource exploitation. They illustrated their proposal at work on two small-scale motivating examples (up to 30 Fog nodes).

Recently, exploiting iFogSim, Guerrero et al. [56] proposed a distributed search strategy to find the best service placement in the Fog, which minimises the distance between the clients and the most requested services. Each Fog node takes local decision to optimise the application placement, based on request rates and freely available resources. The SocksShop [88] application (9 components) is used to eval-uate the proposed decentralised solution against the Edge-ward policy of iFogSim –varying the replication factor in the range 1 − 5 and the number of Fog nodes in the range 1 − 25. The results showed a substantial improvement in network usage and service latency for the most frequently requested services. Also, Ottenwalder et al. [57] proposed a distributed solution – MigCEP – both to FAPP and to runtime migration. Such proposal reduces the network usage in Fog environments and en-sures end-to-end latency constraints by searching for the best migration, based on probabilistic mobility of application users. The OMNeT++ [89] simulator was used to show how MigCEP improves live migration against a static and a greedy strategy over a dynamic large-scale infrastructure (i.e., 1000 emulated connected cars). No codebase was released for either the works of Guerrero et al. [56] or Ottenwalder et al. [57].

Significantly inspired by the work that we will describe in Chapter 3, Xia et al. [58] proposed a backtracking solution to FAPP to minimise the average response time of deployed IoT applications. Two new heuristics were devised. The first one sorts the nodes considered for deploying each component in ascending order with

(38)

respect to the (average) latency between each node and the IoT devices required by the component. The second one considers a component that caused backtracking as the first one to be mapped in the next search step. A motivating IoT application [90] (i.e., 6 application components replicated up to ' 800 times) was used to assess the algorithms on very large random infrastructures (i.e., 1 Cloud, up to ' 20000 Fog nodes). The exhaustive search handled at most 150 nodes, whilst the first-fit and the heuristic strategy scaled up to 20000 nodes, the latter showing a 40% improvement on the response time with respect to first-fit. Prototype implementations were not released.

Limiting their work to linear application graphs and tree-like infrastructure topologies, Wang et al. [59] described an algorithm for optimal online placement of application components, with respect to load balancing. The algorithm searches for cycle-free solutions to FAPP, and shows quadratic complexity in the number of considered computational nodes. An approximate extension handling tree-like application is also proposed, which considers placing each (linear) branch of the application separately and shows increased time complexity. The approach is sim-ulated on 100 applications to be placed featuring 3 to 10 components each and infrastructures with 2 to 50 nodes. Finally, the achieved performance is compared against the Vineyard algorithm [91] and a greedy search minimising resource usage.

Hong et al. [60] proposed a (linearithmic) heuristic algorithm that attempts deployments by prioritising the placement of smaller applications to devices with less free resources. A face detection application made from 3 components is used to evaluate the algorithm on a small real testbed (1 server acting as Cloud, 5 Fog nodes). Taneja and Davy [61] proposed a similar search algorithm that assigns application components to the node with the lowest capacity that can satisfy application re-quirements, also featuring linearithmic time complexity in the number of considered nodes. Binary search on the candidate nodes is exploited as a heuristic to find the best placement for each component, by attempting deployment to Fog nodes first

(39)

(i.e., Fog-to-Cloud). The medium-scale experiments (i.e., 6 application components, 1 Cloud, up to 13 Fog nodes) were carried in iFogSim, but the code to run them has not been made publicly available.

2.3.2

Mathematical Programming

Mathematical programming [92] is often exploited to solve optimisation problems by systematically exploring the domain of an objective function with the goal of maximising (or minimising) its value, i.e., identifying a best candidate solution. Many of the reviewed approaches tackled FAPP with such a mathematical framework, by relying on Integer Linear Programming (ILP), Mixed-Integer Linear Programming (MILP) or Mixed-Integer Non-Linear Programming (MINLP).

Velasquez et al. [62] proposed a framework and an architecture for application placement in Fog computing. An ILP implementation is suggested but it is not re-alised nor evaluated by the authors. On the other hand, Arkian et al. [63], in addition to proposing a Fog architectural framework, formulated FAPP as a MINLP problem, where application components (i.e., VMs) are to be deployed to Fog nodes so to satisfy end-to-end delay constraints. The problem is then solved (along with the problem of task dispatching) by linearisation into a MILP and the solution is evaluated on data traces from IoT service demands (from 10-100 thousand devices) in the province of Teheran, Iran. The results of the experiment showed that the Fog promises to improve latency, energy consumption and costs for routing and storage. Similarly, Yang et al. [64] tackled both FAPP and its cost-aware extension with the problem of balancing request dispatching. The proposed methodology attempts optimising the trade-off between access latency, resource usage, and (data) migrations (costs). It accounts for constraints on the available resources as well as for workload variations depending on users’ service accessing patterns. A novel greedy heuristic (solving a relaxed LP problem and approximating a solution for the full-fledged ones) is shown

(40)

to outperform other benchmark algorithms (i.e., classic ILP and GA) both in terms of obtained results and algorithm execution time over an example with 20 Fog nodes and 30 services to be placed.

Alike to these proposals, Zeng et al. [65, 66] solved FAPP along with task schedul-ing, converting a MINLP into a MILP, solved with the commercial tool Gurobi [93]. A simulation and comparison is provided against server-greedy (i.e., Cloud-ward) and client-greedy (i.e., Edge-ward) placement strategies, showing good improvements on response time when using the proposed approach in a small (i.e., 15 to 25 application images, 11 Fog/Cloud servers [66]) and medium (i.e., 45 to 80 Fog nodes [65]) sized use case. Still relying on Gurobi (together with PuLP [94]), Souza et al. [67] solved FAPP as an ILP problem, aimed at optimising latency/delay needed for resource al-location. Resources are modelled uniformly as available slots at different nodes. Out of the services to be deployed, few of them were considered to require large amounts of resources (i.e., elephants, 10%) and many more required instead few resources (i.e., mice, 90%). In the small-scale experimental settings (90 applications, 1 Cloud, 6 Fog nodes) both sequential and parallel resource allocation were considered and the benefit of Fog computing was shown in terms of reduced delays in service access.

Alternatively, Barcelo et al. [68] combined FAPP with the routing of requests across an IoT-Cloud (i.e., Fog) infrastructure. They modelled FAPP as a minimum (energy) cost mixed-cast flow problem, considering unicast downstream and mul-ticast upstream, typical of IoT. A solution to FAPP is then provided by means of known poly-time algorithms, which are simulated via the LP solver Xpress-MP [95] on mock data traces from three use cases (i.e., smart city, smart building, smart mobility). The experiments simulated tens of devices and showed some performance improvements (as per latency, energy, reliability) with respect to traditional IoT deployments that do not rely on Fog nodes. Mahmud et al. [69] proposed instead a QoE extension of iFogSim – based on an ILP modelling of users expectation – which exploited fuzzy logic and achieved improvements in network conditions and service

(41)

quality.

Skarlat et al. designed a hierarchical modelling of Fog infrastructures, consisting of a centralised management system to control Fog nodes organised per colonies [70–72]. Particularly, Skarlat et al. [70] adopted an ILP formulation of the problem of allocating computation to Fog nodes in order to optimise (user-defined) time deadlines on application execution, considering IoT devices needed to properly run the application. A simple linear model for Cloud costs is also taken into account. The proposed approach is compared via simulation to first-fit and Cloud-only deployment strategies, showing good margins for improvement, on a small-scale use case (i.e., up to 80 services, 1 Cloud, 11 Fog nodes).

Some of the methodologies proposed in the literature combine ILP with other optimisation techniques. Huang et al. [73], for instance, modelled the problem of mapping IoT services to Edge/Fog devices as a quadratic programming problem, afterwards simplified into an ILP and into a Maximum Weighted Independent Set (MWIS) problem. The services are described as a co-location graph, and heuristics are used to find a solution that minimises energy consumption. A (promising) evaluation is performed over large-scale simulation settings (i.e., 50 services, 100 to 1000 Fog nodes).

Similarly, Deng et al. [74] followed a hybrid approach to model FAPP and to deter-mine the best trade-off between power consumption and network delays (exploiting M/M/n Markov models to describe network capabilities). After decomposing FAPP into three sub-problems (power-delay vs Fog communication, power-delay vs Cloud communication, and minimising WAN delay) balanced workload solutions are looked for exploiting different optimisation methods (i.e., convex optimisation, generalised Benders’ decomposition and Hungarian method). A quite large simulation setup in MATLAB [96] was used to evaluate the proposed approach (i.e, from 30000 to 60000 nodes).

(42)

re-leased the code to run the experiments. Conversely, based on the hierarchical model of Skarlat et al. [72], Venticinque and Amato [75] proposed a software platform to support optimal application placement in the Fog, within the framework of the CoSSMic European Project [97]. Envisioning resource, bandwidth and response time constraints, their approach permits to choose among a Cloud-only, a Fog-only or a Cloud-to-Fog deployment policy, which were evaluated in a small testbed (i.e., 1 Cloud, 1 Fog node) where a composite application (8 components) from Smart Energy scenarios [98] was deployed and run over emulated IoT data traces.

Finally, Cardellini et al. [76–78] discussed and released Distributed Storm (for-merly S-ODP), an open-source extension of Apache Storm that solves FAPP by means of the CPLEX [99] optimiser with the goal of minimising end-to-end application latency and availability of stream-based applications. Extensive experiments (i.e., up to 50 application components and up to 100 Fog nodes) showed the scalability of their ILP approach (with respect to a traffic-aware extension of Storm [100]), which can be easily extended to include bandwidth constraints and a network-related objective function considering network usage, traffic and elastic energy computation.

2.3.3

Other Algorithms

Bio-inspired Algorithms Genetic algorithms (GAs) implement meta-heuristics to solve optimisation and search problems based on bio-inspired operators such as mutation, crossover and selection [101]. Naturally, some of the reviewed works exploited such bio-inspired search algorithms to explore the solution space of FAPP, and to solve it. Wen et al. [79] surveyed Fog orchestration-related issues and offered a first description of the applicability of GAs and parallel GAs to FAPP.

Retaking the ILP model of Skarlat et al. [70] based on Fog colonies and hier-archical control nodes, Skarlat et al. [72] also proposed a GA solution

(43)

imple-mented in iFogSim and compared to a greedy (first-fit) heuristic and to an exact optimisation obtained with CPLEX, over a small example (i.e., 5 application components, 10 Fog nodes). Whilst the first-fit strategy does not manage to guarantee user-defined application deadlines, both the exact solution and the GA do. On average, the GA solutions are 40% more costly than the optimal ones, despite guaranteeing lower deployment delays.

Mennes et al. [80] required the user to provide a minimum reliability measure and a maximum number of replicas for each (multi-component) application to be deployed. They employed a distributed GA, by using Biased Random-Key arrays to represent solutions (instead of binary arrays). The placement ratio (placed/required) is used to evaluate the proposed algorithm, which showed near-optimal results against a small example (i.e., 10 applications, 5 Fog nodes) and faster execution time with respect to ILP solvers. Regrettably, open-source implementations are not provided for any of the works exploiting GA.

Game Theory Game theoretical models [102] – which describe well multi-agent

systems where each agent aims at maximising its profit whilst minimising its loss – were fruitfully applied to solve FAPP in [81] and [82].

Zhang et al. [81] modelled FAPP as Stackelberg games between data service subscribers and data service providers, the latter owning Fog nodes. A first game is used to determine the number of computing resource blocks that users should purchase (based on latency requirements, block prices and util-ity). A second game is used to help providers set their prices so to maximise revenues. A matching game is used to map providers to Fog nodes based on their preferences. And, finally, matching between Fog nodes and subscribers is refined in order to be stable. The proposal was tested in a simulated MATLAB environment considering 120 service subscribers, 4 data providers, and 20 Fog nodes.

(44)

Similarly, Zhang et al. [82] described a game among service providers, Fog nodes and service subscribers. The mapping between the Fog resources and service subscribers is determined to solve a student-to-project allocation prob-lem. During the game, subscribers consider revenues, data transmission costs, providers’ costs and latency to evaluate possible assignments. On the other hand, providers consider revenue from subscribers minus the cost of service delay.

Deep Learning Reinforcement learning trains software agents (with reward

mech-anisms) so that they learn policies determining how to react properly under different conditions [103]. To the best of our knowledge, only Tang et al. [83] exploited recent reinforcement learning techniques to solve FAPP. After defin-ing a multi-dimensional Markov Decision Process to minimise communication delay, power consumption and migration costs, a (deep) Q-learning algorithm is proposed to support migration of application components hosted in containers or VMs. The proposal took into account user mobility and was evaluated over a medium-sized infrastructure (i.e., ' 70 nodes) using real data about users mobility taken from San Francisco taxi traces.

Dynamic Programming Differently from the others, Souza et al. [84] modelled

FAPP as a 0-1 multidimensional knapsack problem [104] with the objective of minimising a given objective function. Limited simulation results on a medium-sized example (40 application components, 6 Fog nodes, 3 Clouds) are provided by the authors. However, no details are given on how the solution is computed, and the code to run the experiments is not available.

Also Rahbari et al. [85] modelled FAPP as a knapsack problem, by considering the allocation of application modules to running VMs in a Fog infrastructure. iFogSim was used to simulate the proposed symbiotic organisms search algo-rithm, showing some improvements in energy consumption and network usage

(45)

Figure 2.2: Taxonomy of FAPP constraints.

with respect to a First Come First Served allocation policy and traditional knapsack solvers.

Complex networks To the best of our knowledge, only Filiposka et al. [86] relied on network science theory to model and study FAPP, employing on a commu-nity detection method to partition the available Fog nodes into a hierarchical dendogram [105]. The dendrogram was then used to analyse different commu-nity partitions so to find the most suitable set of nodes to support the VMs that encapsulate the applications. The proposal was validated with CloudSim [106] over a medium-scale use case (i.e., 80 Fog nodes, and from 150 to 250 ap-plication components). The proposed community-based extension to CloudSim is, however, not available.

2.4

Modelling Perspective

In this section, all reviewed approaches are analysed according to a modelling perspective that accounts for both the considered problem constraints (Section 2.4.1) and optimisation metrics (Section 2.4.2).

2.4.1

Considered Constraints

During the analysis of the modelling of FAPP, we first studied the features of the problem that were taken as constraints to solve it in the surveyed literature. As

(46)

Table 2.2: Overview of the analysed articles by considered constraints.

Considered Constraints

Network Nodes Energy Application Ref. Latency Bandwidth Link Reliability T opology Hardw are Softw are Energy Workload Dependencies User preferences [53] [54] X X X X [55] X X X [56] X X X X X [57] X X X X X [58] X X [59] X X X X [60] X [62] [63] X X X X [64] X X X X [65] X [66] X X [67] X X [68] X X X X X X [69] X X [70] X X X [72] X X X [71] X [73] X [74] X [75] X X X [76][77] X [79] [80] X X X [81] X [82] X [83] X X X X [84] X X X [85] X X

a result, we obtained the taxonomy of Figure 2.2 which permits to classify the articles as shown in Table 2.2. As aforementioned, the two-level taxonomy of FAPP constraints considers four main types of characteristics, i.e. network features, Fog and Cloud nodes resources, energy consumption and application requirements.

We defined four features for the second level of the network constraints. La-tency is the network feature related with the transmission time of the requests and responses through the network links. This has an important influence on Fog environments since one of the objectives of these domains is to reduce the response

Riferimenti

Documenti correlati

chele Amari, e quanta gratitudine si debba alla illustre Società Siciliana per la Storia Patria di Palermo, la quale in questi ultimi tempi ha dato alle stampe

Se quindi, come si è provato qui a mostrare, appare riduttivo e semplificatorio ricondurre alla sola logica della guerra fredda la complessità di una crisi di cui ancora oggi

Keywords: Avicenna, ribs anatomy, rib fracture, true ribs, false ribs, Canon of Medicine-.. Review article Acta Med Hist Adriat

The treatment of poliomyelitis in Stara Gora, Slovenia began on 24 April 1952, when 32 children of the pre-school age, suffering from cerebral palsy, hip disease, rickets, and some

Based on the visitor management concept, this framework recognizes that any tourist activity has an impact and that the local authority has to monitor

Third, if the recommendation given by DPRD has not been or has been improved by the Regional Head but still not in accordance with RKPD, the DPRD then uses its supervisory

Otherwise, procedure DEPLOY (∆, γ, n, A, I, ϑ) is responsible for adding the association between γ and n to the partial deployment ∆ and to update the current state of I