mobile cloud computing architecturesprade/mytalks/icitcs tutorial.pdf · mobile cloud computing...

65
Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De The State University of New York, Korea (SUNY Korea) StonyBrook University [email protected] Parts of the research material in this presentation was supported by the MSIP(Ministry of Science, ICT and Future Planning), Korea, under the "IT Consilience Creative Program" (NIPA-2013-H0203-13-1001) supervised by the NIPA (National IT Industry Promotion Agency)

Upload: lethuan

Post on 20-Apr-2018

227 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Mobile Cloud Computing Architectures – Algorithms - Applications

Pradipta De The State University of New York, Korea (SUNY Korea)

StonyBrook University

[email protected]

Parts of the research material in this presentation was supported by the MSIP(Ministry of Science, ICT and Future Planning), Korea, under the "IT Consilience Creative Program" (NIPA-2013-H0203-13-1001) supervised by the NIPA (National IT Industry Promotion Agency)

Page 2: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Cloud Computing

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 2

Virtualization

Cloud Computing

Cluster Computing

Grid Computing

Service Oriented

Architectures

Autonomic Computing

Utility Computing

Elastic Computing

Web Services

Parallel Computing

Page 3: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Service Models

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 3

Page 4: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Mobile Backend as a Service

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 4

What • Provides mobile application developers a way to connect their application to backend cloud storage and processing

Why • Abstract away complexities of launching and managing own infrastructure

• Focus more on front-end development instead of backend functions

When • Multiple Apps, Multiple Backends, Multiple Developers • Multiple Mobile Platforms, Multiple Integration, Multiple 3rd Party

Systems & Tools

How • Meaningful resources for app development acceleration – 3rd party API, Device SDK’s, Enterprise Connectors, Social integration, Cloud storage

Source: http://rapidvaluesolutions.com/whitepapers/How-MBaaS-is-Shaping-up-Enterprise-Mobility-Space.html

Page 5: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Examples of MBaaS

• Apps need common services which can be shared among apps instead of custom development

• Few companies

– AnyPresence

– Appcelerator

– FeedHenry

– Kinvey

– Parse

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 5

Page 6: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Augmenting Mobiles with Cloud Computing

• Amazon Silk browser – Split browser

• Apple Siri – Speech recognition in cloud

• Apple iCloud – Unlimited storage and sync capabilities

• Image recognition apps on smartphones useful in developing augmented reality apps on mobile devices – Augmented reality app using Google Glass

8/31/2015

ICITCS 2015: Mobile Cloud Computing ©Pradipta De

6

Page 7: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

What is missing ?

• Battery capacity on smartphones is limited

– Applications are not designed with the objective of optimal power consumption

• Smartphone processors are not fast time to compute can be high bad user experience

• How can we use Cloud Computing to overcome these limitations ?

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 7

Page 8: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 8

Mobile Cloud Computing

Architectures

Part-I

Page 9: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Mobile Cloud Computing

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 9

Mobile Cloud Computing is a framework to augment a resource constrained mobile device to execute parts of the program on cloud based servers

Pros: - Saves battery power - Makes execution faster

Cons: - Must send the program states (data) to the cloud

server consumes battery - Network latency can lead to execution delay

Source: Shiraz, Muhammad, et al. "A review on distributed application processing frameworks in smart mobile devices for mobile cloud computing." Communications Surveys & Tutorials, IEEE 15.3 (2013): 1294-1313.

Page 10: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Typical MCC workflow

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 10

Source: Shiraz, Muhammad, et al. "A review on distributed application processing frameworks in smart mobile devices for mobile cloud computing." Communications Surveys & Tutorials, IEEE 15.3 (2013): 1294-1313.

• Device • Program • Network

Page 11: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

MCC key components

• Profiler – The profiler monitors application execution to collect data

about the time to execute, power consumption, network traffic

• Solver – The solver has the task of selecting which parts of an app

runs on mobile and cloud

• Synchronizer – The task of synchronizer modules is to collect results of

split execution and combine, and make the execution details transparent to the user

