<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Italian Conference on Cybersecurity, April</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Placing FaaS in the Fog, Securely</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Alessandro Bocci</string-name>
          <email>alessandro.bocci@phd.unipi.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Stefano Forti</string-name>
          <email>stefano.forti@di.unipi.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gian-Luigi Ferrari</string-name>
          <email>gian-luigi.ferrari@unipi.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Antonio Brogi</string-name>
          <email>antonio.brogi@unipi.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="editor">
          <string-name>Information-Flow Security, Function-as-a-Service, FaaS, Fog</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Pisa</institution>
          ,
          <addr-line>Pisa</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2021</year>
      </pub-date>
      <volume>0</volume>
      <fpage>7</fpage>
      <lpage>9</lpage>
      <abstract>
        <p>Placing FaaS applications onto Fog infrastructures is an open problem presenting various challenges. It requires considering hardware and software requirements of single functions as well as Quality of Service requirements of the overall application. In this article, we propose a declarative methodology to address the placement of FaaS applications onto Fog infrastructures, supported by a running prototype. Our methodology considers hardware and software requirements, and latency constraints on functionfunction and function-service interactions. Particular attention is given to information flow security constraints and trust relations among the involved stakeholders, to rank eligible output placements. A lifelike motivating example from augmented reality is used to showcase the prototype.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        ifnding the mappings from functions to Fog nodes, requires to consider hardware, software and
