continuous reasoning for managing next-gen distributed applications
FogBrain methodology is fully described in the following article:
Stefano Forti, Antonio Brogi
Continuous Reasoning for Managing Next-Gen Distributed Applications,
ICLP 2020 (Technical Communications), EPTCS, vol. 325, pp. 164–177, 2020.
If you wish to reuse source code in this repo, please consider citing it.
FogBrain is written in Prolog. Prolog programs are finite sets of clauses of the form:
a :- b1, ... , bn.
stating that a
holds when b1
and ... and 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 \+
.
Before using FogBrain you need to install the latest stable release of SWI-Prolog.
All information on FogBrain can be found here, along with a quickstart example and interactive documentation on the current release.
To try FogBrain:
-
Download or clone this repository.
-
Open a terminal in the project folder and run
swipl fogbrain.pl
. -
Inside the running program either run the query
:- fogBrain(vrApp, P).
The output will be a first placement for the application described in
app.pl
onto the infrastructure described ininfra.pl
. E.g.%7,955 inferences, 0.000 CPU in 0.006 seconds (0% CPU, Infinite Lips) P = [on(vrDriver, accesspoint9), on(sceneSelector, cabinetserver0), on(videoStorage, cloud0)]
-
Open the file
infra.pl
and change some of the links or nodes involved in the placement output at step 3. E.g.node(cloud0,[ubuntu, mySQL, gcc, make], inf, []). --> node(cloud0,[], inf, []).
-
Repeat step 3. The output will only compute a new placement for suffering services (i.e. mapped onto overloaded nodes, or relying upon saturated end-to-end links for interacting with other services) and require many less inferences with respect to computing the initial placement. E.g.
2 ?- fogBrain(vrApp,P). % 387 inferences, 0.000 CPU in 0.000 seconds (0% CPU, Infinite Lips) P = [on(videoStorage, cloud1), on(vrDriver, accesspoint9), on(sceneSelector, cabinetserver0)]
In this example the new placement is computed by saving around 95% of inferences with respect to the first deployment.