8/31/2015

ICITCS 2015: Mobile Cloud Computing ©Pradipta De

11

Page 12: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Key challenges ?

• MCC requires dynamic partitioning of an application to optimize – Energy saving

– Execution time

• Requires a software (middleware) that decides at app launch which parts of the application must execute on the mobile device, and which parts must execute on cloud – This is a classic optimization problem

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 12

Page 13: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

[1] MCC Systems: MAUI

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 13

MAUI server is the cloud component. The framework has the necessary software modules required in the workflow.

• MAUI enables the programmer to produce an initial partition of the program • Programmer marks each method as “remoteable” or not • Native methods cannot be remoteable

• MAUI framework uses the annotation to decide whether a method should be executed on cloud server to save energy and time to execute

Page 14: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

[2] MCC Systems: MAUI

• Smartphone processors are ARM based, cloud servers are x86 How to run same program code on different architectures

– Uses Microsoft .NET Common Language Runtime

– MAUI apps are written in C#

– MAUI server has copies of the executable

• Only program states must be sent to server to execute a method

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 14

Page 15: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

MCC Systems: CloneCloud

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 15

- CloneCloud system does not require the developer to annotate the methods as remoteable it can work on unmodified applications (or binaries) - CloneCloud transforms a single machine execution into a distributed execution optimized for various factors (network connection, processing speeds, application computing patterns)

CloneCloud Model CloneCloud Architecture

CloneCloud uses static analysis of the code, and partitions at the thread level

Page 16: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

MCC Systems: COMET

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 16

COMET: Code Offload by Migrating Execution Transparently

• Works on unmodified applications (no source code required) • Allows threads to migrate between machines depending on workload • It implements a Distributed Shared Memory (DSM) model for the runtime engine

• DSM allows transparent movement of threads across machines • In computer architecture, distributed shared memory (DSM) is a form

of memory architecture where the (physically separate) memories can be addressed as one (logically shared) address space

Requires only program binaries Execute multi-threaded programs correctly Improve speed of computation

Further improvements to data traffic during migration is also possible by sending only the parts of the heap that has been modified

Page 17: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Alternative Architectures

• Micro-cloud for offloading

– Form a transient cloud using mobile devices in the vicinity

• Edge Cloud for offloading

– Use the routers and/or other nearby servers to act as the compute resource

• Fog Computing (Mobile Fog)

– Use ubiquitous sensor devices (Internet of Things) to act as a platform for unlimited computing power

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 17

Page 18: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Micro-Cloud Architecture

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 18

Assumption is that a mobile device can only connect to other devices in the vicinity Computation offloading can be performed among a set of mobile devices Mobile Device Cloud Goal is to maximize the lifetime of the collection of the mobile devices

- Ported MapReduce framework to execute on Mobile Device Cloud - Has been shown to be useful for other latency sensitive applications

Page 19: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Edge Cloud or Cloudlet

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 19

Goal is to reduce the latency in reaching the cloud servers Use servers that are closer to the mobile devices use cloudlet A cloudlet is a new architectural element that arises from the convergence of mobile computing and cloud computing. It represents the middle tier of a 3-tier hierarchy: mobile device --- cloudlet --- cloud

Use remote cloud Use cloudlet

Page 20: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Fog Computing

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 20

• Fog computing is an architecture that uses one or a collaborative multitude of end-user clients or near-user edge devices to carry out a substantial amount of storage, communication, control, configuration, measurement and management

• Fog computing is a non-trivial extension of the cloud computing

Page 21: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Summary

• The service oriented framework, like MBaaS, is focused mainly on application developers, less on user experience

• MCC focuses more on user experience – Lower battery consumption

– Faster application execution

• MCC architectures design the middleware to partition an application execution transparently between mobile device and cloud servers

• Alternative architectures focus on efficient use of computing resources in the user’s environment

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 21

Page 22: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 22

Mobile Cloud Computing

Algorithms

Part-II

Page 23: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Big Picture of MCC

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 23

Page 24: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Key Problem to Solve

