SlideShare a Scribd company logo
1 of 24
Download to read offline
Designing Resource-Aware Applications
for the Cloud with ABS
Einar Broch Johnsen
University of Oslo, Norway
einarj@ifi.uio.no
1st Intl. Workshop on Formal Methods for and on the Cloud (iFMCloud)
Reykjavik, Iceland, 04 June 2016
http://www.envisage-project.eu
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 0 / 22
We want to make e↵ective use of cloud computing
to meet service requirements
Cloud API
Application
Service
I Virtualization makes elastic
amounts of resources available to
application-level services
I Metered resources: Resources on
the Cloud are pay-on-demand
I Services need to share and scale
resources
I Digitalization: new services need
to share resources with old services
Discovering bad resource management after deployment
on the Cloud can be a very costly (wasting both time and money!)
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 1 / 22
Services deployed on the cloud:
Predicting behavior from models
ApplicationServer
DC4
DC3
CalcServerDC2
CalcServer
DC1
CalcServer
AppWorkflow
CloudProvider
Invoke task
# of VM
Total Cost
Application Server
=
Application Workflow
+
Application Resource Management
(load balancing, scalability)
CalcServer
=
Independent tasks
(can be parallelized)
AppRM
I Resource-aware design:
Build software that can
dynamically modify
its own deployment
to improve perfor-
mance and/or
reduce cost
I Model-based deployment decisions at design time using service models
I Formal semantics: Architects and developers can simulate and analyze at
design time how an application runs on the cloud
H¨ahnle, Johnsen. Designing Resource-Aware Cloud Applications. IEEE Computer 48(6), 2015
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 2 / 22
What kind of questions can we answer using models?
Berndnaut Smilde: Nimbus II, 2012
Model-based analysis of
performance vs. cost
1 How will the response time and cost of running my system change
if I double the number of servers?
2 Can I meet my performance requirements with my current
deployment strategy? What about fluctuations in client tra c?
3 Can I control the performance of my system better by using a
custom resource manager?
Use the model to
predict behavior
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 3 / 22
Conceptual Parts of a Deployed Cloud Service
Provisioning Layer
Legal Contract Layer
Formal Service Contract
Executable Model of Client Layer
Cloud API
Simulation
“early modeling”
Formal Methods
“early analysis”
Provisioning
“runtime monitoring”
Combine techniques based on abstract executable models
I Formal modeling using Abstract Behavioral Specifications (ABS)
I Formal methods: Verification, Performance Analysis, Cost Analysis,
Advanced Type Systems, Code Generation, Test-Case Generation
I Monitoring: Framework to generate monitors for SLA-compliance
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 4 / 22
Example: Phone Services - Abstract Behavioral Model
Telephone Service
interface TelephoneService {
Unit call(Int calltime);
}
class TelephoneServer implements TelephoneService {
Int callcount = 0;
Unit call(Int calltime){
while (calltime > 0) { [Cost: 1] calltime = calltime 1;
await duration(1, 1); }
callcount = callcount + 1;
}
}
SMS Service
interface SMSService {
Unit sendSMS();
}
class SMSServer implements SMSService {
Int smscount = 0;
Unit sendSMS() {[Cost: 1] smscount = smscount + 1;}
}
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 5 / 22
Example: The New Year’s Eve Client Behavior
50 70
Alternate
sms and call
Huge number of
sms per time interval
time
Alternate
sms and call
Midnight Window
class NYEclient(Int frequency,TelephoneService ts,SMSService smss){
Time created=now(); Bool call=false;
Unit normalBehavior(){ ... }
Unit midnightWindow(){ ... } // Switch at appropriate time...
}
{// Main block:
DC smscomp = new DeploymentComponent(”smscomp”, Speed(50));
DC telcomp = new DeploymentComponent(”telcomp”, Speed(50));
[DC: smscomp] SMSService sms = new SMSServer();
[DC: telcomp] TelephoneService tel = new TelephoneServer();
Client c = new NYEbehavior(1,tel,sms); ... // Clients
}
How to deploy
the services?
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 6 / 22
Example: Simulation Results
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 7 / 22
Load Balancing in Deployment Scenarios
smscomp
telcomp
Client
Client
sms()
call(n)
sms()
call(n)
tel
sms
telb
smsb
request()
Resource awareness: resource reallocation, object mobility, job distribution
I dc.load(e): average load on dc during the last e time intervals
I dc.total(): currently allocated resources on dc
I dc.transfer(dc2, r): transfer r resources to dc2
Load Balancing Strategy for the Phone Services
Example: Reallocate 1/2⇥total resources upon request from partner
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 8 / 22
Example: Simulation Results
Johnsen, Owe, Schlatte, Tapia Tarifa:
Dynamic Resource Reallocation between Deployment Components. Proc. ICFEM 2010
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 9 / 22
ABS: Abstract Behavioral Specification
ABS: Between design-oriented and implementation-oriented specification
I State-of-the-art modeling language: actors + OO
I Models follow the execution flow of OO programs,
but abstract from implementation details using ADTs
I ABS allows time modeling and deployment modeling
I Java-like syntax: intuitive to the programmer
ABS is a formal, tool-supported modelling language
I Operational semantics allows advanced analysis techniques
I Simulation tool for rapid prototyping
I Automated worst-case resource and deadlock analysis
I Automated optimization of static deployment
I Semi-automated scalable verification of functional correctness (KeY)
I Code generation into Java and Haskell (preserves cost bounds)
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 10 / 22
Deployment Components
Deployment components are abstract execution locations
I Each deployment
component has a given
resource capacity
I Objects execute in the
context of a deployment
component
Server ...
...
objectEnv
[cost] Task1
[cost] Task2
object 1
[cost] Task1
[cost] Task2
object n
[cost] Task1
[cost] Task2
I The resources are shared between the component’s objects
I Object execution uses resources in a deployment component
(via Cost annotations)
I How resources are assigned and consumed,
depends on the kind of resource
Johnsen, Schlatte, Tapia Tarifa. Integrating deployment architectures and resource consumption
in timed object-oriented models. J. Log. Algebr. Meth. Program. 84(1), 2015
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 11 / 22
A Resource-Aware Application in ABS
interface CalcServer {
Unit process(Int cost);
DC getDC();
}
class Server implements CalcServer {
Unit process(Int cost) { [Cost: cost] skip; }
DC getDC() { return thisDC(); }
}
interface ApplicationServer {
Bool request(Int cost);
}
ApplicationServer
DC4
DC3
CalcServerDC2
CalcServer
DC1
CalcServer
AppWorkflow
CloudProvider
Invoke task
# of VM
Total Cost
Application Server
=
Application Workflow
+
Application Resource Management
(load balancing, scalability)
CalcServer
=
Independent tasks
(can be parallelized)
AppRM
class ConstantBalancer(CloudProvider provider, Int serverSize) implements ApplicationServer {
Server server; DC dc; Bool initialized = False;
Unit run() {
Fut<DC> f = provider!createMachine(serverSize); await f?; dc = f.get;
[DC: dc] server = new Server(); initialized = True;
}
Bool request (Int cost) {
await initialized;
Fut<Unit> r = server!process(cost); await r?; return (durationValue(deadline()) > 0);
}
}
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 12 / 22
A Resource-Aware Application in ABS
interface CalcServer {
Unit process(Int cost);
DC getDC();
}
class Server implements CalcServer {
Unit process(Int cost) { [Cost: cost] skip; }
DC getDC() { return thisDC(); }
}
interface ApplicationServer {
Bool request(Int cost);
}
ApplicationServer
DC4
DC3
CalcServerDC2
CalcServer
DC1
CalcServer
AppWorkflow
CloudProvider
Invoke task
# of VM
Total Cost
Application Server
=
Application Workflow
+
Application Resource Management
(load balancing, scalability)
CalcServer
=
Independent tasks
(can be parallelized)
AppRM
class DynamicBalancer(CloudProvider provider) implements ApplicationServer {
Map<Int, Set<Server>> sleepingMachines = EmptyMap;
Int machineStartTime = ... // a constant representing the time it takes to start a machine;
Bool request (Int cost) {
Int requiredResources = (cost / durationValue(deadline())) + 1 + machineStartTime;
Server server = this.getMachine(requiredResources);
Fut<Unit> r = server!process(cost); await r?;
this.dropMachine(server); return durationValue(deadline()) > 0;
}
Server getMachine(Int size) { ... } // take machine of size if it exists, otherwise create one
Unit dropMachine(Server server) { ...}
}
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 12 / 22
Rapid Prototyping: Simulation Results
I Define client behavior
to model a load spike
time
Increase the # of requests
I Simulate the di↵erent scenarios with ABS simulator
User scenario
Load spike
Strategy QoS Total Cost
Constant balancer 53% 200
As-needed balancer 100% 128
I QoS: measure the successful requests (i.e., requests completed within
the deadline) divided by the total number of requests
I Total Cost: measures the accumulated sum of CPU resources made
available by the cloud provider.
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 13 / 22
Case Study: Montage (1)
Montage is a toolkit for assembling astronomical
images into customized mosaics
mProject
mProjExec
mImgtbl mOverlaps
mDiffExec
mDiff
mFitExec
mFitplane
mBgModel
mBackground
mBgExec
mAdd
Re-project
Image
Background
modeling
Background
matching
Final
mosaic
Partly ordered workflow and highly parallelizable tasks.
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 14 / 22
Case Study: Montage (2)
DC4
DC3
CalcServerDC2
CalcServer
DC1
CalcServer
CloudProvider
Invoke task
ApplicationServer
=
AppWorkflow + AppRM
CalcServer
=
Independent tasks
# of VM
Total Cost
ApplicationServer
AppWorkflow
AppRM
Model the Montage toolkit using the Cloud Provider API, run simulations
varying the di↵erent deployment scenario and compare the results.
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 15 / 22
Case Study: Montage (3)
Cost vs. Time Tradeo↵: can we reproduce the results
of other informal cloud simulation tools (GridSim)?
!"
!#"
!##"
!###"
!####"
!" $" %" &" !'" ($" '%" !$&"
!"
#$"
$!"
%$"
&!!"
&" #" '" (" &)" *#" )'" &#("
Logarithmicscale
60 cents for
1 processor
Logarithmicscale
approx 4 $ for
128 processors
approx 5.5 hrs
for 1 processor
approx 18 min for
128 processors
432
270
1152
CPUCost
89
2
8
Time
The cost of doing science on the cloud: The Montage example.
E. Deelman, G. Singh, M. Livny, G. B. Berriman, and J. Good.
(SC’08), pages 1–12. IEEE/ACM, 2008.
Johnsen, Schlatte, Tapia Tarifa. Modeling Resource-Aware Virtualized Applications for the
Cloud in Real-Time ABS. Proc. ICFEM 2012
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 16 / 22
Case Study: Fredhopper Replication Server (1)
The Fredhopper Access Server (FAS) is a distributed, concurrent OO
system providing search and merchandising services to e-Commerce
companies. The Replication Server is one part of FAS.
Acceptor
Cloud
Provider
ClientJob
ClientJob
ClientJob
SyncClient
job(schedule)
SyncClient
SyncClient...
...
LIVE STAGING
SyncServer create()
CLOUD
DC4
Connection
Thread
getConnection(schedule)
getConnection(schedule)
getConnection(schedule)
job(schedule)
job(schedule)
DC3
Connection
Thread
replication
DC2
Connection
Thread
replication
DC1
Connection
Thread
replication
I Very detailed model: consists of 5000 lines of ABS
Albert, de Boer, H¨ahnle, Johnsen, Schlatte, Tapia Tarifa, Wong.
Formal modeling and analysis of resource management for cloud architectures: an industrial
case study using Real-Time ABS. Service Oriented Computing and Applications 8(4), 2014
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 17 / 22
Case Study: Fredhopper Replication Server (2)
How does the accumulated cost in our model
compare to the actual Java implementation?
0
17.5
35
52.5
70
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
0
7500
15000
22500
30000
Runningtime[s]
Environments
Simulationcost
Model simulation cost Implementation running time
Measured execution time of the implementation (left scale)
Accumulated cost of the simulation (right scale)
The deviation roughly seems to correspond to the start-up time of JVM
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 18 / 22
Case Study: Hadoop YARN Clusters (1)
Open-source software framework that
implements a cluster management
technology for distributed processing.
Popular cloud framework
for big data processing:
I Resource allocation
I Code distribution
I Distributed data processing
Lin, Yu, Johnsen, Lee. ABS-YARN: A Formal Framework
for Modeling Hadoop YARN Clusters. Proc. FASE 2016
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 19 / 22
Case Study: Hadoop YARN Clusters (2)
How does the ABS YARN compare to the actual YARN implementation?
(a) The normalized starting time (b) The normalized finish time
(c) Cumulative completed jobs (d) Total number of completed jobs
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 20 / 22
The ABS Collaboratory
I ABS as a web service, with documentation and examples
under development at http://www.abs-models.org
I Tools are open source: https://github.com/abstools
I ABS API available for orchestration of Java code
I Eclipse plug-in for ABS
Get involved!
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 21 / 22
Summary
Virtualization requires novel modeling abstractions
Executable models, deployment components, reflection
ABS: Abstract Behavioral Specification
I Model deployed services with dynamic resource management
I High-level abstractions of low-level platform-specific concerns
I Analysis methods: performance, cost analysis, deadlock analysis, . . .
I More info and open source tools:
www.abs-models.org
Make your deployment decisions at design time!
ABS permits concise modeling and accurate prediction
Engineering Virtualized Services
[www.envisage-project.eu]
Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 22 / 22

