All Projects → di-unipi-socc → FogTorchPI

di-unipi-socc / FogTorchPI

Licence: MIT license
A probabilistic prototype for deployment of Fog applications.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to FogTorchPI

speed-cloudflare-cli
📈 Measure the speed and consistency of your internet connection using speed.cloudflare.com
Stars: ✭ 99 (+421.05%)
Mutual labels:  latency, bandwidth
Comcast
Simulating shitty network connections so you can build better systems.
Stars: ✭ 7,703 (+40442.11%)
Mutual labels:  latency, bandwidth
tiller-circleci-orb
Deploy Trellis, Bedrock and Sage(optional) via CircleCI
Stars: ✭ 13 (-31.58%)
Mutual labels:  deployment
capistrano-docker-compose
Docker Compose specific tasks for Capistrano
Stars: ✭ 17 (-10.53%)
Mutual labels:  deployment
ansible-rails-deployment
deploy projects using ansible
Stars: ✭ 77 (+305.26%)
Mutual labels:  deployment
infracost-gh-action
GitHub Action for Infracost. Shows cloud cost estimates for Terraform in pull requests.
Stars: ✭ 119 (+526.32%)
Mutual labels:  cost-estimation
ml api covid
This is the API Code for my tutorial article. It paints a picture for developing a machine learning Python API from start to finish and provides help in more difficult areas like the setup with AWS Lambda.
Stars: ✭ 21 (+10.53%)
Mutual labels:  deployment
GOMC
GOMC - GPU Optimized Monte Carlo is a parallel molecular simulation code designed for high-performance simulation of large systems
Stars: ✭ 41 (+115.79%)
Mutual labels:  monte-carlo-simulation
latenz
JavaScript HTTP latency analyzer
Stars: ✭ 18 (-5.26%)
Mutual labels:  latency
fastai-docker-deploy
Deploy fastai models with Docker
Stars: ✭ 19 (+0%)
Mutual labels:  deployment
firebase-ci
Simplified Firebase interaction for continuous integration
Stars: ✭ 71 (+273.68%)
Mutual labels:  deployment
drupal-pi
Drupal on Docker on a Raspberry Pi. Pi Dramble's little brother.
Stars: ✭ 92 (+384.21%)
Mutual labels:  deployment
PySDM
Pythonic particle-based (super-droplet) warm-rain/aqueous-chemistry cloud microphysics package with box, parcel & 1D/2D prescribed-flow examples in Python, Julia and Matlab
Stars: ✭ 26 (+36.84%)
Mutual labels:  monte-carlo-simulation
portainer-stack-utils
CLI client for Portainer
Stars: ✭ 66 (+247.37%)
Mutual labels:  deployment
FogBus
[JSS'19] A Blockchain-based Lightweight Framework for Edge and Fog Computing
Stars: ✭ 28 (+47.37%)
Mutual labels:  fog-computing
mpiPyMC
A python based, MPI enabled, Monte-Carlo calculation of 2D system using Metropolis algorithm.
Stars: ✭ 20 (+5.26%)
Mutual labels:  monte-carlo-simulation
feater
Tool for rapid deployment of selected features of your web application to isolated testing or demo environments.
Stars: ✭ 27 (+42.11%)
Mutual labels:  deployment
github-env-vars-action
🚀 GitHub Action for Environment Variables
Stars: ✭ 129 (+578.95%)
Mutual labels:  deployment
deployment-status
GitHub action for updating deployments with status events.
Stars: ✭ 24 (+26.32%)
Mutual labels:  deployment
strapi-plugin-vercel
▲ Strapi plugin for Vercel Platform
Stars: ✭ 28 (+47.37%)
Mutual labels:  deployment

A tool for probabilistic QoS-assurance and resource consumption estimation of eligible deployments of Fog applications.

Note: the newest and extended version of FogTorchΠ which estimates monthly deployment cost and runs multiple threads to perform the MonteCarlo simulation is available here.

A complete overview of FogTorchΠ and of the usefulness of predictive analysis to perform Fog application deployment can be found here:

Antonio Brogi, Stefano Forti, Ahmad Ibrahim
Predictive Analysis to Support Fog Application Deployment
in Fog and Edge Computing: Principles and Paradigms, Rajkumar Buyya and Satish N. Srirama (eds.),
Wiley, 2019.

FogTorchΠ is based upon the work described in:

Antonio Brogi, Stefano Forti, Ahmad Ibrahim
How to best deploy your Fog applications, probably.
in Proceedings of the 1st IEEE International Conference on Fog and Edge Computing (ICFEC’2017),
O. Rana, R. Buyya, and A. Anjum, Eds., 2017, May 2017, Madrid, Spain.

The cost model exploited by the tool is described in

Antonio Brogi, Stefano Forti, Ahmad Ibrahim
Deploying Fog applications: How much does it cost, by the way?
in Proceedings of the 8th International Conference on Cloud Computing and Services Science (CLOSER’18),
March 2018, Funchal, Madeira, Portugal.

If you wish to reuse source code in this repo, please consider citing the above mentioned articles.

More details about the theoretical model used by FogTorchΠ can be found in:

Antonio Brogi and Stefano Forti
QoS-aware Deployment of IoT Applications Through the Fog.
in IEEE Internet of Things Journal , vol. 4, no. 5, pp. 1185-1192, Oct. 2017.

Other FogTorchΠ Projects

FogTorchΠ has been also extended and used to simulate mobile task offloading in the context of Edge, as described in

  • Vincenzo De Maio and Ivona Brandic. "First Hop Mobile Offloading of DAG Computations.", to appear in CCGRID'18. Code.

Intro

FogTorchΠ is an open source prototype, developed in Java, based on a model for Fog computing infrastructures and applications.

It takes into account non-functional parameters within the model (i.e., hardware, software, latency and bandwidth) to determine, compare and contrast different eligible deployments of a given application over a Fog infrastructure.

In the case of hardware capabilities, it considers CPU cores, RAM and storage available at a given node or required by a given software component.

Software capabilities are represented by a list of software names (operating system, programming languages, frameworks etc).

It considers latency, and both download and upload bandwidths as QoS attributes. Latency is measured in milliseconds (ms), while bandwidth is given in Megabits per second (Mbps).

Quick User Guide

FogTorchΠ can be run by importing the project in any IDE (e.g., NetBeans or Eclipse).

To start with FogTorchΠ, simply create a main file and declare a new Fog infrastructure and application:

Infrastructure I = new Infrastructure();
Application A = new Application();

Starting by the infrastructure, one can add Fog and Cloud nodes (which are assumed to have unbounded hardware capabilities) as shown below:

// parameters: node_id, software capabilities, latitude, longitude
I.addCloudDatacentre("cloud1", asList("linux", "php", "mySQL", "python"), 52.195097, 3.0364791);
I.addCloudDatacentre("cloud2", asList("linux", "php", "mySQL", "java"), 44.123896, -122.781555);
// parameters: node_id, software capabilities, hardware capabilities latitude, longitude
I.addFogNode("fog1", asList("linux", "php", "mySQL"), new Hardware(2, 2, 32), 43.740186, 10.364619);
I.addFogNode("fog2", asList("linux", "php"), new Hardware(2, 2, 32), 43.7464449, 10.4615923);
I.addFogNode("fog3", asList("linux", "mySQL"), new Hardware(4,2,64), 43.7381285, 10.4552213);

Communication links in the infrastructure are instantiated by specifying (or by sampling) their QoS profile in terms of latency and bandwidth. In the main file, one can specify a sampling function, for instance:

//Bernoulli sampling function.
public static Random rnd = new Random();
public static QoSProfile samplingFunction(double probability, QoSProfile q1, QoSProfile q2) {
    double rand = rnd.nextDouble();
    if (probability == 1) {
        return q1;
    }
    if (rand < probability) {
        return q1;
    } else {
        return q2;
    }
}

Then, links are added to the infrastructure as shown in the (partial) example below.

// QoSprofile(int latency, double bandwidth)
QoSProfile fogtoCloudDownload = samplingFunction(0.98, new QoSProfile(40, 10.5), new QoSProfile(Integer.MAX_VALUE, 0.0));
QoSProfile fogtoCloudUpload = samplingFunction(0.98, new QoSProfile(40, 4.5), new QoSProfile(Integer.MAX_VALUE, 0.0));
// parameters: endpoint1, endpoint2, bandwidth2->1, bandwidth1->2
I.addLink("fog1", "cloud1", fogtoCloudDownload, fogtoCloudUpload);
I.addLink("fog1", "cloud2", fogtoCloudDownload, fogtoCloudUpload);

Things to the infrastructure are added as follows:

//parameters: thing_id, type, latitude, longitude, directly connected Fog node
I.addThing("water0", "water", 43.7464449, 10.4615923, "fog1");
            I.addThing("video0", "video", 43.7464449, 10.4615923, "fog1");
            I.addThing("moisture0", "moisture", 43.7464449, 10.4615923, "fog1");
            I.addThing("temperature0", "temperature", 43.7464449, 10.4615923, "fog3");

Now let's go back to the application. Suppose component A requires to exploit some Things in the infrastructure. We specify them as:

//parameters: identifier, type, latitude, longitude, directly connected Fog node
ArrayList<ThingRequirement> neededThings = new ArrayList<>();
//parameters: thing_id, needed fog-to-thing QoS, needed thing-to-Fog QoS
neededThings.add(new ExactThing("moisture0", new QoSProfile(500,0.1), new QoSProfile(500, 0.1))); // 0.5 s and 1 Mbps
neededThings.add(new ExactThing("temperature0", new QoSProfile(65,0.1), new QoSProfile(65, 0.1))); // 110 ms and 1 Mbps

And then component A is specified as follows (with other components).

//parameters: id, software requirements, hardware requirements, (neededThingsList)*
A.addComponent("A", asList("linux"), new Hardware(1, 1.2, 8), neededThings);
A.addComponent("B", asList("linux", "mySQL"), new Hardware(1, Bram, Bstorage)); //cores ram storage
A.addComponent("C", asList("linux", "php"), new Hardware(2, 0.7, 4));

Links in between components are specified as:

//parameters: endpoint1, endpoint2, latency, bandwidth2->1, bandwidth1->2
A.addLink("A", "B", 160, 0.5, 3.5);
A.addLink("A", "C", 140, 0.4, 1.1);
A.addLink("B", "C", 100, 0.8, 1);

To look for eligible deployments of A over I, the class java Search is instantiated, adding (if needed) the list of nodes upon which a component can be deployed (i.e., business policies).

//parameters: id, software requirements, hardware requirements, (neededThingsList)*
Search s = new Search(A, I);
s.addBusinessPolicies("C", asList("cloud2", "cloud1"));

Finally, to start the search:

s.findDeployments(true); // true is to perform exhaustive search instead of heuristics

To repeat FogTorchΠ execution and perform Monte Carlo simulations, one may simply insert the previous code in the for-loop of our class Main.java. The output is a CSV file where each line represents an eligible deployment along with its QoS-assurance, average position in the list of returned deployment ( heuristic rank ), consumed RAM and storage in the Fog layer, sum of the last two.

Deployment, QoS-assurance, Heuristic Rank, Consumed RAM, Consumed HDD, Sum Hardware
[A->fog2][B->cloud2][C->cloud1];99.122;54.75732778;0.2;0.0625;0.13125
[A->fog2][B->cloud2][C->cloud2];99.122;59.73526667;0.2;0.0625;0.13125
[A->fog2][B->cloud1][C->cloud2];99.122;44.80145;0.2;0.0625;0.13125
[A->fog2][B->cloud1][C->cloud1];99.122;39.82351111;0.2;0.0625;0.13125
[A->fog3][B->cloud1][C->fog2];99.122;94.14406111;0.316666667;0.09375;0.205208333
[A->fog2][B->cloud2][C->fog2];99.122;49.77938889;0.316666667;0.09375;0.205208333
[A->fog3][B->cloud2][C->fog2];99.122;99.122;0.316666667;0.09375;0.205208333
[A->fog2][B->cloud1][C->fog2];99.122;34.84557222;0.316666667;0.09375;0.205208333
[A->fog1][B->cloud2][C->fog2];95.191;76.1528;0.316666667;0.09375;0.205208333
[A->fog1][B->cloud1][C->fog2];95.191;71.39325;0.316666667;0.09375;0.205208333
[A->fog2][B->fog3][C->cloud2];99.122;29.86763333;0.366666667;0.125;0.245833333
[A->fog2][B->fog3][C->cloud1];99.122;24.88969444;0.366666667;0.125;0.245833333
[A->fog2][B->fog3][C->fog1];100;20.35075556;0.483333333;0.15625;0.319791667
[A->fog1][B->fog3][C->fog2];100;70.34964444;0.483333333;0.15625;0.319791667
[A->fog1][B->fog3][C->fog1];100;65.26195556;0.483333333;0.15625;0.319791667
[A->fog2][B->fog3][C->fog2];100;15.26306667;0.483333333;0.15625;0.319791667
[A->fog2][B->fog1][C->fog1];100;10.17537778;0.483333333;0.15625;0.319791667
[A->fog2][B->fog1][C->fog2];100;5.087688889;0.483333333;0.15625;0.319791667
[A->fog3][B->fog1][C->fog2];100;90.04412222;0.483333333;0.15625;0.319791667
[A->fog3][B->fog1][C->fog1];100;84.95643333;0.483333333;0.15625;0.319791667

To specify upon which Fog nodes QoS-assurance and resources consumption are evaluated, it is sufficient to add the line:

s.addKeepLightNodes(asList("fog1", "fog2"));

Example

A full example is in file Main.java and related results can be found in resultsplotwithHD.xlsx.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].