• At its core, MCC framework must solve how to partition a program for execution on heterogeneous computing resources

• This is a classic “Task Partitioning Problem”

• Widely studied in processor resource scheduling as “job scheduling problem” – But in MCC the assumptions change and often makes it

more challenging to solve

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 24

Page 25: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Task Partitioning Problem in MCC Input: • A call graph representing an application’s method call sequence • Attributes for each node in the graph denotes (a) energy consumed to

execute the method on the mobile device, (b) energy consumed to transfer the program states to a remote server

Output: • Partition the methods into two sets – one set marks the methods to

execute on the mobile device, and the second set marks the methods to execute on cloud

Goals and Constraints: • The energy consumed must be minimized • There is a limit on the execution time of the application • Other constraints could be – some methods must be executed on mobile

device, total monetary cost, etc.

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 25

Page 26: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Mathematical Formulation

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 26

Directed Acyclic Graph represents an application Call Graph

- Highlighted nodes must be executed on the mobile device called native tasks (v1, v4, v9)

- Edges represent the sequence of execution

- Any non-highlighted node can be executed either locally on the mobile device or on cloud

Integer Linear Program to solve the Task Partitioning Problem (as used in MAUI)

• A 0-1 integer linear program, where Iv = 0 if method executed locally, = 1 if method executed remotely • E is the energy cost to execute

method v locally • Cu,v is the cost of data transfer • T is the time to execute the method • B is the time to transfer program state

Page 27: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Use of the Formulation

• Static Partitioning – When an application is launched, invoke an ILP solver

which will tell where each method should be executed

– There are also heuristics to find solutions faster

• Dynamic or Adaptive Partitioning – For a long running program, the environmental conditions

can vary

– Depending on the input, the energy consumption of a method can vary

– Should we adapt the partition as the program executes?

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 27

Page 28: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Scenarios of Variations

• User moves while using smartphone network conditions can change

• Another app starts executing residual energy to execute application changes

• Another user starts using cloud service load on the cloud server increases slowing down the app

• Connectivity to network is lost how to handle failures

• Support for variety of mobile devices energy and time to execute profiles will change

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 28

Page 29: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Sources of Variation and QoE

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 29

Network

Energy Consumption

Completion Time

Security

Monetary Cost Mobile Ecosystem

Page 30: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Mobile Ecosystem

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 30

Sources of Variation

Applications Network Execution Platform

Concurrency

Multi-tasking

Real-time Constraints

Multiple Interfaces

Bandwidth Variation

Intermittent Connectivity

Latency Variation

User Mobility

Mobile Processor

Coprocessor

Energy/Time Profile

Cloud Architecture

Channel Error

Page 31: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Sources of Variation in Operating Environment

• App Concurrency: – Smartphone apps are concurrent – task-level (independent tasks) or data-

level (streaming apps)

• Simultaneous apps: – Presence of foreground and background apps

• Real-time constraints: – Imposes constraints on task completion

• Network variations: – Bandwidth: signal quality varies leading to changing bandwidth – Connectivity: cannot have guaranteed connectivity – Latency: The routes to the server can change, as well as, congestion on the

path – User mobility: Can lead to change in network conditions – Multiple interfaces: Choice of interface can change communication

properties

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 31

Page 32: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Sources of Variation in Operating Environment

• Heterogeneous Operating Platforms

– Mobile Processors: Smartphones can have 2 to 8 processors, can implement dynamic voltage and frequency scaling

– Coprocessors: GPUs are present in many smartphones does it help to use the GPUs

– Energy and Time Profile: Hardware components vary in characteristics individual profiles are required

– Cloud Architecture: Different hierarchy of cloud architecture is possible

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 32

Page 33: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

How to evaluate MCC performance

• Energy Consumption – Must reduce energy usage and extend battery life

• Time to Completion – Should not take longer to finish the application compared to

local execution

• Monetary Cost – Cost of network usage and server usage must be optimized

• Security – As offloading transfers data to the servers, ensure

confidentiality and privacy of data how to identify methods which process confidential data

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 33

Page 34: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Comparative View

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 34