More Related Content

What's hot

Optimizing Total Cost of Ownership for the AWS Cloud
Optimizing Total Cost of Ownership for the AWS CloudOptimizing Total Cost of Ownership for the AWS Cloud
Optimizing Total Cost of Ownership for the AWS CloudAmazon Web Services
 
Optimizing Total Cost of Ownership for the AWS Cloud
Optimizing Total Cost of Ownership for the AWS CloudOptimizing Total Cost of Ownership for the AWS Cloud
Optimizing Total Cost of Ownership for the AWS CloudAmazon Web Services
 
2016 Utah Cloud Summit: TCO & Cost Optimization
2016 Utah Cloud Summit: TCO & Cost Optimization2016 Utah Cloud Summit: TCO & Cost Optimization
2016 Utah Cloud Summit: TCO & Cost Optimization1Strategy
 
Optimizing for Cost in the AWS Cloud - 5 Ways to Further Save - AWS Summit 20...
Optimizing for Cost in the AWS Cloud - 5 Ways to Further Save - AWS Summit 20...Optimizing for Cost in the AWS Cloud - 5 Ways to Further Save - AWS Summit 20...
Optimizing for Cost in the AWS Cloud - 5 Ways to Further Save - AWS Summit 20...Amazon Web Services
 
AWS Webcast - Total Cost of (Non) Ownership
AWS Webcast - Total Cost of (Non) Ownership  AWS Webcast - Total Cost of (Non) Ownership
AWS Webcast - Total Cost of (Non) Ownership Amazon Web Services
 
