cloudcomputing for mobile apps - uniroma1.itberaldi/macc/cloudcomputing_ok_19.pdf– mobile...
TRANSCRIPT
![Page 1: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/1.jpg)
Cloud computing for mobile apps
Roberto Beraldi
![Page 2: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/2.jpg)
Factors enabling cloud computingHardwareHW virtualizationMulti-core chips
Internet Technologies
DistributedCom
puting
Web 2.0Web ServicesMashupsSoA
Utility computingGrid Computing..
System Management
Autonomic ComputingData Center Automation
Cloud computing
![Page 3: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/3.jpg)
Cloud actors
![Page 4: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/4.jpg)
• Dropbox is a free (base 2GB, up to 18GB), web-based cloud storage mechanism– file backup service – data sharing– Data sync among different clients– Mobile applications
iPhone
iPad
Windows
Linux
MAC
.mp3
.avi.jpg
Freemium business model
Web-API: REST / JSON calls
Example: dropbox
Security (SSL, AES-256 bit), scalabity (load balancer, server notification, data/metadata..)
.
.
.
![Page 5: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/5.jpg)
Dropbox usage
• Two access «channels»• For users:–Web based access– Proxy applications
• For developers:– Endpoint for web-api calls • Wire protocol• Data representation
–Different development technologies• Java, .NET, Python, etc.
![Page 6: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/6.jpg)
Main characteristics of CC
• Pay-per-use– no ongoing commitment, utility prices
• Elastic capacity and the illusion of infinite resources– Scale up/down, vertical/horizontal
• Self-service Interface: Users can manage the service
• ..
![Page 7: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/7.jpg)
Classic Delivery models
(IaaS) Infrastructure as a Service
(SaaS)Software as a Service
XaaS (PaaS) Platform as a Service
![Page 8: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/8.jpg)
SaaS
SaaS
Entire SW
Web-API
…..
![Page 9: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/9.jpg)
Example of SaaS (Application)
![Page 10: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/10.jpg)
SaaS (Web-API)
Web-API
CRUD
OBJECTS
READ-ONLY
.
.
.
OTHER..m
ore advancedData m
odel
Provide API accessto an already available web site..
Programmable web
![Page 11: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/11.jpg)
Other deliver models
• Backend as a Service (BaaS), • Mobile Backend as a Service (MBaaS)• Function as a Service (FaaS)• Storage as a Service (SaaS)– NoSQL data models (performance reason)– CAP theorem
![Page 12: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/12.jpg)
BaaS
• Provides support to app in terms of– Real time DB – Push notification– Crash reporting– Authentication– ..
• Specific support to domains– IoT (e.g., AWS’s greengrass)– Cloud robotics– ..
![Page 13: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/13.jpg)
MBaaS
![Page 14: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/14.jpg)
Main cloud service provides
• Amazon Web Service• MS Azure• IBM Cloud• Google Cloud
![Page 15: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/15.jpg)
![Page 16: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/16.jpg)
![Page 17: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/17.jpg)
![Page 18: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/18.jpg)
![Page 20: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/20.jpg)
https://www.znetlive.com/blog/comparing-top-4-public-cloud-providers-in-2018-microsoft-azure-vs-aws-
vs-ibm-vs-google/
![Page 21: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/21.jpg)
![Page 22: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/22.jpg)
![Page 23: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/23.jpg)
![Page 24: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/24.jpg)
Example
![Page 25: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/25.jpg)
Connecting to web-api cloud
?HTTP
TCP
Wire protocol
Web API • How to authenticate the app?
• How to authenticate the user?
• Which application protocol to use?
• How to represent data?
![Page 26: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/26.jpg)
Workflow
• To use a cloud service the following steps are required
• Register to the console• Register the application– Get API-KEY
• Use the service from the registered app– App authentication
• Often, an SDK is available to access the service from the most used languages
![Page 27: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/27.jpg)
How to authenticate the app?
• Cloud providers offer a web console to register the app that will use the service
• Eventually the provider generates an API KEY– Limit the usage according to the subscribed plan– Authenticate the app– Provide a report about the use
![Page 28: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/28.jpg)
How to authorize data access?
• Some Web-API allows to get access to sensible data (e.g., FB)
• Access Token (Oauth 2)– The application is registered on the data provider– The application specifies a scope representing the
kind of data it wants to access– User is required to grant the permission
• API KEY
![Page 29: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/29.jpg)
Abstract authorization flow
![Page 30: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/30.jpg)
How to authenticate the user?• Implement a “user name-password” scheme• Use some Identity Provider– Google – Facebook – Twitter
Two factors scheme
![Page 31: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/31.jpg)
How to represent data?
xml json
![Page 32: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/32.jpg)
Useful tool
• cURL• Postman
![Page 33: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/33.jpg)
Platform as a Service• A cloud platform offering an environment on
which developers create and deploy applications– E.g., decide the size of the VM, where they are
located, etc.• Many Programming Languages• Frameworks• Web based console to create application (with
dashboard) • See https://paasfinder.org/ for a complete list
(70+)
pasfinder
![Page 34: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/34.jpg)
PaaS enabling technology
![Page 35: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/35.jpg)
Containers
Containers include the application and all of its dependencies, but share the kernel with other containers. They run as an isolated process in userspace on the host operating system. Same OS!Runs only on LinuxMuch faster
![Page 36: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/36.jpg)
Example: Openshift
![Page 37: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/37.jpg)
Example: OpenshiftRed Hat's container application platform automates the provisioning, management and scaling of applications
Versions:-Origin (open source)-Enterprise-online (running on AWS)
Based on ‘container’ (Docker) and POD (unit that can be replicated)
![Page 38: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/38.jpg)
OpenShift’s architecture
![Page 39: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/39.jpg)
Heroku
![Page 40: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/40.jpg)
Heroku architecture
• At a high level, a deployed sw is organized in terms of dyno (containers)
• Front end (Web dyno)• Backend (Worker dyno)• On shot (One-off dyno)
![Page 41: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/41.jpg)
Why dyno?
![Page 42: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/42.jpg)
Why dynos?
![Page 43: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/43.jpg)
Why dynos: scalability
![Page 44: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/44.jpg)
Example of Heroku commands
![Page 45: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/45.jpg)
Platform as a Service• A complete environment to build, manage and
deploy app
• One key feature of PaaS is scaling– Horizontal, vertical, automatic– ….
![Page 46: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/46.jpg)
Vertical scaling
• The response time of typical application depends on the (normalized) rate of requests received (load)
• After a given load, the app becomes congested, i.e., it doesn’trespond quickly .. Or even worst it dosen’t respond at all
• Scalabity means the capacity to react to a congestion
![Page 47: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/47.jpg)
Example
![Page 48: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/48.jpg)
Vertical scaling
• A straightforward way to implement scalability is to upgrade the physical machine
• More RAM, CPU cores, etc…• Of course, at some point the new machine
becomes congested again..
![Page 49: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/49.jpg)
Horizontal scaling
• A different approach is to modify the architecture of the app
• With horizontal scaling the app is divided in different components can be replicated on different physical machines so that more requests can be server in parallel
• The simplest solution is follow a three tier architecture and replicate the business tier
![Page 50: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/50.jpg)
Horizontal scaling (replication)
Dispatcher
App App App
DATA
….
HTTP requests
Scheduler (e.g., Round Robin)
Assumptions:Requests are statelessThey are of the same typeThe data tier is harder to scalemay become the bottleneck
![Page 51: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/51.jpg)
Horizontal scaling (web-queue-worker)
• Another solution is to dived the application in separate modules with different roles that can be replicated
• For example, a module can be a web responder and the other a worker (performing long running tasks) and queue that connects the two modules
![Page 52: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/52.jpg)
Horizontal scaling
![Page 53: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/53.jpg)
Horizontal scaling(web/queue/worker)
Dispatcher
Web Web Web
DATA
….
HTTP requests
Scheduler (e.g., Round Robin)
Worker Worker Worker
Webmodule(replies quicklyeven with ‘in progress’)
Worker(perform computeintesive tasks, or long latency)
External requests
Dispacther: light computation
Replicated DB: àconsistencyMaster/SlaveUse no-SQL DB (memcached)
Queue
![Page 54: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/54.jpg)
Microservice Architecture for scaling
• Implement the app as a set of (micro)services• Again, each service exposes public API• Service to service synchronus communication
![Page 55: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/55.jpg)
When/how to scale• Manually scaling (via commands or config file)• Automatically done (by some algorithm)• How many copies of each module?• Elastic scaling: increase/decrease the number of copies according
to the measured delay (feedback based system)• Elastic scaling is a key feature of cloud computing. Scale up and
scale down. Still pay-per-use• Autonomic systems (adapt to external changes):
– Self-configuration – Automatic configuration of components– Self optimization– …
• Optimum scaling protocol (minimizes resource usage while still guarantee SLA)..
![Page 56: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/56.jpg)
Automatic scaling (auto-scaling)
• Automatic resource provisioning and releasing• Threshold based solution
– A VM may take 10 min to start– If too conservative violation of SLA à cost– If too proactive, add VM when unnecessary àcost
• Predict when to scale – Hard in case of flash- crowd workload
• Several proposed algorithm (it is a research topic)– Machine Learning technique– Neural Networks– …
![Page 57: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/57.jpg)
INFRASTRUCTURE AS A SERVICE
![Page 58: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/58.jpg)
CC: Virtual computing power
CPU cycles
Storage
Memory
Provider Utilization
Virtual machine
control panel
User decides the size on the VM…
![Page 59: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/59.jpg)
IaaS• A cloud infrastructure enables on-demand provisioning of
servers running several choices of operating systems and a customized software stack.
• Cloud computing services are usually backed by large-scale data centers composed of thousands of computers.
• Such data centers are built to serve many users and host many disparate applications.
• Offers virtualized resources (computation, storage, and communication) on demand
![Page 60: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/60.jpg)
Virtualization, main idea• Memory:
– Virtual Memory (>=Physical memory)• Multitasking:
– Several processes concurrently on the same HW, see the same ISA. HW is shared thanks to an OS than manages critical instructions.
• Virtual Machine:– ‘60 from IBM on mainframes– Abandoned with the advent of PCs, now again used for cloud
computing– Even different ISA on the same CPU– Used to run different OS– Achieved through a Virtual Machine Monitor
![Page 61: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/61.jpg)
Interface of a computing system
3: privileged instructions4: user instructions
![Page 62: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/62.jpg)
Virtual Machine
• Virtual Machine is a logic machine (ML) whose ISA is implemented exploiting software running on a physical machine (MF)
• Two main types:– Native. ML=MF
• Same ISA. Indeed instructions of the MF are in large part executed on the real CPU. Sensitive instruction are trapped.
– Emulation ML≠MF (different ISA)• HW emulation • Language level emulation (java)
![Page 63: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/63.jpg)
Emulation (process level virtualization)
• HW emulation:– ISA is different from real CPU
• Sparc emulates IA32
– Installation of different OS• Language specific VM– JVM– CLR
![Page 64: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/64.jpg)
Native VM (System level virtualization)• Same machine as the physical machine
“Efficient, isolated duplicate of a real machine”)
• Virtualization is realized by a Virtual Machine Monitor (VMM) o hypervisor
![Page 65: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/65.jpg)
Native• Full virtualization– OS without modification (e.g., VMWare’s ESX,
ESXi)– OS legacy
• Para virtualization – OS must be modified (e.g., Open source’s XEN)– Higher efficiency
![Page 66: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/66.jpg)
Resources
• Xen and the Art of Virtualization, Pratt et al. SOSP 2003.
• The Architecture of Virtual Machines, Smith, J.E.; R. Nair, IEEE Computer, May 2005, Volume: 38 , Issue: 5
• A Comparison of Software and Hardware Techniques for x86 Virtualization, K. Adams, O. Agesen. ASPLOS 2006.
![Page 67: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/67.jpg)
Classical virtualization
• “A classical VMM executes guest operating system directly, but at a reduced privileged level. The VMM intercepts traps from the de-privileged guest, and emulates the trapping instruction against a virtual machine state”[*]
[*]”A camparison of Software and Hardware Techniques for x86 Virtualization”, K.Adams, O.Agesen, ASPLOS 2006
![Page 68: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/68.jpg)
Classical virtualization, esempio
1
3
4
5
Guest OS Not privileged instruction
green= User Modered= System Mode
Privileged instructione.g.. CLI, Clear Interrupts
2 trap
VMM
time
2’
User level Kernel levela. CPU executes a kernel instruction of the Guest OS while being in user mode
b. CPU generates a trap c. Control passes to the VMM
that emulates the instruction d. 2’ is different of 2, but is
produces the same effect ( (for example, CLIàVCPU.IF=0)
![Page 69: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/69.jpg)
Hw virtualizazion
Hardware virtualization allows running multiple operating systems and software stacks on a single physical platform.The virtual machine monitor (VMM), hypervisor, mediates access to thephysical hardware presenting to each guest operating system a virtual machine(VM), which is a set of virtual platform interfaces
![Page 70: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/70.jpg)
Type-1 hypervisor (bare metal)• Guest OS runs unchanged• Used to build a “Hardware Server” (cloud computing)• Hyper-V(Microsoft) , VMWare’s ESX
![Page 71: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/71.jpg)
Type-2 hypervisor (hosted)• Runs on top of a Hosting OS• Often used on clients
![Page 72: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/72.jpg)
Example of VMM: Virtual Box
• It usually runs on Desktop computers• VMM runs as an application hosted by an OS• Lower performance, easy to install VM
![Page 73: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/73.jpg)
HW assisted virtualization
• Processors are designed to help virtualization• For example, Intel-VT and AMD-V provide
additional instructions that help virtualization• Hypervisors can use these instructions to
improve the performance – Linux KVM, Microsoft Hyper-V, Microsoft Virtual
PC, Xen, etc. use these features
![Page 74: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/74.jpg)
Isolation
• Through virtualization, workload isolation is achieved since all program instructions are fully confined inside a VM, which leads to improvements in security.
• Better reliability is also achieved because software failures inside one VM do not affect others.
• Moreover, better performance control is attained since execution of one VM should not affect the performance of another VM.
![Page 75: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/75.jpg)
Isolation
![Page 76: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/76.jpg)
Application mobility• Workload migration, also referred to as application
mobility, targets at facilitating hardware maintenance, load balancing, fault tolerance and disaster recovery.
• It is done by encapsulating a guest OS state within a VM and allowing it to be suspended, fully serialized, migrated to a different platform, and resumedimmediately or preserved to be restored at a later date.
• A VM’s state includes a full disk or partition image, configuration files, and an image of its RAM.
![Page 77: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/77.jpg)
Application mobility
![Page 78: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/78.jpg)
HW consolidation• Virtualization makes it possible to consolidate
individual workloads onto a single physical platform, reducing the total cost of ownership.
![Page 79: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/79.jpg)
IaaS provider’s point of view
• A key challenge IaaS providers face when building a cloud infrastructure is managingphysical and virtual resources, namely servers, storage, and networks, in a holistic fashion.
• The orchestration of resources must be performed in a way to rapidly and dynamically provision resources to applications.
![Page 80: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/80.jpg)
IaaS provider’s point of view
• The software toolkit responsible for this orchestration is called a virtual infrastructure manager (VIM).
• This type of software resembles a traditional operating system (“cloud operating system”)—but instead of dealing with a single computer, it aggregates resources from multiple computers, presenting a uniform view to user and applications.
![Page 81: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/81.jpg)
VIM and hypervisor
physicalservers
Hypervisor Hypervisor Hypervisor VIM
Virtualizationplatform
Virtualserver
![Page 82: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/82.jpg)
Automated scaling
VIMhypervisor hypervisor
1)User request a new VMThat joins the existing 3 VMs
1
2
2) VIM allocates the new VM
Usage and administratorportal
Physical server 1 Physical server 2
Automated scalelistener
![Page 83: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/83.jpg)
Automated scaling
VIMhypervisor hypervisor
1)User request a new VMThat joins the existing 3 VMs
1
2
2) VIM allocates the new VM
3
3) User increases the loadrequest
4scale-up!
Usage and administratorportal
Physical server 1 Physical server 2
Automated scalelistener
![Page 84: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/84.jpg)
Example: automated scaling
VIMhypervisor hypervisor
Physical server 1 Physical server 2
Automated scalelistener
![Page 85: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/85.jpg)
Example: OpenNebula
• Interface to Public Clouds: it offers a driver to manage the life cycle of virtualized resources obtained from external cloud providers.
• In case of spikes in demand, extra load can be offloaded to rented resources. To the applications, the use of leased resources must ideally be transparent
![Page 86: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/86.jpg)
Example: OpenStack
OpenStack is a cloud operating system that controls large pools of compute, storage, and networking resources throughout a datacenter, all managed through a dashboard that gives administrators control while empowering their users to provision resources through a web interface.
![Page 87: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/87.jpg)
Example of IaaS
• Windows azure– Different machine with different size and OS– Different geographical region where the machine
is located – Free trial (requires registration with VISA)
• Amazon EC2• …
![Page 88: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/88.jpg)
![Page 89: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/89.jpg)
![Page 90: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/90.jpg)
![Page 91: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/91.jpg)
![Page 92: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/92.jpg)
![Page 93: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/93.jpg)
Main Amazon Web Service offering• Elastic Cloud Computing (EC2)– Amazon Elastic Compute Cloud (Amazon EC2) is a web
service that provides resizable compute capacity in the cloud.
• Amazon Simple Storage Service (Amazon S3)– Amazon S3 provides a simple web services interface
that can be used to store and retrieve any amount of data, at any time, from anywhere on the web.
• Amazon Simple Queue Service (Amazon SQS)– offers a reliable, highly scalable hosted queue for
storing messages as they travel between computers
![Page 94: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/94.jpg)
Current offer
![Page 95: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/95.jpg)
Amazon Web Services (EC2)• Rich set of VM• General purpose
– baseline level of CPU performance with the ability to burst above the baseline
• Compute Optimized, GPU, etc…• Reserved Instance
– Amazon EC2 Reserved Instances allow to reserve Amazon EC2 computing capacity for 1 or 3 years
• Dedicated Instance– run in a VPC (Virtual Private Cloud) on hardware that's dedicated to a
single customer.• Cluster networking• Spot Instance
– allow to bid on spare Amazon EC2 computing capacity.
![Page 96: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/96.jpg)
Price (depends on the location)
![Page 97: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/97.jpg)
Microsoft Azure vs Amazon AWS
• Short story: AWS is superior to Windows Azure
• Long story: see– http://www.computerworlduk.com/it-
vendors/microsoft-azure-vs-amazon-aws-public-cloud-comparison-which-cloud-is-best-for-enterprise-3624848/
![Page 98: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/98.jpg)
New trends: Containers
Each virtual machine includes the application, the necessary binaries and libraries and an entire guest operating system - all of which may be tens of GBs in size.
![Page 99: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/99.jpg)
Containers
Containers include the application and all of its dependencies, but share the kernel with other containers. They run as an isolated process in userspace on the host operating system. Same OS!Runs only on LinuxMuch faster
![Page 100: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/100.jpg)
Mobile Cloud Computing
• Exploiting ‘cloud’ approach to boost the performance of an application, reduce the energy consumption, increase the computation power
• Example: ‘CloneCloud’– The system is a flexible application partitioner and
execution runtime that enables unmodified mobile applications running in an application-level virtual machine to seamlessly off-load part of their execution from mobile devices onto device clones operating in a computational cloud.
![Page 101: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/101.jpg)
CloneCloud: main idea
![Page 102: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/102.jpg)
Mobile-to-mobile offloading
![Page 103: Cloudcomputing for mobile apps - uniroma1.itberaldi/MACC/CloudComputing_OK_19.pdf– Mobile applications iPhone iPad Windows Linux MAC.mp3.avi.jpg Freemium business model Web -API:](https://reader030.vdocuments.mx/reader030/viewer/2022041113/5f20737dd2c459336460b957/html5/thumbnails/103.jpg)
Questions?