Page 35: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Comparative View

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 35

Page 36: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Impact Analysis of the Parameters

• In real implementation, it is difficult to create controlled experiments to study the impact of individual parameters

• Perform a simulation based analysis, but model all the parameters into the simulation model, using different constraints – Precedence: maintaining the DAG ordering

– Concurrency: degree of parallelism

– Execution time: time budget

– Deadline: real time restrictions

– Energy budget: total energy to be saved

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 36

Page 37: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Impact of parallelism

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 37

With increasing number of threads, both execution time and energy consumed increases But, Execution time variation is much lower as the time to migrate data is overlapped with execution

Page 38: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Impact of Cloud Processor Speed

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 38

• If bandwidth is low, then there is little impact of a faster cloud server • Low network bandwidth leads to longer use of network card, and higher

energy consumption • If the bandwidth is high, then the benefit of faster cloud server is evident

Page 39: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Impact of Round-Trip Delay

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 39

At lower bandwidths, RTT delay has relatively low impact on execution time At high bandwidth, the RTT is higher than the actual transmission time, while it is opposite for low bandwidth so at low bandwidth, there is relatively low impact of RTT

Page 40: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Open Questions

• How can one design a practical and usable MCC framework – System as well as partitioning algorithm

• Is there a scalable algorithm for partitioning – Optimization formulations are NP-hard

– Heuristics fail to give any performance guarantee

• If all parameters cannot be considered, which are the most relevant parameters to consider in the design of MCC systems

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 40

Page 41: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 41

Mobile Cloud Computing

Applications

Part-III

Page 42: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Types of Applications

• Computation Intensive

– Speech Translation, Computer Vision

• Streaming apps (or data parallel applications)

– Continuous Sensing and Processing

• Augmented reality on video streams

• Communication Intensive

– Social network apps, like Twitter

– Apps with high push notifications

• Gaming Apps

8/31/2015 ICITCS 2015: Mobile Cloud Computing ©Pradipta

De 42

Page 43: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

What did MAUI show ?

• MAUI system was evaluated using

– Face recognition application computation intensive

– Video Game latency sensitive

– Chess game computation + latency

• Speech translation demonstrated how to overcome resource limits on smartphone

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 43

Page 44: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

[1] MAUI Results: Energy Savings

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 44

- One order of magnitude improvement

- On 3G, the energy consumption is higher than that over WiFi

- Improvement over WiFi - On 3G, there is no

energy gain

- The gains are diminishing

- On 3G, there is no energy gain

Page 45: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

[2] MAUI Results: Execution Time Savings

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 45

Reduced processing time from 19 seconds to less than 2 seconds

Offloads one method “Move Complex”

Offloads two methods “Select Piece” and “Move Piece” Overhead of “Select Piece” is high

Page 46: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

[3] MAUI Results: Memory Requirements

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 46

CPU and memory utilization of running a translator application on a PC Peak memory consumption was 110 MB impossible to run on a smartphone with 32 MB smartphone RAM) Using MAUI, the memory limitations can be overcome

Page 47: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

CloneCloud: Test Applications

• Virus Scanning – Scans the content of the phone file system and matches

against a library of 1000 signatures, one file at a time

• Image Search – Finds all faces in images stored in the phones using a face-

detection library

• Privacy preserving targeted advertising – Uses behavioral tracking across websites to infer user’s

preferences on the smartphone (protects user’s privacy) keyword matching problem

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 47

Page 48: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

[1] CloneCloud Evaluation

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 48

Mean Execution Time for each application

Page 49: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

[2] CloneCloud Evaluation

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 49

Mean Energy Consumption for each application

Page 50: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Interactive Perceptual Applications

• Applications that use camera and other high data rate sensors on smartphones for continuous sensing – Continuous face or object detection – Human machine interfaces – Interactive augmented reality experience

• Key requirements

– Quick response – Continuous processing of high fidelity sensors – Compute intensive processing (ML, Comp. Vision) – Algorithm performance highly dependent on data

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 50

Conceptually similar to data parallel streaming applications