Cost Optimization on AWS - Pop-up Loft Tel Aviv
Cost Optimization on AWS - Pop-up Loft Tel AvivCost Optimization on AWS - Pop-up Loft Tel Aviv
Cost Optimization on AWS - Pop-up Loft Tel AvivAmazon Web Services
 
Managing Amazon AWS Costs
Managing Amazon AWS CostsManaging Amazon AWS Costs
Managing Amazon AWS CostsJoe Kinsella
 
Optimizing Costs and Efficiency of AWS Services
Optimizing Costs and Efficiency of AWS ServicesOptimizing Costs and Efficiency of AWS Services
Optimizing Costs and Efficiency of AWS ServicesAmazon Web Services
 
Reducing Cost & Maximizing Efficiency: Tightening the Belt on AWS (CPN211) | ...
Reducing Cost & Maximizing Efficiency: Tightening the Belt on AWS (CPN211) | ...Reducing Cost & Maximizing Efficiency: Tightening the Belt on AWS (CPN211) | ...
Reducing Cost & Maximizing Efficiency: Tightening the Belt on AWS (CPN211) | ...Amazon Web Services
 
Optimizing Your AWS Applications and Usage to Reduce Costs
Optimizing Your AWS Applications and Usage to Reduce CostsOptimizing Your AWS Applications and Usage to Reduce Costs
Optimizing Your AWS Applications and Usage to Reduce CostsAmazon Web Services
 