QoS requirements of single functions as well as their composition into complex applications,
and requirements on function bindings with external services. As other application placement
problems in the Fog, deciding on the above is NP-hard, thus worst-case exp-time [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
      </p>
      <p>
        Speaking of QoS, FaaS placement requires constraining the function-function and
functionservice latencies, which are crucial to support latency-sensitive applications [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. Furthermore,
guaranteeing a high level of security is an important QoS aspect to consider [
        <xref ref-type="bibr" rid="ref15 ref16 ref17">15, 16, 17</xref>
        ] as a
security flaw in a single function (or in its interactions with external services) may induce an
overall security flaw of the function composition. Placing FaaS to Fog nodes therefore needs to
consider diferent security contexts, the security level of data flowing between functions, and
trust relations among application operators, and infrastructure and external service providers.
All these are utterly important to avoid data leaks, e.g. by placing functions handling sensitive
data onto insecure or untrusted nodes, or by binding a function to a service managed by an
untrusted provider [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ].
      </p>
      <p>
        This article builds over our previous work on secure and trust-aware multiservice application
placement in the Fog [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ]. Our approach permits to express security requirements of IoT
applications, as well as infrastructure security capabilities taking into account a trust model of the
involved entities. An explainable assessment of the security level of the possible deployments is
automatically derived.In this article, we showcase an extension of [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] over a lifelike motivating
example. The extension includes three main directions:
() The definition of a declarative model to represent function requirements including security
policies, and trust relations,
() The (formal) logical definition of the function placement problem, which exploits
informationlfow security [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] to determine functions’ security contexts, and commutative semirings
to model and propagate trust [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ], and
() A prototype1 of the above, FaaS2Fog, implemented by relying upon an algebraic extension
of Prolog, to determine eligible placements (i.e. mappings from functions to Fog nodes)
and function-service bindings (i.e. mappings from functions’ service requirements to
actual service instances).
      </p>
      <p>
        We consider a simple orchestration mechanism where FaaS services are chained together
as sequences of functions. We call it FaaS chains, and they represent a first step towards
placing more complex FaaS orchestrations (e.g. those of OpenWhisk [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]). FaaS2Fog employs
information-flow security [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] to avoid information leaks to untrusted/insecure nodes or services,
and checks all hardware, software and latency chains requirements.
      </p>
      <p>
        Our approach features two desirable properties to support the placement of FaaS in the
Fog. First, it is declarative, hence more concise, easier to understand and maintain compared
with procedural solutions, and it ofers high flexibility and extensibility, to accommodate the
ever-changing needs of Fog scenarios. Second, it is intrinsically explainable as it derives proofs
for input queries by relying on Prolog resolution engines, and it can be easily extended to justify
why a certain placement decision was made, in the spirit of explainable AI [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ].
      </p>
      <p>The rest of this article is organised as follows. After describing a lifelike motivating example
from augmented reality (Sect. 2), we illustrate FaaS2Fog methodology (Sect. 3), used to solve
1Open sourced and freely available at: https://github.com/di-unipi-socc/FaaS2Fog.
and discuss the motivating example (Sect. 4). After presenting closely related work (Sect. 5),
we conclude by pointing to some directions for future work (Sect. 6).</p>
    </sec>
    <sec id="sec-2">
      <title>2. Motivating Example</title>
      <p>This section illustrates a lifelike motivating example to highlight the challenges related to the
FaaS chain placement problem. Consider an Augmented Reality (AR) application trying to
avoid people gatherings in commercial areas of a city centre, so to contrast the spreading of
Covid-19, by load-balancing people presence across similar shops. When users point with their
smartphones the entrance of a shop they are about to enter, the application renders over the
video 3D information about the number of people inside and its overall capacity. If a high risk
of gathering is detected, the application suggests alternative similar locations to the users by
giving them 3D AR directions, along with incentives (e.g. discounts, special ofers) to move
away from the gathering area. Such an application is implemented by a FaaS chain (Fig. 1):
1.   , which authenticates the user into the service,
2.  ℎ , which recognises the shop entrance in the framed images, so to discriminate among
physically close activities,
3.   , which identifies the shop by its image and coordinates via an external map service,
also retrieving all shop information,
4.  ℎ , which computes the risk of gathering (based on crowd-sensed information),
individuates alternative shops and incentives to move there,
5.   , which renders AR information over the framed video footage and sends it back to
the mobile client.</p>
      <p>For each function in the chain, Fig. 1 lists the software requirements in terms of required
runtime support, and the hardware requirements. For instance, function  ℎ needs Python3
and NumPy to be available on the deployment node, along with 2 GB of RAM, and 4 vCPUs at
1.5 GHz at least.</p>
      <p>UserInfo 13 ms</p>
      <sec id="sec-2-1">
        <title>Coordinates, 30 ms</title>
        <p>ShopInfo
GSahhotpeIrnIfnof,o 12 ms
12 ms
UserInfo,
Screenshot,
Coordinates,
SensorsInfo
fLogin
[py3]
11GGB RAM
22vCPUs
00..55GGHHzz</p>
        <p>Scr1e0enmsshot, FfLSohgoipn Scr1e3emnsshot, fGeo
CSoeonrsdoirnsaItnefso, [p2y4G13v.B,5CnGPRuHUAUAmzMszMsPyy]] CCSoreoonrpsdpoierndsaSIthneofspo,, 11020G[[.v.B44jCjGGPRssHHUA]]zMsz
10 ms</p>
        <sec id="sec-2-1-1">
          <title>Screenshot, fGather</title>
        </sec>
        <sec id="sec-2-1-2">
          <title>CroSphpoepdISnhfoop, 11G[BjRsA]MM</title>
          <p>2vCPUs
00..55GGHHzz
15 ms</p>
        </sec>
        <sec id="sec-2-1-3">
          <title>Screenshot, fAR</title>
        </sec>
      </sec>
      <sec id="sec-2-2">
        <title>InfoToDraw [py3,numPy]</title>
        <p>2GB RAMM
4vCPUss
1.2GHz</p>
        <p>Each function connects to the type of external service(s) it will need to bind with at runtime
(represented as dashed circles). As an example, function   needs to bind to an instance of the
userDB service. Function-function and function-service interactions (represented as arrows) are
annotated with the parameters they exchange and with the maximum end-to-end latency they
tolerate between their deployment nodes. For instance,   passes to  ℎ a Screenshot of the
framed shop, with its geographical Coordinates, and SensorsInfo from the client smartphone.
Such interaction tolerates a latency of at most 10 ms.</p>
        <p>To prevent sensible data from leaking, chain input parameters are labelled with suitable
security types, as those in the lattice of Fig. 2, modelling the security level pertaining to certain
sensible data from top (i.e. secret) to low (i.e. public).</p>
        <p>Those security labels propagate with data along the
function chain (and across external services), determining top
a security context for each function (and service), based medium
on the data it will process. For instance,   inputs
UserInfo, Screenshot, Coordinates, SensorsInfo can be low
labelled by the tuple (top, low, low, low), assigning to Figure 2: Example security lattice.
such function the highest type among those, i.e. top.
Security types propagate to the outputs (Screenshot, Coordinates, SensorsInfo) with the labels
(low, low, low), which will be used in turn to determine the (low) security context of  ℎ .
Finally, we assume that chain triggers come from event generators – invoking suitable
orchestrator API – that are connected to infrastructure nodes. In our example, the event generator is
the client application, which we assume to connect to the closest available node. Functions in
each chain are executed sequentially, and the final result of the computation is returned to the
client application.</p>
        <p>
          Fig. 3 sketches the target (city centre) Fog infrastructure, upon which the chains described
above will be placed and run. Nodes are owned and managed by diferent providers, the
information we need are their software and hardware capabilities, the services they host, and
their security countermeasures, expressed as per the taxonomy of Fig. 4 (as in [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ]). The
countermeasures will be used to specify (i) the security policies in force and (ii) to assign
security labels to nodes.
        </p>
        <p>Service Service Service</p>
        <p>Id Type Provider
myUsers userDB appOp
cMaps maps cloudProvider
openM maps openS
myShop shops. appOp
5 ms
switch
(univers8i0tym)s</p>
        <p>[py3,js]
2GB,2vCPUs,2GHz
[pubKeyE]</p>
        <p>7 ms
5 ms
labServer
(university)
[py3,js,numPy]
4GB,4vCPUs,2GHz
[antiTamp,pubKeyE]</p>
        <p>7 ms
officeServer
(university)</p>
        <p>[py3]
1GB,2vCPUs,1GHz
[]
cloudNode
(cloudProvider)</p>
        <p>[all]
∞GB,∞[CaPlUls],∞GHz
30 ms
ispRouter</p>
        <p>(telco)
[py3,js,numPy]
4GB,4vCPUs,2GHz
[antiTamp,pubKeyE]
7 ms 8 ms
southAntenna 12 ms</p>
        <p>(telco)
[py3,numPy]
2GB,4vCPUs,1.5GHz
[pubKeyE]
northAntenna
(telco)
[js]
2GB,2vCPUs,1.5GHz
[antiTamp,pubKeyE]
7 ms
private2
(privateCitizen2)</p>
        <p>[py3]
0.5GB[,p1uvbCKePUyEs,]1GHz
6 ms
private1
(privateCitizen1)</p>
        <p>[js]
1GB,2vCPUs,2.5GHz
[]</p>
        <p>As an example, node switch, owned by university, supports Python and Javascript code, and
features 2 GB of RAM, 2 vCPUs at 2 GHz, and public key encryption as security countermeasure.
Services instances are managed by their providers that detail information about service types
and deployment nodes. For instance, service cMaps provided by cloudProvider is of type maps
and is deployed to node cloudNode. Links between nodes are annotated with their end-to-end
latency, e.g. the latency between ispRouter and northAntenna is 8 ms.</p>
        <p>Virtualisation</p>
        <p>Communication
Access Logs
Authentication
Host IDS
Process Isolation
Permission Model
Resource Usage
Monitoring
Restore Points
User Data
Isolation</p>
        <p>Certificates
Firewall
IoT Data
Encryption
Node Isolation
Mechanims
Network IDS
Public Key
Cryptography
Wireless Security</p>
        <p>FOG
SECURITY</p>
        <p>Data
Backup
Encrypted Storage
Obfuscated
Storage</p>
        <p>Physical
Access Control
Anti-tampering
Capabilities</p>
        <p>Other
Audit</p>
        <p>Deploying the chain in Fig. 1 onto infrastructure of Fig. 3 requires satisfying all functions’
software, hardware and latency requirements, and determining a suitable binding from functions
to the service instances they need. Furthermore, function labels and node labels should be
compatible, i.e. a node can host a function only if it features an equal or higher security label.
As an example, the application operator can establish that a node featuring public key encryption
without anti-tampering is labelled as medium security. This means that the node can only support
functions labelled either low or medium. Note that this is required to avoid leaking data from a
higher to a lower security context.</p>
        <p>The problem we aim at solving in the above scenario is as follows:</p>
        <p>Is there any eligible placement and service binding of chainGath over the available
Fog infrastructure, such that all software, hardware, latency, external service, security
requirements are met, and data leaks are avoided? Can trust relations among involved
stakeholders help in evaluating the quality of eligible placements?
In Sect. 4 we will show how our methodology and prototype FaaS2Fog can be used to answer
the above questions.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Methodology</title>
      <p>In this section, we describe our methodology to place FaaS chains to Fog infrastructure. We
illustrate both the modelling (Sect. 3.1) and the declarative solution (Sect. 3.2) of the problem,
showing the main Prolog2 facts where clarifications are needed.
3.1. Modelling Applications, Infrastructures and Trust
Declaring FaaS Chains. Application operators declare the requirements of a function F they
will chain into FaaS applications using
functionReqs(F, SoftwareRequirements, HardwareRequirements, ServiceTypeRequirements).
Such requirements include SoftwareRequirements and HardwareRequirements, as well as
ServiceTypeRequirements used to bind at run time service instances to be invoked by the function.</p>
      <p>The function behaviour of a function F is defined by a relation between security types of
input data (Inputs), output data (Outputs) and data exchanged with external services
(ServiceInteractions). The declaration of function behaviours is
functionBehaviour(F, Inputs, ServiceInteractions, Outputs):- ...</p>
      <p>
        We assume that such information can be defined manually, or obtained by exploiting static
analyses and type systems (see e.g. [
        <xref ref-type="bibr" rid="ref23 ref24">23, 24</xref>
        ]).
      </p>
      <p>A Function chain FChain managed by Operator is declared as
functionChain(FChain, Operator, EventTrigger, Functions, Latencies).
where are included the list of Functions forming the chain, the FaaS Operator, the
EventTrigger associated with the chain, and the maximum tolerated Latencies from the trigger to the
ifrst chain function, and between consecutive chained functions. Chain triggers are denoted
by pairs containing the trigger source and the list of security labels of its parameters (e.g.
[top,low,low,low]). Those security labels will match the input types of the first function and
propagate along the chain according to declared function behaviours. Chained functions are
denoted by pairs containing a function identifier and a list of actual service instances each
function will bind to. Bindings either specify a certain service instance identifier or are left
unbound, meaning that any service of the required type can satisfy the requirement.</p>
      <p>Application operators also declare a lattice of the security types to define their functions and
function chains, as the one in Fig. 2, using
g_lattice_higherThan(Higher, Lower).
to represent each ordered pair of the lattice with the Higher and the Lower security types.
Declaring Fog Infrastructures. Infrastructure node are declared as
node(NodeId, ProvId, SecCaps, SWCaps, HWCaps).
including the NodeId (e.g. its IP address) and the security, software and hardware capabilities
featured by the node (viz. SecCaps, SWCaps and HWCaps), which enable FaaS2Fog to check the latter
against function requirements. Security capabilities are lists of literals from Fig. 4.</p>
      <p>End-to-end links between nodes (NId1 and NId2) are associated with the average Latency in
milliseconds experienced between the nodes, declared as</p>
      <p>2A Prolog program is a finite set of clauses of the form: a :- b1, ... , bn. stating that a holds when b1 ∧ ⋯ ∧
bn holds, where n≥0 and a, b1, ..., bn are atomic literals. Clauses with empty condition are also called facts. Prolog
variables begin with upper-case letters, lists are denoted by square brackets, and negation by \+. Conventionally, a
Prolog predicate pred with N arguments is indicated as pred/N.</p>
      <p>External services, running on available nodes, are declared by service providers as
service(ServiceId, ServiceProvider, ServiceType, NodeId).
where are specified the ServiceId, the identifier of the ServiceProvider, the ServiceType, and the
NodeId of the service host node.</p>
      <p>
        The declaration of an event generator EG is
eventGenerator(EG, EventType, NodeId).
and it includes the EventType of generated triggers it can generate as well as the NodeId of the
node with which it is connected. It is worth noting that data about infrastructure capabilities,
services and event generators can be obtained by exploiting available monitoring tools targeting
Fog settings (e.g. FogMon [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ], or one of the tools surveyed in [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ]).
      </p>
      <p>
        Declaring Security Policies. The security context of nodes and external services is determined
according to the security policies specified by application operators. Node and service labelling
is performed as per the same security types of functions parameters to guarantee that types
can be checked against each other and to enforce that functions are placed onto nodes and
interacts with services that feature at least their security type. Node labelling is specified by
the declaration
assignNodeLabel(Node, SecurityContextLabel) :- ...
meaning that the SecurityContextLabel is assigned to the Node if all conditions of the right
hand-side of the rule hold. For example, a node is labelled top only if such node features both
anti-tampering and public key encryption among its security capabilities. Analogously, external
services are labelled by defining the security policies based on the available service information.
Declaring Trust Opinions. All involved stakeholders (i.e. application operators, infrastructure
providers, service providers) can declare trust opinions towards each other. Following [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ],
trust relations are modelled as pairs ( , ) ∈ [
        <xref ref-type="bibr" rid="ref1">0, 1</xref>
        ] × [
        <xref ref-type="bibr" rid="ref1">0, 1</xref>
        ] where  represents a level of trust
(the higher the better) and  the confidence in (i.e. the quality of) such value  , based on trust
monitoring data. By employing a dialect of Prolog, viz.  -Problog [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ], trust opinions are
declared as facts annotated with ( , ) , in the form
(T,C)::trustOpinion(Stakeholder1, Stakeholder2).
where Stakeholder1 declares her trust level and confidence toward Stakeholder2.
3.2. Placing FaaS Chains onto Fog Infrastructures
In this section, we briefly illustrate how FaaS2Fog determines FaaS application placements, based
on the modelling described in the previous section. Fig. 5 lists the faas2fog/2 predicate, giving
an overview of the overall functioning of our prototype. After retrieving a function chain by
its identifier CId (line 2), faas2fog/2 retrieves also an event generator associated to the chain,
if any (line 3). Then, after propagating security types along the FaaS chain to determine the
security contexts needed by each function (line 4), faas2fog/2 determines an eligible FaaS chain
Placement satisfying all set requirements (line 5).
2. Resource- &amp; QoS-aware Placement. After this step, the mapping/7 (Fig. 7) scans the list of
typed functions TFList and determines an eligible placement for each of them, until the list
is empty (line 1). For each function F to be placed, mapping/7 non-deterministically selects a
candidate node N (line 3) and checks the latency constraint between N and the node of the
previously allocated function3 (line 4). Then, software and hardware requirements of F are
checked against N capabilities (lines 5–6). Notably, the predicate hwReqsOK/5 also checks whether
cumulative hardware requirements allow placing F onto N, i.e. whether, due to the allocation
of previous functions OldAllocHW, the current capacity of N can still host F as well. If this
is possible, the hardware allocation is updated by summing the hardware required by F to
the allocated hardware at N into AllocHW. Consequently, the compatibleNodeType/2 predicate
checks whether the security context of N (determined by the assignNodeLabel/2 provided by the
application operator) is compatible with the security context required by the function. Finally,
the bindServices/6 predicate determines if bindings to external services comply to security and
latency constraints of the function to be placed. Note that when a binding requirement is left
unbound, bindServices/6 can determine eligible services (if any) that satisfy the requirements.
Each placement and binding for F is accumulated in the last parameter of mapping/7, in tuples
like on(F,N,FBinding). Such result will be returned by faas2fog/2.
3. Trust Propagation. FaaS2Fog also considers trust relations by using the semiring-based
3In case of the first function, mapping/7 checks the latency from the event generator.
modelling of [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ] to aggregate opinions from diferent stakeholders. Trust propagation is
conditioned to a maximum radius of 3 hops in the trust graph, assuming that each stakeholder
trusts herself with a (1, 1) opinion. Following the model of [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ], we propagate trust from 
to  as follows: opinions along paths from  to  are multiplied, while opinions across paths
from  to  are summed. We employ the multiplication (⊗) and sum (⊕) operations of Fig. 8,
implemented as in [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] via  -Problog.
      </p>
      <p>Trust relations are checked between the
application operator and the node operator where
functions are placed. Analogously, trust re- ⟨ , ⟩ ⊗ ⟨ ′,  ′⟩ = ⟨  ′,  ′⟩
lations are checked between the application ⎧⟨ , ⟩ if  &gt;  ′
loypienrgatoonr  a-nPdroebxltoegr,nFaalasSe2rFvoicgeapnrnoovtiadteersse.aRceh- ⟨ , ⟩ ⊕ ⟨ ′,  ′⟩ = ⎩⎨⟨⟨m′a,x{′ ⟩, ′}, ⟩, iiff  =′ &gt;  ′
output eligible placement with its overall trust
assessment computed as described above. Figure 8: Semiring ⊗ and ⊕ operations.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Motivating Example Revisited</title>
      <p>In this section, we solve the motivating example4 of Sect. 2 by answering the questions raised
therein. Security policies to label services specify that all the services provided by appOp are
labelled top, the maps services provided by cloudProvider are labelled medium, and all the other
services are labelled low. We assume that input parameters generated by userDevices triggering
the chain are labelled [top,low,low,low], only considering user’s data as sensitive information.</p>
      <p>Given these ingredients, we simply query the main predicate of FaaS2Fog, faas2fog(chainGath,
Placement), to determine eligible placements for the FaaS chain. FaaS2Fog matches trigger types
with the input labels of function   (UserInfo, Screenshot, Coordinates, SensorsInfo) and,
by propagation, it determines the labelling of functions5 as: (  , top), ( ℎ , low), (  , low),
( ℎ , medium), and (  , medium). Afterwards, eligible placements and service bindings meeting
all software, hardware, latency, and security requirements of the chain of Fig. 1 are looked for
by the placement phase. Table 1 summarises all obtained results. They are 9 eligible placements
4Full example code at: https://github.com/di-unipi-socc/FaaS2Fog/tree/main/examples/ITASEC21
5Note that, labelling Coordinates as medium, we would obtain a diferent labelling, i.e. (  
medium), (  , medium), ( ℎ , medium), and (  , medium).
, top), ( ℎ ,
and bindings –  1 - 9 , one per row – that satisfy all set requirements. Each column in the table
corresponds to a chain function and lists the placement node and the service bindings. It is
worth mentioning that while service bindings are already specified for  
myUserDB) and for   ℎ
(with the service myGatherS), the binding of  
(with the service
was left unbound and
is determined by FaaS2Fog so to meet the required low security context. As a consequence,
depending also on function-service latency considerations, such requirement is bound either to
the openM (e.g.  1 ) or to the cMaps instance (e.g.  2 ).</p>
      <p>f Login
We now also consider the trust network of Fig. 9, where links are annotated with (Trust,
Confidence) values. For instance, appOp has a trust level of 0.99 with confidence
telco provider, and a trust level of 0.9 with confidence
0.9 toward the cloudProvider provider.</p>
      <p>Table 2 lists the trust and confidence values associated to the found placements  1 – 9 , listed in
placement(s), as well as to set a minimum trust level to meet. For instance, blindly choosing
the first result  1</p>
      <p>of Table 1 actually leads to selecting one of the placements which can be
trusted less (viz. (0.27, 0.23)) among the eligible ones. By considering trust assessment, the
application operator will instead likely choose  4 , with the best trust level (viz. (0.77, 0.48)).</p>
      <p>0.99,0.9
appOp</p>
      <p>telco
0.9,0.9
0.9,0.9</p>
      <p>0.9,0.9
0.5,0.9
private1
0.6,1
cloudProvider</p>
    </sec>
    <sec id="sec-5">
      <title>5. Related Work</title>
      <p>university
0.8,0.85</p>
      <p>0.9,0.9
private2
0.8,0.9</p>
      <p>0.8,1
0.89,0.9
openS</p>
      <p>P1
P2
P3
P4
P5
P6
P7
P8
P9</p>
      <p>Trust
(0.27, 0.23)
(0.61, 0.31)
(0.27, 0.23)
(0.77, 0.48)
(0.34, 0.35)
(0.34, 0.31)
(0.17, 0.28)
(0.30, 0.28)
(0.24, 0.21)</p>
      <p>In this section, we survey some closely related work proposing declarative solutions to resource
management in Cloud or Fog scenarios and techniques to assist the placement of orchestrated
serverless functions in the Fog.</p>
      <p>
        Speaking of declarative approaches to resource management, some have been proposed to
manage Cloud resources (e.g. [
        <xref ref-type="bibr" rid="ref28">28</xref>
        ]) and to improve network usage (e.g. [
        <xref ref-type="bibr" rid="ref29">29</xref>
        ]). We employed
 -Problog prototypes to assess the security and trust levels of diferent multiservice application
placements [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], and to securely place VNF chains and steer trafic across them [
        <xref ref-type="bibr" rid="ref30">30</xref>
        ]. The
taxonomy of Fig. 4 to express security policies was introduced in [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], where trust relations
modelled via semirings were introduced. Diferently from FaaS2Fog, it determines placements
of multiservice applications (i.e. not FaaS-based) without considering information flow security,
external service interactions, nor hardware and software requirements of services to be placed.
Similarly, focussing on Software-defined Networking (SDN) domains, [
        <xref ref-type="bibr" rid="ref30">30</xref>
        ] considers neither
trust relations nor information flow security, but only security requirements as AND-OR
combinations of the taxonomy elements. Closely related to these, [
        <xref ref-type="bibr" rid="ref31">31</xref>
        ] devises a (non-declarative)
solution to the problem of placing multiservice applications over multiple nodes, configuring
hardware/software security controls without considering information-flow nor trust.
      </p>
      <p>
        Targeting FaaS architectures, Pinto et al. [
        <xref ref-type="bibr" rid="ref32">32</xref>
        ] dynamically decide whether to run a serverless
function within the local Edge network or in the Cloud, based on monitored data. An Edge proxy
is in charge of making such a decision, also considering network failures. On the same line, Das
et al. [
        <xref ref-type="bibr" rid="ref33">33</xref>
        ] present an edge-based framework to dynamically decide whether to execute a function
in the Cloud or locally, by estimating operational costs and improving end-to-end latencies.
Similarly, Aske and Zhao [
        <xref ref-type="bibr" rid="ref34">34</xref>
        ] present a serverless monitoring and scheduling system to select
FaaS providers, based on average execution time, afinity constraints, and costs – possibly
considering user-defined scheduling policies. Cho et al. [
        <xref ref-type="bibr" rid="ref35">35</xref>
        ] discuss a solution to distribute
FaaS tasks over hierarchical Fog infrastructures, by employing a token bucket algorithm and
einforcement learning to optimise workload distribution and response times.
      </p>
      <p>
        Cicconetti et al. [
        <xref ref-type="bibr" rid="ref36">36</xref>
        ] propose an architecture to realise serverless computing SDN scenarios
where network routers assign function execution to edge devices based on arbitrary costs (e.g.
latency, bandwidth, energy). The infrastructure is monitored and updated by SDN controllers,
and diferent strategies try to optimise operational costs and load-balancing. More recently,
based on their model to annotate function requirements [
        <xref ref-type="bibr" rid="ref37">37</xref>
        ], Rausch et al. [
        <xref ref-type="bibr" rid="ref38">38</xref>
        ] discuss a
Kubernetes-based scheduler to optimise the placement of FaaS in the Fog based on a linear
combination of proximity to image registries and to data producers, available node resources
and Edge or Cloud locality. Bermbach et al. [
        <xref ref-type="bibr" rid="ref39">39</xref>
        ] take an infrastructure provider’s perspective to
FaaS placement in the Fog, using distributed auctions. Programmers submit functions to target
nodes along with a resource bid, based on which nodes decide whether to run functions.
      </p>
      <p>
        Only [
        <xref ref-type="bibr" rid="ref40">40</xref>
        ] and [
        <xref ref-type="bibr" rid="ref41">41</xref>
        ] exploit information flow security to check that no leak is present in FaaS
orchestrations, at runtime. Diferently from FaaS2Fog, security types are not exploited to
determine eligible FaaS placements. To the best of our knowledge, none of the previously proposed
approaches considers information-flow security, or infrastructure security countermeasures, or
trust relations when performing latency-aware placement of FaaS orchestrations in the Fog.
      </p>
    </sec>
    <sec id="sec-6">
      <title>6. Concluding Remarks</title>
      <p>This article introduced a life-like example concerning the problem of determining eligible
placements of FaaS chains to Fog infrastructures, that is addressed with a declarative
methodology and its prototype, FaaS2Fog. Our approach considers hardware, software and latency
requirements, and exploits information-flow security policies as well as infrastructure security
capabilities. Eligible placements are ranked by employing semiring-based trust relations among
the involved stakeholders. From the architectural viewpoint, FaaS2Fog employs information
on the application, on its security types and on infrastructure labelling policies (declared by
application operators), data on infrastructure capabilities (collected via distributed monitoring
tools, and declared by infrastructure operators), and trust relations (declared by all involved
providers).</p>
      <p>
        Our approach shows some qualifying strenghts to address FaaS placement in Fog scenarios.
Its declarative nature makes it easier to define FaaS chain requirements and security policies,
infrastructure capabilities, and trust relations. Moreover, it naturally supports a flexible approach
since it allows the definition of new requirements (e.g. bandwidth, availability of specialised
hardware) or security considerations (e.g. provider whitelisting). Finally, placement explanation
can be obtained by taking advantage of proof paths determined via the  -Problog engine.
Thus, employing explainable placements combined with information-flow and trust assessment
can reduce the possibility of leaking critical data to untrusted or insecure parties during the
deployment of FaaS chains. On the other hand, FaaS2Fog does not yet handle structured FaaS
orchestrations, obtained by combining functions with traditional control mechanisms (e.g.
branches, loops). This needs to be addressed to model more complex use cases, also extending
information flow analyses to the general case. Additionally, human-readable explanations on
why a certain placement was (or was not) output would further improve interactions with
the users and their trust in systems based on the proposed methodology. Finally, FaaS2Fog
incurs in worst-case exp-time to determine valid placements. As serverless functions are usually
on-demand and short-lived, it is crucial to assess execution times over larger examples, and to
improve on those via heuristics or continuous reasoning [
        <xref ref-type="bibr" rid="ref42">42</xref>
        ].
      </p>
      <p>
        In addition to tackling all aforementioned points, in our future work we plan to extend the
methodology underlying FaaS2Fog by formally defining type judgement rules for a
featurecomplete orchestration language, showing how they can be naturally expressed in  -Problog.
Last, we intend to implement a service based on FaaS2Fog and on the
Logic-Programming-asa-Service paradigm [
        <xref ref-type="bibr" rid="ref43">43</xref>
        ], and to experiment with actual FaaS deployments in Fog settings by
relying on open-source orchestration engines such as OpenWhisk with IBM Composer [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ].
      </p>
    </sec>
    <sec id="sec-7">
      <title>Acknowledgments</title>
      <p>This work has been partly supported by project “Lightweight Self-adaptive Cloud-IoT Monitoring
across Fed4FIRE+ Testbed” (LiSCIo) funded by Fed4Fire+ and“Continuous QoS-compliant
Management of Software Applications over the Cloud-IoT Continuum ” (CONTWARE) funded by the
Conference of Italian University Rectors.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>AWS</given-names>
            <surname>Lambda</surname>
          </string-name>
          , https://aws.amazon.com/it/lambda/, Accessed: Apr.
          <year>2021</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>V.</given-names>
            <surname>Yussupov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Soldani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>U.</given-names>
            <surname>Breitenbücher</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Brogi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Leymann</surname>
          </string-name>
          ,
          <article-title>FaaSten your decisions: A classification framework and technology review of Function-as-a-Service platforms</article-title>
          ,
          <source>Journal of Systems and Software</source>
          <volume>175</volume>
          (
          <year>2021</year>
          )
          <fpage>110906</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>F.</given-names>
            <surname>Bonomi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Milito</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Natarajan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Zhu</surname>
          </string-name>
          ,
          <article-title>Fog computing: A platform for internet of things and analytics, in: Big data and internet of things</article-title>
          , volume
          <volume>546</volume>
          ,
          <year>2014</year>
          , pp.
          <fpage>169</fpage>
          -
          <lpage>186</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>P.</given-names>
            <surname>Habibi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Farhoudi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Kazemian</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Khorsandi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Leon-Garcia</surname>
          </string-name>
          ,
          <article-title>Fog Computing: A Comprehensive Architectural Survey</article-title>
          ,
          <source>IEEE Access 8</source>
          (
          <year>2020</year>
          )
          <fpage>69105</fpage>
          -
          <lpage>69133</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>R.</given-names>
            <surname>Mahmud</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. N.</given-names>
            <surname>Srirama</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Ramamohanarao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Buyya</surname>
          </string-name>
          ,
          <article-title>Quality of Experience (QoE)- aware placement of applications in Fog computing environments</article-title>
          ,
          <source>J. Parallel Distributed Comput</source>
          .
          <volume>132</volume>
          (
          <year>2019</year>
          )
          <fpage>190</fpage>
          -
          <lpage>203</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>C.</given-names>
            <surname>Guerrero</surname>
          </string-name>
          , I. Lera,
          <string-name>
            <given-names>C.</given-names>
            <surname>Juiz</surname>
          </string-name>
          ,
          <article-title>Evaluation and eficiency comparison of evolutionary algorithms for service placement optimization in fog architectures, Future Gener</article-title>
          .
          <source>Comput. Syst</source>
          .
          <volume>97</volume>
          (
          <year>2019</year>
          )
          <fpage>131</fpage>
          -
          <lpage>144</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>A.</given-names>
            <surname>Brogi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Forti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Ibrahim</surname>
          </string-name>
          ,
          <article-title>Optimising QoS-assurance, Resource Usage and Cost of Fog Application Deployments, in: CLOSER (Selected Papers)</article-title>
          ,
          <source>CCIS</source>
          , volume
          <volume>1073</volume>
          ,
          <year>2018</year>
          , pp.
          <fpage>168</fpage>
          -
          <lpage>189</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>I. B.</surname>
          </string-name>
          et al.,
          <article-title>Serverless computing: Current trends and open problems</article-title>
          , in: Res. Adv. in Cloud Comp.,
          <year>2017</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>20</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>E.</given-names>
            <surname>Jonas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Schleier-Smith</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Sreekanti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Tsai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Khandelwal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Pu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Shankar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Carreira</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Krauth</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. J.</given-names>
            <surname>Yadwadkar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. E.</given-names>
            <surname>Gonzalez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. A.</given-names>
            <surname>Popa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I.</given-names>
            <surname>Stoica</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. A.</given-names>
            <surname>Patterson</surname>
          </string-name>
          , Cloud Programming Simplified: A Berkeley View on Serverless Computing, CoRR abs/
          <year>1902</year>
          .03383 (
          <year>2019</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>M. S.</given-names>
            <surname>Raghavendra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Chawla</surname>
          </string-name>
          ,
          <article-title>A review on container-based lightweight virtualization for fog computing</article-title>
          ,
          <source>in: ICRITO</source>
          ,
          <year>2018</year>
          , pp.
          <fpage>378</fpage>
          -
          <lpage>384</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>D. von Leon</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Miori</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Sanin</surname>
            ,
            <given-names>N. El</given-names>
          </string-name>
          <string-name>
            <surname>Ioini</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Helmer</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Pahl</surname>
          </string-name>
          ,
          <article-title>A lightweight container middleware for edge cloud architectures, Fog and edge computing (</article-title>
          <year>2019</year>
          )
          <fpage>145</fpage>
          -
          <lpage>170</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>T.</given-names>
            <surname>Pfandzelter</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.</surname>
          </string-name>
          <article-title>Bermbach, tinyfaas: A lightweight faas platform for edge environments</article-title>
          , in: ICFC,
          <year>2020</year>
          , pp.
          <fpage>17</fpage>
          -
          <lpage>24</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>A.</given-names>
            <surname>Brogi</surname>
          </string-name>
          , S. Forti,
          <article-title>QoS-Aware Deployment of IoT Applications Through the Fog</article-title>
          ,
          <source>IEEE Internet Things J</source>
          .
          <volume>4</volume>
          (
          <year>2017</year>
          )
          <fpage>1185</fpage>
          -
          <lpage>1192</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>M.</given-names>
            <surname>Großmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Ioannidis</surname>
          </string-name>
          , D. T. Le,
          <article-title>Applicability of serverless computing in fog computing environments for iot scenarios</article-title>
          ,
          <source>in: UCC Companion</source>
          ,
          <year>2019</year>
          , pp.
          <fpage>29</fpage>
          -
          <lpage>34</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>J.</given-names>
            <surname>Ni</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Lin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Shen</surname>
          </string-name>
          ,
          <article-title>Securing fog computing for internet of things applications: Challenges and solutions</article-title>
          ,
          <source>IEEE Comm. Surveys &amp; Tutorials</source>
          <volume>20</volume>
          (
          <year>2017</year>
          )
          <fpage>601</fpage>
          -
          <lpage>628</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>L. M.</given-names>
            <surname>Vaquero</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Cuadrado</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Elkhatib</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Bernal-Bernabe</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. N.</given-names>
            <surname>Srirama</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. F.</given-names>
            <surname>Zhani</surname>
          </string-name>
          , Research challenges in nextgen service orchestration,
          <source>Future Gener. Comput. Syst</source>
          .
          <volume>90</volume>
          (
          <year>2019</year>
          )
          <fpage>20</fpage>
          -
          <lpage>38</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>S.</given-names>
            <surname>Forti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. L.</given-names>
            <surname>Ferrari</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Brogi</surname>
          </string-name>
          ,
          <article-title>Secure cloud-edge deployments, with trust</article-title>
          ,
          <source>Future Gener. Comput. Syst</source>
          .
          <volume>102</volume>
          (
          <year>2020</year>
          )
          <fpage>775</fpage>
          -
          <lpage>788</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>A.</given-names>
            <surname>Bocci</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Forti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.-L.</given-names>
            <surname>Ferrari</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Brogi</surname>
          </string-name>
          ,
          <article-title>Secure FaaS orchestration in the fog: how far are we?</article-title>
          ,
          <string-name>
            <surname>Computing</surname>
          </string-name>
          (
          <year>2021</year>
          )
          <fpage>1</fpage>
          -
          <lpage>32</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>A.</given-names>
            <surname>Sabelfeld</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. C.</given-names>
            <surname>Myers</surname>
          </string-name>
          ,
          <article-title>Language-based information-flow security</article-title>
          ,
          <source>IEEE J. Sel. Areas Commun</source>
          .
          <volume>21</volume>
          (
          <year>2003</year>
          )
          <fpage>5</fpage>
          -
          <lpage>19</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>S.</given-names>
            <surname>Bistarelli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. N.</given-names>
            <surname>Foley</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. O</given-names>
            <surname>'Sullivan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Santini</surname>
          </string-name>
          ,
          <article-title>Semiring-based frameworks for trust propagation in small-world networks and coalition formation criteria</article-title>
          ,
          <source>SCN</source>
          <volume>3</volume>
          (
          <year>2010</year>
          )
          <fpage>595</fpage>
          -
          <lpage>610</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21] IBM OpenWhisk, https://cloud.ibm.com/docs/openwhisk, Accessed: Apr.
          <year>2021</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>H.</given-names>
            <surname>Hagras</surname>
          </string-name>
          ,
          <article-title>Toward human-understandable, explainable AI</article-title>
          ,
          <source>Computer</source>
          <volume>51</volume>
          (
          <year>2018</year>
          )
          <fpage>28</fpage>
          -
          <lpage>36</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>F.</given-names>
            <surname>Pottier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Skalka</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. F.</given-names>
            <surname>Smith</surname>
          </string-name>
          ,
          <article-title>A systematic approach to static access control</article-title>
          ,
          <source>ACM Trans. Program. Lang. Syst</source>
          .
          <volume>27</volume>
          (
          <year>2005</year>
          )
          <fpage>344</fpage>
          -
          <lpage>382</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>M.</given-names>
            <surname>Bartoletti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Degano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. L.</given-names>
            <surname>Ferrari</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Zunino</surname>
          </string-name>
          ,
          <article-title>Semantics-based design for secure web services</article-title>
          ,
          <source>IEEE Trans. Software Eng</source>
          .
          <volume>34</volume>
          (
          <year>2008</year>
          )
          <fpage>33</fpage>
          -
          <lpage>49</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>S.</given-names>
            <surname>Forti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Gaglianese</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Brogi</surname>
          </string-name>
          ,
          <article-title>Lightweight self-organising distributed monitoring of Fog infrastructures</article-title>
          ,
          <source>Future Gener. Comput. Syst</source>
          .
          <volume>114</volume>
          (
          <year>2021</year>
          )
          <fpage>605</fpage>
          -
          <lpage>618</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <given-names>S.</given-names>
            <surname>Taherizadeh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. C.</given-names>
            <surname>Jones</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I.</given-names>
            <surname>Taylor</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Zhao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Stankovski</surname>
          </string-name>
          ,
          <article-title>Monitoring self-adaptive applications within edge computing frameworks: A state-of-the-art review</article-title>
          ,
          <source>J. Syst. Softw</source>
          .
          <volume>136</volume>
          (
          <year>2018</year>
          )
          <fpage>19</fpage>
          -
          <lpage>38</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          [27]
          <string-name>
            <given-names>A.</given-names>
            <surname>Kimmig</surname>
          </string-name>
          , G. Van den Broeck, L. De Raedt,
          <article-title>An algebraic Prolog for reasoning about possible worlds</article-title>
          ,
          <source>in: AAAI</source>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          [28]
          <string-name>
            <given-names>S.</given-names>
            <surname>Kadioglu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Colena</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Sebbah</surname>
          </string-name>
          ,
          <article-title>Heterogeneous resource allocation in Cloud Management</article-title>
          ,
          <source>in: NCA</source>
          <year>2016</year>
          ,
          <year>2016</year>
          , pp.
          <fpage>35</fpage>
          -
          <lpage>38</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          [29]
          <string-name>
            <given-names>T. L.</given-names>
            <surname>Hinrichs</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. S.</given-names>
            <surname>Gude</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Casado</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. C.</given-names>
            <surname>Mitchell</surname>
          </string-name>
          , S. Shenker,
          <article-title>Practical declarative network management</article-title>
          ,
          <source>in: WREN</source>
          ,
          <year>2009</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>10</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          [30]
          <string-name>
            <given-names>S.</given-names>
            <surname>Forti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Paganelli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Brogi</surname>
          </string-name>
          ,
          <article-title>Probabilistic QoS-aware Placement of VNF chains at the Edge, Theory Pract</article-title>
          . Log. Program. (
          <year>2021</year>
          ). In press.
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          [31]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Á</surname>
          </string-name>
          . Mann,
          <article-title>Secure software placement and configuration</article-title>
          ,
          <source>Future Gener. Comput. Syst</source>
          .
          <volume>110</volume>
          (
          <year>2020</year>
          )
          <fpage>243</fpage>
          -
          <lpage>253</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref32">
        <mixed-citation>
          [32]
          <string-name>
            <given-names>D.</given-names>
            <surname>Pinto</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. P.</given-names>
            <surname>Dias</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H. S.</given-names>
            <surname>Ferreira</surname>
          </string-name>
          ,
          <article-title>Dynamic allocation of serverless functions in iot environments</article-title>
          , in: EUC,
          <year>2018</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>8</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref33">
        <mixed-citation>
          [33]
          <string-name>
            <surname>A. Das</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Imai</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Patterson</surname>
            ,
            <given-names>M. P.</given-names>
          </string-name>
          <string-name>
            <surname>Wittie</surname>
          </string-name>
          ,
          <article-title>Performance Optimization for Edge-Cloud Serverless Platforms via Dynamic Task Placement</article-title>
          , in: CCGRID,
          <year>2020</year>
          , pp.
          <fpage>41</fpage>
          -
          <lpage>50</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref34">
        <mixed-citation>
          [34]
          <string-name>
            <given-names>A.</given-names>
            <surname>Aske</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Zhao</surname>
          </string-name>
          ,
          <article-title>Supporting multi-provider serverless computing on the edge</article-title>
          ,
          <source>in: ICPP</source>
          ,
          <year>2018</year>
          , pp.
          <volume>20</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>20</lpage>
          :
          <fpage>6</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref35">
        <mixed-citation>
          [35]
          <string-name>
            <given-names>C.</given-names>
            <surname>Cho</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Shin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Jeon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Yoon</surname>
          </string-name>
          ,
          <article-title>Qos-aware workload distribution in hierarchical edge clouds: A reinforcement learning approach</article-title>
          ,
          <source>IEEE Access 8</source>
          (
          <year>2020</year>
          )
          <fpage>193297</fpage>
          -
          <lpage>193313</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref36">
        <mixed-citation>
          [36]
          <string-name>
            <given-names>C.</given-names>
            <surname>Cicconetti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Conti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Passarella</surname>
          </string-name>
          ,
          <article-title>A decentralized framework for serverless edge computing in the internet of things</article-title>
          ,
          <source>IEEE Trans. Netw. Serv. Manag</source>
          . (
          <year>2020</year>
          )
          <fpage>1</fpage>
          -
          <lpage>14</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref37">
        <mixed-citation>
          [37]
          <string-name>
            <given-names>T.</given-names>
            <surname>Rausch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Hummer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Muthusamy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Rashed</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Dustdar</surname>
          </string-name>
          ,
          <article-title>Towards a serverless platform for edge AI</article-title>
          , in: HotEdge,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref38">
        <mixed-citation>
          [38]
          <string-name>
            <given-names>T.</given-names>
            <surname>Rausch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Rashed</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Dustdar</surname>
          </string-name>
          ,
          <article-title>Optimized container scheduling for data-intensive serverless edge computing</article-title>
          ,
          <source>FGCS</source>
          <volume>114</volume>
          (
          <year>2021</year>
          )
          <fpage>259</fpage>
          -
          <lpage>271</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref39">
        <mixed-citation>
          [39]
          <string-name>
            <given-names>D.</given-names>
            <surname>Bermbach</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Maghsudi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Hasenburg</surname>
          </string-name>
          , T. Pfandzelter,
          <article-title>Towards auction-based function placement in serverless fog platforms</article-title>
          ,
          <source>in: ICFC</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>25</fpage>
          -
          <lpage>31</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref40">
        <mixed-citation>
          [40]
          <string-name>
            <given-names>K.</given-names>
            <surname>Alpernas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Flanagan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Fouladi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Ryzhyk</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Sagiv</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Schmitz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Winstein</surname>
          </string-name>
          ,
          <article-title>Secure serverless computing using dynamic information flow control</article-title>
          ,
          <source>OOPSLA</source>
          <volume>2</volume>
          (
          <year>2018</year>
          )
          <fpage>1</fpage>
          -
          <lpage>26</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref41">
        <mixed-citation>
          [41]
          <string-name>
            <given-names>P.</given-names>
            <surname>Datta</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Kumar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Morris</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Grace</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Rahmati</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Bates</surname>
          </string-name>
          , Valve:
          <article-title>Securing function workflows on serverless computing platforms</article-title>
          ,
          <source>in: WWW</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>939</fpage>
          -
          <lpage>950</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref42">
        <mixed-citation>
          [42]
          <string-name>
            <given-names>S.</given-names>
            <surname>Forti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Brogi</surname>
          </string-name>
          ,
          <article-title>Continuous Reasoning for Managing Next-Gen Distributed Applications</article-title>
          , in:
          <source>ICLP (Technical Communications)</source>
          , volume
          <volume>325</volume>
          <source>of EPTCS</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>164</fpage>
          -
          <lpage>177</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref43">
        <mixed-citation>
          [43]
          <string-name>
            <given-names>R.</given-names>
            <surname>Calegari</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Denti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Mariani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Omicini</surname>
          </string-name>
          ,
          <article-title>Logic programming as a service, Theory Pract</article-title>
          . Log. Program.
          <volume>18</volume>
          (
          <year>2018</year>
          )
          <fpage>846</fpage>
          -
          <lpage>873</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>