Page 51: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Overview of ODESSA system

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 51

- Makespan is the time taken to execute all stages of a dataflow graph for a single frame - Throughput is the rate at which frames are processed related to frame rate

The idea is to exploit offloading and degree of parallelism Three techniques to improve performance - Offloading: move computationally intensive stages to server - Pipelining: allow different stages to process different frames - Increase data-parallelism: split frames into multiple sub-frames

Page 52: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

[1] ODESSA Results

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 52

Large image transfer is very sensitive to even a small amount of delay and loss leading to significant performance loss Even a loss-less 802.11g link cannot support more than 3 fps

Lesson: Simply offloading compute intensive task does not help

Page 53: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

[2] ODESSA Results

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 53

Strawman I: Offload-All strategy where only video source stage and display runs locally, and a single instance of all other stages are offloaded to server Strawman II: Domain-specific partitioning, where knowledge about application and input from developer is used to identify compute intensive stages in application graph Both are static partitioning techniques

Page 54: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Offload Shaping • The idea that sometimes it is valuable to

perform additional cheap computation, not part of the original pipeline, on the mobile device in order to modify the offloading workload

• Scanarios – Object detection on a continuous video stream: If

the video frame is blurry due to motion, then it is not useful to send it for processing • Detect blurry frame and discard blur detection

possible using on-board sensors at low energy cost

– If there is similarity across frames, then do not send the frames across the result of CV algo will not change significantly

– If one wants to detect the Coke can in a scene, then filtering for Red color can indicate if a coke can may be there application context is exploited

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 54

Page 55: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Communication Intensive Apps

• Most popular apps involve intensive communication that consumes a significant part of the energy – Does offloading help in saving energy for such apps

• Key insight: – Reduce network traffic that is handled by mobile

device offload methods that handle communication with a server

– Optimize traffic patterns aggregate traffic across applications or within an application

8/31/2015

ICITCS 2015: Mobile Cloud Computing ©Pradipta De

55

Page 56: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Result on Twitter App

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 56

Used opensource Twitter app – AndTweet Offloaded the communication intensive methods

It is non-trivial to identify the cases where communication offloading will definitely benefit

Extension of Communication offloading idea - Mobile browsing

- How to split the page load over cellular network to minimize energy consumption on the mobile device ? - Can you proritize/serialize content download while browsing

Page 57: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Cloud Gaming

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 57

Several commercial providers – OnLive, AMD Game Servers

Page 58: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Cloud Gaming

• Higher than 100 ms RTT makes interactive game play experience suffer

• Problem: – Rendering and transmission from server takes long since

frame size can be large – Game input always comes from mobile device end

• Solution – Speculative Execution: Produce speculative rendered

frames of future possible outcomes, and deliver them to client one RTT ahead of time

• Tested on Doom3 and another action-based role playing game

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 58

Page 59: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Results

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 59

Improved Game Play significantly

Page 60: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 60

Open Issues

Epilogue

Page 61: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

Take-Away Questions

• Infrastructure-Platform – How will MCC model evolve with the proliferation of

wearable devices, 5G network standards ?

• Middleware – How to adapt task scheduling in a more diverse

environment with many heterogeneous devices ?

• Applications

– How does MCC apply to different types of applications ? – What novel applications can it enable in the wearables

and IoT space?

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 61

Page 62: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 62

Parts of the research material in this presentation was supported by the MSIP (Ministry of Science, ICT and Future Planning), Korea, under the "IT Consilience Creative Program" (NIPA-2013-H0203-13-1001) supervised by the NIPA (National IT Industry Promotion Agency)

For the slides, please visit: http://www.mosys.cs.sunykorea.ac.kr

Page 63: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

References

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 63

1. Shiraz, Muhammad, et al. "A review on distributed application processing frameworks in smart mobile devices for mobile cloud computing."Communications Surveys & Tutorials, IEEE 15.3 (2013): 1294-1313.

2. Cuervo, Eduardo, et al. "MAUI: making smartphones last longer with code offload." Proceedings of the 8th international conference on Mobile systems, applications, and services. ACM, 2010.