This One Weird API Request Will Save You Thousands
This One Weird API Request Will Save You ThousandsThis One Weird API Request Will Save You Thousands
This One Weird API Request Will Save You ThousandsAmazon Web Services
 
Understand AWS Pricing
Understand AWS PricingUnderstand AWS Pricing
Understand AWS PricingLynn Langit
 
Enterprise Disaster Recovery Strategies by CloudEndure
Enterprise Disaster Recovery Strategies by CloudEndureEnterprise Disaster Recovery Strategies by CloudEndure
Enterprise Disaster Recovery Strategies by CloudEndureAmazon Web Services
 
getting started with amazon aurora
getting started with amazon auroragetting started with amazon aurora
getting started with amazon auroraAmazon Web Services
 
Getting Started with Amazon Redshift
Getting Started with Amazon RedshiftGetting Started with Amazon Redshift
Getting Started with Amazon RedshiftAmazon Web Services
 
APN Partner Webinar - Having Effective and Critical TCO Conversations
APN Partner Webinar - Having Effective and Critical TCO ConversationsAPN Partner Webinar - Having Effective and Critical TCO Conversations
APN Partner Webinar - Having Effective and Critical TCO ConversationsAmazon Web Services
 
Optimizing Your Infrastructure Costs on AWS
Optimizing Your Infrastructure Costs on AWSOptimizing Your Infrastructure Costs on AWS
Optimizing Your Infrastructure Costs on AWSAmazon Web Services
 

What's hot (20)

Optimizing Total Cost of Ownership for the AWS Cloud
Optimizing Total Cost of Ownership for the AWS CloudOptimizing Total Cost of Ownership for the AWS Cloud
Optimizing Total Cost of Ownership for the AWS Cloud
 
Optimizing Total Cost of Ownership for the AWS Cloud
Optimizing Total Cost of Ownership for the AWS CloudOptimizing Total Cost of Ownership for the AWS Cloud
Optimizing Total Cost of Ownership for the AWS Cloud
 
Cost Optimisation on AWS
Cost Optimisation on AWSCost Optimisation on AWS
Cost Optimisation on AWS
 
2016 Utah Cloud Summit: TCO & Cost Optimization
2016 Utah Cloud Summit: TCO & Cost Optimization2016 Utah Cloud Summit: TCO & Cost Optimization
2016 Utah Cloud Summit: TCO & Cost Optimization
 
Optimizing for Cost in the AWS Cloud - 5 Ways to Further Save - AWS Summit 20...
Optimizing for Cost in the AWS Cloud - 5 Ways to Further Save - AWS Summit 20...Optimizing for Cost in the AWS Cloud - 5 Ways to Further Save - AWS Summit 20...
Optimizing for Cost in the AWS Cloud - 5 Ways to Further Save - AWS Summit 20...
 
AWS Webcast - Total Cost of (Non) Ownership
AWS Webcast - Total Cost of (Non) Ownership  AWS Webcast - Total Cost of (Non) Ownership
AWS Webcast - Total Cost of (Non) Ownership
 
Cost Optimization at Scale
Cost Optimization at ScaleCost Optimization at Scale
Cost Optimization at Scale
 
Cost Optimization on AWS - Pop-up Loft Tel Aviv
Cost Optimization on AWS - Pop-up Loft Tel AvivCost Optimization on AWS - Pop-up Loft Tel Aviv
Cost Optimization on AWS - Pop-up Loft Tel Aviv
 
Managing Amazon AWS Costs
Managing Amazon AWS CostsManaging Amazon AWS Costs
Managing Amazon AWS Costs
 
Optimizing Costs and Efficiency of AWS Services
Optimizing Costs and Efficiency of AWS ServicesOptimizing Costs and Efficiency of AWS Services
Optimizing Costs and Efficiency of AWS Services
 
Reducing Cost & Maximizing Efficiency: Tightening the Belt on AWS (CPN211) | ...
Reducing Cost & Maximizing Efficiency: Tightening the Belt on AWS (CPN211) | ...Reducing Cost & Maximizing Efficiency: Tightening the Belt on AWS (CPN211) | ...
Reducing Cost & Maximizing Efficiency: Tightening the Belt on AWS (CPN211) | ...
 
Cost Optimization on AWS
Cost Optimization on AWSCost Optimization on AWS
Cost Optimization on AWS
 
Optimizing Your AWS Applications and Usage to Reduce Costs
Optimizing Your AWS Applications and Usage to Reduce CostsOptimizing Your AWS Applications and Usage to Reduce Costs
Optimizing Your AWS Applications and Usage to Reduce Costs
 
This One Weird API Request Will Save You Thousands
This One Weird API Request Will Save You ThousandsThis One Weird API Request Will Save You Thousands
This One Weird API Request Will Save You Thousands
 
Understand AWS Pricing
Understand AWS PricingUnderstand AWS Pricing
Understand AWS Pricing
 
Enterprise Disaster Recovery Strategies by CloudEndure
Enterprise Disaster Recovery Strategies by CloudEndureEnterprise Disaster Recovery Strategies by CloudEndure
Enterprise Disaster Recovery Strategies by CloudEndure
 
getting started with amazon aurora
getting started with amazon auroragetting started with amazon aurora
getting started with amazon aurora
 
Getting Started with Amazon Redshift
Getting Started with Amazon RedshiftGetting Started with Amazon Redshift
Getting Started with Amazon Redshift
 
