Mobile Cloud Computing T-110Mobile Cloud Computing: Definition 2 1. The illusion of infinite...
Transcript of Mobile Cloud Computing T-110Mobile Cloud Computing: Definition 2 1. The illusion of infinite...
Miika Komu, Otaniemi 18.9.2013
Mobile Cloud ComputingT-110.5121
Challenges and Basic Concepts
Table of Contents
• Context and definition
• Motivation
• Challenges and some solutions
• Concepts at the client and server side
18.09.13
2
What is Mobile Cloud Computing?
18.09.13
3
MobileDevices
WirelessNetworks
CloudComputing Mobile
CloudComputing
(Mobile) Cloud Computing: Definition 1
“Mobile Cloud computing is a model for enabling convenient, on-demand mobile network access to a shared pool of configurable mobile computing resources (e.g., networks, servers, storage, applications, and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction.”
18.09.13
4
Adaptation by Yrjö Raivio based on P. Mell and T. Grance, The NIST Definition of Cloud Computing, 2009
Mobile Cloud Computing:Definition 2
1. The illusion of infinite computing resources available on demand, thereby eliminating the need for Cloud Computing users to plan far ahead for provisioning.
2. The elimination of an up-front commitment by Cloud users, thereby allowing companies to start small and increase hardware resources only when there is an increase in their needs.
3. The ability to pay for use of computing resources on a short-term basis as needed (e.g., processors by the hour and storage by the day) and release them as needed, thereby rewarding conservation by letting machines and storage go when they are no longer useful.
18.09.13
5
Source: Ambrust et al, Above the Clouds: A Berkeley View of Cloud Computing, 2009
Mobile Cloud Computing Illustration
18.09.13
6
User Handset AccessPoint
LoadBalancer
Client side Server side
Service Databases
Why Is This Interesting?
• The number of mobile devices has been steadily increasing
– Most of the people have a mobile phone
– Laptops have (almost) replaced Pcs
– Tablets are here to stay
• Popular services are already distributed using a ”cloud”
– Facebook, Dropbox, Spotify, Youtube, Google search, etc
– Open APIs (maps, public transport, etc) → mash-ups
– Big data!
• It's not only users that connect wireless to the cloud
– Increasing amount of sensors connected to services
– Consider that your mobile phone has multiple sensors
18.09.13
7
Why Is This Challenging?
• Mobile devices
– Limited battery, storage and processing capabilities
– How a server contacts a client traversing networks?
– TCP streams break when switching between 3G and Wifi
• Wireless networks
– Limited communication bandwidth
– Too many users can congest access points
– Cellular networks: increased data but revenues decrease
• Cloud computing
– Privacy considerations with shared infrastructure
– Vendor lock-in
18.09.13
8
Some Solutions for Mobile Devices
• Store data in the cloud instead of the mobile device
– How to deal with offline operations?
• Websockets and bi-directional communication
– Server-side push instead pull; may save battery
• Mobile offloading
– Offload computation (code block, process or entire OS)
– May potentially save battery
• Connectivity and sustaining sessions
– RESTful web (non-persistent!) tolerates address changes
– Many protocols available (WebRTC,Teredo,MobileIP,VPNs)
18.09.13
9
Tradeoffs in Mobile Offloading
18.09.13
10
Computation C →
Co
mm
unic
atio
n D
→ Neveroffload
Alwaysoffload
Dependson Bandwidth
Source: Kumar & Lu, 2010: Cloud Computing for Mobile Users: Can Offloading Computation Save Energy?
Some Solutions for Challenges in Wireless Networks• Wifi and bandwidth: Multiple Input & Multiple Output (MIMO)
• Flash crowds of people congest cellular networks
– Directional antennas (NSN ”liquid radio” concept)
• How to increase revenues for cellular networks?
– Stop offering flat-rate data :(
– Operators could avoid becoming a ”bit pipe”; bundle cellular access with service providers?
– For example, Spotify signed up brands with Vodaphone
• How to lower costs in managing cellular networks?
– Shared infrastructure (base stations)
– Virtualize networks e.g. with Software Defined Networks
18.09.13
11
Some Solutions for Challenges in Cloud Computing
• Privacy
– Multi-tenancy: two competing firms in a single host
– Set-up and deploy your own private data center
– NSA snooping traffic: move your data center to Finland?
• Vendor lock-in
– Cloud vendors provide vendor-specific APIs
– Migrating from one vendor to another is difficult
– CompatibleOne: open-source cloud broker
– Cloud abstraction APIs (e.g. Deltacloud, libcloud)
– Open-source clouds (e.g. OpenStack and ConPaaS)
18.09.13
12
Mobile Cloud Computing Concepts
18.09.13
13
User Handset AccessPoint
LoadBalancer
Client side Server side
Service DatabasesCoreInternet
1. 2. 3. 4.
Client-side Concepts• Machine-to-machine (M2M) communications
– Wireless communications: Z-wave, Zigbee, 6LoWPAN, etc
– Constrained Application Protocol: binary HTTP over UDP
– By the way, HTTP 2.0 is binary protocol...
– Scale ”down”: sensors are more limited than e.g. phones
• Internet of Things (IoT)
• Mobile offloading
– Consider google glasses: latency can be a critical factor
– Moving data around can be expensive (compute locally?)
• Thin client: dumb mobile device, smart service
• HTML5 is an alternative to native apps
– Build software for each browser instead of each OS
18.09.13
14
Load Balancing for Distributed Services• Fault tolerance: hardware and software failures
– Reliable hardware, software or both? Cost issue.
• Availability (”uptime”); Service Level Agreement (SLA)
• Some traditional ways to implement
– DNS round robin
– Reverse HTTP proxies (aka HTTP load balancers)
• Software Defined Networks (e.g. OpenFlow)
– OS has been virtualized, next step to virtualize networks
– Network as a Service (NaaS)
– Dumb switches, smart controllers
– Adopted by Google in their datacenters
18.09.13
15
Scalable Web Services
• Remote Procedure Call (RPC)
– Flexible interfaces create often complex software
– Simple Object Access Protocol (SOAP)
– Something like this may be needed mobile offloading
• REpreSentation data Transfer (REST)
– Easier to scale (caching and load balancers)
– You should prefer this always (if you can) instead of RPC
• Employ aggressive caching everywhere to scale
– Browser, forward+reverse proxies, service, database
– Content-Delivery Networks (CDN)
• Single-Sign On (SSO); outsource authentication!
18.09.13
16
Databases
• CAP tradeoff - you can have only two of the following:
– Consistency, Availability, Partition tolerance
• Relational Databases (typically no partition Tolerance)
– Atomicity, Consistency, Isolation, Durability (ACID)
– Useful for highly critical data (e.g. bank transactions)
• Cloud databases (aka NoSQL)
– Four major category types (lecture about this later)
– Eventual consistency (typically no Availability)
– Extremely suitable for e.g. read-only data
18.09.13
17
Virtualization of Operating Systems
• Better utilization of hardware
• Eases administrative burden
• Hypervisor (xen, kvm) isolates & runs the virtual machines
• Full, partial and paravirtualization
18.09.13
18
APP1
OS
CPU
APPN
CPU2
..
OS
CPU
APP APP1
OS
APPN..
CPU1
Hypervisor
Virtual Machines
..
APP1
OS-1
APPN.. APP
1
OS-N
APPN..
Original picture from Yrjö Raivio, T-110.5121 Fall 2012
Cloud Concepts: IaaS, PaaS, SaaS
18.09.13
19
Original picture from Yrjö Raivio, T-110.5121 Fall 2012
Cloud Concepts Continued
• Economies of scale: scale out, not up
– Scale out: buy more off-the-self computers
– Scale up: buy a more efficient computer
• Elasticity
– Avoid under and over provisioning
• Different types of clouds
– Public cloud: e.g. Amazon EC2, Azure
– Private cloud: e.g. a private OpenStack installation
– Hybrid cloud: a private cloud utilizing a public cloud
• Compute vs. storage vs. network nodes
18.09.13
20
Miika Komu, Otaniemi 18.9.2013
Questions?