3. Chun, Byung-Gon, et al. "Clonecloud: elastic execution between mobile device and cloud." Proceedings of the sixth conference on Computer systems. ACM, 2011.

4. Gordon, Mark S., et al. "COMET: Code Offload by Migrating Execution Transparently." OSDI. 2012.

5. Yang, Seungjun, et al. "Fast dynamic execution offloading for efficient mobile cloud computing." Pervasive Computing and Communications (PerCom), 2013 IEEE International Conference on. IEEE, 2013.

6. Shi, Cong, et al. "Serendipity: enabling remote computing among intermittently connected mobile devices." Proceedings of the thirteenth ACM international symposium on Mobile Ad Hoc Networking and Computing. ACM, 2012.

7. Li, Yujin, and Wenye Wang. "Can mobile cloudlets support mobile applications?." INFOCOM, 2014 Proceedings IEEE. IEEE, 2014.

Page 64: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

References 1. Sanaei, Zohreh, et al. "Heterogeneity in mobile cloud computing:

taxonomy and open challenges." Communications Surveys & Tutorials, IEEE 16.1 (2014): 369-392.

2. Ra, Moo-Ryong, et al. "Odessa: enabling interactive perception applications on mobile devices." Proceedings of the 9th international conference on Mobile systems, applications, and services. ACM, 2011.

3. Shi, Cong, et al. "COSMOS: computation offloading as a service for mobile devices." Proceedings of the 15th ACM international symposium on Mobile ad hoc networking and computing. ACM, 2014.

4. Xiang, Liyao, et al. "Ready, set, go: Coalesced offloading from mobile devices to the cloud." INFOCOM, 2014 Proceedings IEEE. IEEE, 2014.

5. Kao, Yi-Hsuan, et al. "Hermes: Latency Optimal Task Assignment for Resource-constrained Mobile Computing.“, In Infocom 2015.

6. Lin, Xue, et al. "Energy and performance-aware task scheduling in a mobile cloud computing environment." Cloud Computing (CLOUD), 2014 IEEE 7th International Conference on. IEEE, 2014.

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 64

Page 65: Mobile Cloud Computing Architecturesprade/MyTalks/ICITCS Tutorial.pdf · Mobile Cloud Computing Architectures – Algorithms - Applications Pradipta De ... –AnyPresence –Appcelerator

References 1. Ra, Moo-Ryong, et al. "Odessa: enabling interactive perception applications on mobile

devices." Proceedings of the 9th international conference on Mobile systems, applications, and services. ACM, 2011.

2. Saarinen, Aki, et al. "Can offloading save energy for popular apps?."Proceedings of the seventh ACM international workshop on Mobility in the evolving internet architecture. ACM, 2012.

3. Hu, Wenlu, et al. "The case for offload shaping." Proceedings of the 16th International Workshop on Mobile Computing Systems and Applications. ACM, 2015.

4. Li, Jiwei, et al. "Make Smartphones Last A Day: Pre-processing Based Computer Vision Application Offloading.“

5. Sivakumar, Ashiwan, et al. "PARCEL: Proxy Assisted BRowsing in Cellular networks for Energy and Latency reduction." Proceedings of the 10th ACM International on Conference on emerging Networking Experiments and Technologies. ACM, 2014.

6. Barbera, Marco, et al. "Mobile offloading in the wild: Findings and lessons learned through a real-life experiment with a new cloud-aware system."INFOCOM, 2014 Proceedings IEEE. IEEE, 2014.

7. Dubey A, et al. "ScoDA: Cooperative Content Adaptation Framework for Mobile Browsing." Mobile Data Management (MDM), 2014 IEEE 15th International Conference on. Vol. 1. IEEE, 2014.

8. Lee, Kyungmin, et al. "Outatime: Using speculation to enable low-latency continuous interaction for mobile cloud gaming." Proc. of MobiSys. 2015.

8/31/2015 ICITCS 2015: Mobile Cloud Computing

©Pradipta De 65