APN Partner Webinar - Having Effective and Critical TCO Conversations
APN Partner Webinar - Having Effective and Critical TCO ConversationsAPN Partner Webinar - Having Effective and Critical TCO Conversations
APN Partner Webinar - Having Effective and Critical TCO Conversations
 
Optimizing Your Infrastructure Costs on AWS
Optimizing Your Infrastructure Costs on AWSOptimizing Your Infrastructure Costs on AWS
Optimizing Your Infrastructure Costs on AWS
 

Similar to Designing Resource-Aware Applications for the Cloud with ABS

Deep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSDeep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSAmazon Web Services
 
A Review: Metaheuristic Technique in Cloud Computing
A Review: Metaheuristic Technique in Cloud ComputingA Review: Metaheuristic Technique in Cloud Computing
A Review: Metaheuristic Technique in Cloud ComputingIRJET Journal
 
Energy Efficient Heuristic Base Job Scheduling Algorithms in Cloud Computing
Energy Efficient Heuristic Base Job Scheduling Algorithms in Cloud ComputingEnergy Efficient Heuristic Base Job Scheduling Algorithms in Cloud Computing
Energy Efficient Heuristic Base Job Scheduling Algorithms in Cloud ComputingIOSRjournaljce
 
Load Balancing in Auto Scaling Enabled Cloud Environments
Load Balancing in Auto Scaling Enabled Cloud EnvironmentsLoad Balancing in Auto Scaling Enabled Cloud Environments
Load Balancing in Auto Scaling Enabled Cloud Environmentsneirew J
 
LOAD BALANCING IN AUTO SCALING-ENABLED CLOUD ENVIRONMENTS
LOAD BALANCING IN AUTO SCALING-ENABLED CLOUD ENVIRONMENTSLOAD BALANCING IN AUTO SCALING-ENABLED CLOUD ENVIRONMENTS
LOAD BALANCING IN AUTO SCALING-ENABLED CLOUD ENVIRONMENTSijccsa
 
Performance Improvement of Cloud Computing Data Centers Using Energy Efficien...
Performance Improvement of Cloud Computing Data Centers Using Energy Efficien...Performance Improvement of Cloud Computing Data Centers Using Energy Efficien...
Performance Improvement of Cloud Computing Data Centers Using Energy Efficien...IJAEMSJORNAL
 
An Enhanced Throttled Load Balancing Approach for Cloud Environment
An Enhanced Throttled Load Balancing Approach for Cloud EnvironmentAn Enhanced Throttled Load Balancing Approach for Cloud Environment
An Enhanced Throttled Load Balancing Approach for Cloud EnvironmentIRJET Journal
 
A Strategic Evaluation of Energy-Consumption and Total Execution Time for Clo...
A Strategic Evaluation of Energy-Consumption and Total Execution Time for Clo...A Strategic Evaluation of Energy-Consumption and Total Execution Time for Clo...
A Strategic Evaluation of Energy-Consumption and Total Execution Time for Clo...idescitation
 
Review and Comparison of Tasks Scheduling in Cloud Computing
Review and Comparison of Tasks Scheduling in Cloud Computing   Review and Comparison of Tasks Scheduling in Cloud Computing
Review and Comparison of Tasks Scheduling in Cloud Computing ijfcstjournal
 
Virtual Machine Migration and Allocation in Cloud Computing: A Review
Virtual Machine Migration and Allocation in Cloud Computing: A ReviewVirtual Machine Migration and Allocation in Cloud Computing: A Review
Virtual Machine Migration and Allocation in Cloud Computing: A Reviewijtsrd
 
DCHEFT approach-for-task-scheduling-to-efficient-resource-allocation-in-cloud...
DCHEFT approach-for-task-scheduling-to-efficient-resource-allocation-in-cloud...DCHEFT approach-for-task-scheduling-to-efficient-resource-allocation-in-cloud...
DCHEFT approach-for-task-scheduling-to-efficient-resource-allocation-in-cloud...IJEACS
 
DYNAMIC ALLOCATION METHOD FOR EFFICIENT LOAD BALANCING IN VIRTUAL MACHINES FO...
DYNAMIC ALLOCATION METHOD FOR EFFICIENT LOAD BALANCING IN VIRTUAL MACHINES FO...DYNAMIC ALLOCATION METHOD FOR EFFICIENT LOAD BALANCING IN VIRTUAL MACHINES FO...
DYNAMIC ALLOCATION METHOD FOR EFFICIENT LOAD BALANCING IN VIRTUAL MACHINES FO...acijjournal
 
Shceduling iot application on cloud computing
Shceduling iot application on cloud computingShceduling iot application on cloud computing
Shceduling iot application on cloud computingEman Ahmed
 

Similar to Designing Resource-Aware Applications for the Cloud with ABS (20)

Deep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSDeep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECS
 
Scheduling in CCE
Scheduling in CCEScheduling in CCE
Scheduling in CCE
 
A Review: Metaheuristic Technique in Cloud Computing
A Review: Metaheuristic Technique in Cloud ComputingA Review: Metaheuristic Technique in Cloud Computing
A Review: Metaheuristic Technique in Cloud Computing
 
Webx 2010
Webx 2010Webx 2010
Webx 2010
 
Energy Efficient Heuristic Base Job Scheduling Algorithms in Cloud Computing
Energy Efficient Heuristic Base Job Scheduling Algorithms in Cloud ComputingEnergy Efficient Heuristic Base Job Scheduling Algorithms in Cloud Computing
Energy Efficient Heuristic Base Job Scheduling Algorithms in Cloud Computing
 
Load Balancing in Auto Scaling Enabled Cloud Environments
Load Balancing in Auto Scaling Enabled Cloud EnvironmentsLoad Balancing in Auto Scaling Enabled Cloud Environments
Load Balancing in Auto Scaling Enabled Cloud Environments
 
LOAD BALANCING IN AUTO SCALING-ENABLED CLOUD ENVIRONMENTS
LOAD BALANCING IN AUTO SCALING-ENABLED CLOUD ENVIRONMENTSLOAD BALANCING IN AUTO SCALING-ENABLED CLOUD ENVIRONMENTS
LOAD BALANCING IN AUTO SCALING-ENABLED CLOUD ENVIRONMENTS
 
Colloquium Report
Colloquium ReportColloquium Report
Colloquium Report
 
D04573033
D04573033D04573033
D04573033
 
Performance Improvement of Cloud Computing Data Centers Using Energy Efficien...
Performance Improvement of Cloud Computing Data Centers Using Energy Efficien...Performance Improvement of Cloud Computing Data Centers Using Energy Efficien...
Performance Improvement of Cloud Computing Data Centers Using Energy Efficien...
 
An Enhanced Throttled Load Balancing Approach for Cloud Environment
An Enhanced Throttled Load Balancing Approach for Cloud EnvironmentAn Enhanced Throttled Load Balancing Approach for Cloud Environment
An Enhanced Throttled Load Balancing Approach for Cloud Environment
 
A Strategic Evaluation of Energy-Consumption and Total Execution Time for Clo...
A Strategic Evaluation of Energy-Consumption and Total Execution Time for Clo...A Strategic Evaluation of Energy-Consumption and Total Execution Time for Clo...
A Strategic Evaluation of Energy-Consumption and Total Execution Time for Clo...
 
Review and Comparison of Tasks Scheduling in Cloud Computing
Review and Comparison of Tasks Scheduling in Cloud Computing   Review and Comparison of Tasks Scheduling in Cloud Computing
Review and Comparison of Tasks Scheduling in Cloud Computing
 
C017531925
C017531925C017531925
C017531925
 
N1803048386
N1803048386N1803048386
N1803048386
 
Virtual Machine Migration and Allocation in Cloud Computing: A Review
Virtual Machine Migration and Allocation in Cloud Computing: A ReviewVirtual Machine Migration and Allocation in Cloud Computing: A Review
Virtual Machine Migration and Allocation in Cloud Computing: A Review
 
DCHEFT approach-for-task-scheduling-to-efficient-resource-allocation-in-cloud...
DCHEFT approach-for-task-scheduling-to-efficient-resource-allocation-in-cloud...DCHEFT approach-for-task-scheduling-to-efficient-resource-allocation-in-cloud...
DCHEFT approach-for-task-scheduling-to-efficient-resource-allocation-in-cloud...
 
DYNAMIC ALLOCATION METHOD FOR EFFICIENT LOAD BALANCING IN VIRTUAL MACHINES FO...
DYNAMIC ALLOCATION METHOD FOR EFFICIENT LOAD BALANCING IN VIRTUAL MACHINES FO...DYNAMIC ALLOCATION METHOD FOR EFFICIENT LOAD BALANCING IN VIRTUAL MACHINES FO...
DYNAMIC ALLOCATION METHOD FOR EFFICIENT LOAD BALANCING IN VIRTUAL MACHINES FO...
 
Shceduling iot application on cloud computing
Shceduling iot application on cloud computingShceduling iot application on cloud computing
Shceduling iot application on cloud computing
 
Presentation
PresentationPresentation
Presentation
 

Recently uploaded

Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 

Recently uploaded (20)

Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 

Designing Resource-Aware Applications for the Cloud with ABS

  • 1. Designing Resource-Aware Applications for the Cloud with ABS Einar Broch Johnsen University of Oslo, Norway einarj@ifi.uio.no 1st Intl. Workshop on Formal Methods for and on the Cloud (iFMCloud) Reykjavik, Iceland, 04 June 2016 http://www.envisage-project.eu Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 0 / 22
  • 2. We want to make e↵ective use of cloud computing to meet service requirements Cloud API Application Service I Virtualization makes elastic amounts of resources available to application-level services I Metered resources: Resources on the Cloud are pay-on-demand I Services need to share and scale resources I Digitalization: new services need to share resources with old services Discovering bad resource management after deployment on the Cloud can be a very costly (wasting both time and money!) Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 1 / 22
  • 3. Services deployed on the cloud: Predicting behavior from models ApplicationServer DC4 DC3 CalcServerDC2 CalcServer DC1 CalcServer AppWorkflow CloudProvider Invoke task # of VM Total Cost Application Server = Application Workflow + Application Resource Management (load balancing, scalability) CalcServer = Independent tasks (can be parallelized) AppRM I Resource-aware design: Build software that can dynamically modify its own deployment to improve perfor- mance and/or reduce cost I Model-based deployment decisions at design time using service models I Formal semantics: Architects and developers can simulate and analyze at design time how an application runs on the cloud H¨ahnle, Johnsen. Designing Resource-Aware Cloud Applications. IEEE Computer 48(6), 2015 Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 2 / 22
  • 4. What kind of questions can we answer using models? Berndnaut Smilde: Nimbus II, 2012 Model-based analysis of performance vs. cost 1 How will the response time and cost of running my system change if I double the number of servers? 2 Can I meet my performance requirements with my current deployment strategy? What about fluctuations in client tra c? 3 Can I control the performance of my system better by using a custom resource manager? Use the model to predict behavior Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 3 / 22
  • 5. Conceptual Parts of a Deployed Cloud Service Provisioning Layer Legal Contract Layer Formal Service Contract Executable Model of Client Layer Cloud API Simulation “early modeling” Formal Methods “early analysis” Provisioning “runtime monitoring” Combine techniques based on abstract executable models I Formal modeling using Abstract Behavioral Specifications (ABS) I Formal methods: Verification, Performance Analysis, Cost Analysis, Advanced Type Systems, Code Generation, Test-Case Generation I Monitoring: Framework to generate monitors for SLA-compliance Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 4 / 22
  • 6. Example: Phone Services - Abstract Behavioral Model Telephone Service interface TelephoneService { Unit call(Int calltime); } class TelephoneServer implements TelephoneService { Int callcount = 0; Unit call(Int calltime){ while (calltime > 0) { [Cost: 1] calltime = calltime 1; await duration(1, 1); } callcount = callcount + 1; } } SMS Service interface SMSService { Unit sendSMS(); } class SMSServer implements SMSService { Int smscount = 0; Unit sendSMS() {[Cost: 1] smscount = smscount + 1;} } Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 5 / 22
  • 7. Example: The New Year’s Eve Client Behavior 50 70 Alternate sms and call Huge number of sms per time interval time Alternate sms and call Midnight Window class NYEclient(Int frequency,TelephoneService ts,SMSService smss){ Time created=now(); Bool call=false; Unit normalBehavior(){ ... } Unit midnightWindow(){ ... } // Switch at appropriate time... } {// Main block: DC smscomp = new DeploymentComponent(”smscomp”, Speed(50)); DC telcomp = new DeploymentComponent(”telcomp”, Speed(50)); [DC: smscomp] SMSService sms = new SMSServer(); [DC: telcomp] TelephoneService tel = new TelephoneServer(); Client c = new NYEbehavior(1,tel,sms); ... // Clients } How to deploy the services? Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 6 / 22
  • 8. Example: Simulation Results Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 7 / 22
  • 9. Load Balancing in Deployment Scenarios smscomp telcomp Client Client sms() call(n) sms() call(n) tel sms telb smsb request() Resource awareness: resource reallocation, object mobility, job distribution I dc.load(e): average load on dc during the last e time intervals I dc.total(): currently allocated resources on dc I dc.transfer(dc2, r): transfer r resources to dc2 Load Balancing Strategy for the Phone Services Example: Reallocate 1/2⇥total resources upon request from partner Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 8 / 22
  • 10. Example: Simulation Results Johnsen, Owe, Schlatte, Tapia Tarifa: Dynamic Resource Reallocation between Deployment Components. Proc. ICFEM 2010 Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 9 / 22
  • 11. ABS: Abstract Behavioral Specification ABS: Between design-oriented and implementation-oriented specification I State-of-the-art modeling language: actors + OO I Models follow the execution flow of OO programs, but abstract from implementation details using ADTs I ABS allows time modeling and deployment modeling I Java-like syntax: intuitive to the programmer ABS is a formal, tool-supported modelling language I Operational semantics allows advanced analysis techniques I Simulation tool for rapid prototyping I Automated worst-case resource and deadlock analysis I Automated optimization of static deployment I Semi-automated scalable verification of functional correctness (KeY) I Code generation into Java and Haskell (preserves cost bounds) Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 10 / 22
  • 12. Deployment Components Deployment components are abstract execution locations I Each deployment component has a given resource capacity I Objects execute in the context of a deployment component Server ... ... objectEnv [cost] Task1 [cost] Task2 object 1 [cost] Task1 [cost] Task2 object n [cost] Task1 [cost] Task2 I The resources are shared between the component’s objects I Object execution uses resources in a deployment component (via Cost annotations) I How resources are assigned and consumed, depends on the kind of resource Johnsen, Schlatte, Tapia Tarifa. Integrating deployment architectures and resource consumption in timed object-oriented models. J. Log. Algebr. Meth. Program. 84(1), 2015 Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 11 / 22
  • 13. A Resource-Aware Application in ABS interface CalcServer { Unit process(Int cost); DC getDC(); } class Server implements CalcServer { Unit process(Int cost) { [Cost: cost] skip; } DC getDC() { return thisDC(); } } interface ApplicationServer { Bool request(Int cost); } ApplicationServer DC4 DC3 CalcServerDC2 CalcServer DC1 CalcServer AppWorkflow CloudProvider Invoke task # of VM Total Cost Application Server = Application Workflow + Application Resource Management (load balancing, scalability) CalcServer = Independent tasks (can be parallelized) AppRM class ConstantBalancer(CloudProvider provider, Int serverSize) implements ApplicationServer { Server server; DC dc; Bool initialized = False; Unit run() { Fut<DC> f = provider!createMachine(serverSize); await f?; dc = f.get; [DC: dc] server = new Server(); initialized = True; } Bool request (Int cost) { await initialized; Fut<Unit> r = server!process(cost); await r?; return (durationValue(deadline()) > 0); } } Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 12 / 22
  • 14. A Resource-Aware Application in ABS interface CalcServer { Unit process(Int cost); DC getDC(); } class Server implements CalcServer { Unit process(Int cost) { [Cost: cost] skip; } DC getDC() { return thisDC(); } } interface ApplicationServer { Bool request(Int cost); } ApplicationServer DC4 DC3 CalcServerDC2 CalcServer DC1 CalcServer AppWorkflow CloudProvider Invoke task # of VM Total Cost Application Server = Application Workflow + Application Resource Management (load balancing, scalability) CalcServer = Independent tasks (can be parallelized) AppRM class DynamicBalancer(CloudProvider provider) implements ApplicationServer { Map<Int, Set<Server>> sleepingMachines = EmptyMap; Int machineStartTime = ... // a constant representing the time it takes to start a machine; Bool request (Int cost) { Int requiredResources = (cost / durationValue(deadline())) + 1 + machineStartTime; Server server = this.getMachine(requiredResources); Fut<Unit> r = server!process(cost); await r?; this.dropMachine(server); return durationValue(deadline()) > 0; } Server getMachine(Int size) { ... } // take machine of size if it exists, otherwise create one Unit dropMachine(Server server) { ...} } Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 12 / 22
  • 15. Rapid Prototyping: Simulation Results I Define client behavior to model a load spike time Increase the # of requests I Simulate the di↵erent scenarios with ABS simulator User scenario Load spike Strategy QoS Total Cost Constant balancer 53% 200 As-needed balancer 100% 128 I QoS: measure the successful requests (i.e., requests completed within the deadline) divided by the total number of requests I Total Cost: measures the accumulated sum of CPU resources made available by the cloud provider. Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 13 / 22
  • 16. Case Study: Montage (1) Montage is a toolkit for assembling astronomical images into customized mosaics mProject mProjExec mImgtbl mOverlaps mDiffExec mDiff mFitExec mFitplane mBgModel mBackground mBgExec mAdd Re-project Image Background modeling Background matching Final mosaic Partly ordered workflow and highly parallelizable tasks. Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 14 / 22
  • 17. Case Study: Montage (2) DC4 DC3 CalcServerDC2 CalcServer DC1 CalcServer CloudProvider Invoke task ApplicationServer = AppWorkflow + AppRM CalcServer = Independent tasks # of VM Total Cost ApplicationServer AppWorkflow AppRM Model the Montage toolkit using the Cloud Provider API, run simulations varying the di↵erent deployment scenario and compare the results. Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 15 / 22
  • 18. Case Study: Montage (3) Cost vs. Time Tradeo↵: can we reproduce the results of other informal cloud simulation tools (GridSim)? !" !#" !##" !###" !####" !" $" %" &" !'" ($" '%" !$&" !" #$" $!" %$" &!!" &" #" '" (" &)" *#" )'" &#(" Logarithmicscale 60 cents for 1 processor Logarithmicscale approx 4 $ for 128 processors approx 5.5 hrs for 1 processor approx 18 min for 128 processors 432 270 1152 CPUCost 89 2 8 Time The cost of doing science on the cloud: The Montage example. E. Deelman, G. Singh, M. Livny, G. B. Berriman, and J. Good. (SC’08), pages 1–12. IEEE/ACM, 2008. Johnsen, Schlatte, Tapia Tarifa. Modeling Resource-Aware Virtualized Applications for the Cloud in Real-Time ABS. Proc. ICFEM 2012 Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 16 / 22
  • 19. Case Study: Fredhopper Replication Server (1) The Fredhopper Access Server (FAS) is a distributed, concurrent OO system providing search and merchandising services to e-Commerce companies. The Replication Server is one part of FAS. Acceptor Cloud Provider ClientJob ClientJob ClientJob SyncClient job(schedule) SyncClient SyncClient... ... LIVE STAGING SyncServer create() CLOUD DC4 Connection Thread getConnection(schedule) getConnection(schedule) getConnection(schedule) job(schedule) job(schedule) DC3 Connection Thread replication DC2 Connection Thread replication DC1 Connection Thread replication I Very detailed model: consists of 5000 lines of ABS Albert, de Boer, H¨ahnle, Johnsen, Schlatte, Tapia Tarifa, Wong. Formal modeling and analysis of resource management for cloud architectures: an industrial case study using Real-Time ABS. Service Oriented Computing and Applications 8(4), 2014 Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 17 / 22
  • 20. Case Study: Fredhopper Replication Server (2) How does the accumulated cost in our model compare to the actual Java implementation? 0 17.5 35 52.5 70 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 0 7500 15000 22500 30000 Runningtime[s] Environments Simulationcost Model simulation cost Implementation running time Measured execution time of the implementation (left scale) Accumulated cost of the simulation (right scale) The deviation roughly seems to correspond to the start-up time of JVM Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 18 / 22
  • 21. Case Study: Hadoop YARN Clusters (1) Open-source software framework that implements a cluster management technology for distributed processing. Popular cloud framework for big data processing: I Resource allocation I Code distribution I Distributed data processing Lin, Yu, Johnsen, Lee. ABS-YARN: A Formal Framework for Modeling Hadoop YARN Clusters. Proc. FASE 2016 Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 19 / 22
  • 22. Case Study: Hadoop YARN Clusters (2) How does the ABS YARN compare to the actual YARN implementation? (a) The normalized starting time (b) The normalized finish time (c) Cumulative completed jobs (d) Total number of completed jobs Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 20 / 22
  • 23. The ABS Collaboratory I ABS as a web service, with documentation and examples under development at http://www.abs-models.org I Tools are open source: https://github.com/abstools I ABS API available for orchestration of Java code I Eclipse plug-in for ABS Get involved! Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 21 / 22
  • 24. Summary Virtualization requires novel modeling abstractions Executable models, deployment components, reflection ABS: Abstract Behavioral Specification I Model deployed services with dynamic resource management I High-level abstractions of low-level platform-specific concerns I Analysis methods: performance, cost analysis, deadlock analysis, . . . I More info and open source tools: www.abs-models.org Make your deployment decisions at design time! ABS permits concise modeling and accurate prediction Engineering Virtualized Services [www.envisage-project.eu] Einar Broch Johnsen (UiO) Designing Resource-Aware Applications iFMCloud, 04.06.2016 22 / 22