27
MAPCloud: Mobile Applications on an Elastic and Scalable 2- Tier Cloud Architecture M. Reza Rahimi 1 , Nalini Venkatasubramanian 1 , Sharad Mehrotra 1 and Athanasios V. Vasilakos 2 1. University of California, Irvine, CA. 2. National Technical University of Athens, Athens, Greece. in IEEE/ACM UCC 2012, Chicago, IL, USA.

Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

Embed Size (px)

DESCRIPTION

Presented In IEEE/ACM International Conference on Utility and Cloud Computing, Chicago, IL, USA.

Citation preview

Page 1: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

MAPCloud: Mobile Applications on an Elastic and Scalable 2-Tier

Cloud Architecture

M. Reza Rahimi1, Nalini Venkatasubramanian1, Sharad Mehrotra1 and Athanasios V. Vasilakos2

1. University of California, Irvine, CA.2. National Technical University of Athens, Athens, Greece.

in IEEE/ACM UCC 2012, Chicago, IL, USA.

Page 2: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

2

Outline

Introduction and Motivation

Mathematical Formulation of the Problem

Cloud Resource Allocation for

Mobile Applications

Experimental and

Simulation Results

Conclusion and Future Directions

MAPCloud Middleware Architecture

Page 3: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

Introduction and Motivation

3

Mobile Music: 52.5%Mobile Video:25.2%Mobile Gaming: 19.3%

Sensory Based Applications

Augmented Reality

Mobile Social Networks and Crowdsourcing

Multimedia and Data Streaming

Location Based Services (LBS)

• ABI Research shows that mobile cloud computing will be rising from 42.8 million subscribers in 2008, to just over 998 million in 2014 (nearly 19%).

Page 4: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

4

Mobile Cloud Computing; What? Why?

Mobile Cloud Computing (MCC) = Using Resources on Cloud to Empower Mobile Applications

• Cellphones have limited resources such as Battery, Memory and Computation.

First Approach: Connect to Public Cloud for resource intensive tasks!

• (-) Long WAN delay [Satyanarayanan_2011] , [ Cavilla_2007] :

• unlikely to be improved while the prime target of WAN improvement is bandwidth, security, management.

• (+) Scale up Very well.

[Satyanarayanan_2011] Mahadev Satyanarayanan, “Mobile Computing: The Next Decade”, in  SIGMOBILE Mobile 2011.[ Cavilla_2007] Lagar-Cavilla, Niraj Tolia, Eyal De Lara, M. Satyanarayanan, and David O'Hallaron. “ Interactive Resource-Intensive Applications Made Easy”, In Proceedings MIDDLEWARE2007

Page 5: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

5

Second Approach: Connect to Local Clouds (Local proxies, Cloudlets) in proximity of the users for resource intensive tasks, [Clone Cloud], [MAUI], [PARM], [Calling the Cloud].

• (+) LAN delay is always order of magnitude better that WAN delay [Satyanarayanan_2011] .

• (-) Near user resources and wireless bandwidth could not scale up well.

[PARM] S. Mohapatra, M. Reza Rahimi, N. Venkatasubranian ”Power-Aware Middleware for Mobile Applications”, Chapter 10 of the Handbook of Energy-Aware and Green Computing, Chapman Hall/CRC, 2011.[Clone Cloud] Byung-Gon Chun, Sunghwan Ihm, Petros Maniatis, Mayur Naik, Ashwin Patti " CloneCloud: Elastic Execution between Mobile Device and Cloud", In EuroSys 2011.[MAUI] E. Cuervo, A. Balasubramanian, D. Cho, A. Wolman, S. Saroiu, R. Chandra, and P. Bahl " MAUI: Making Smartphones Last Longer with Code Offload", In MobiSys 2010.[Calling the Cloud] Giurgiu, O. Riva, D. Juric, I. Krivulev and G. Alonso " Calling The Cloud: Enabling Mobile Phones as Interfaces to Cloud Applications", In Middleware 2009.

Page 6: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

6

M. Reza. Rahimi, N. Venkatasubramania "MAPCloud: Mobile Applications on an Elastic 2-Tier Cloud Architecture", UCC 2012.M. Reza. Rahimi, Nalini Venkatasubramania "Exploiting an Elastic 2-Tiered Cloud Architecture for Rich Mobile Applications", poster in IEEE WoWMoM 2012.M. Reza. Rahimi, N. Venkatasubramania "Cloud Based Framework for Rich Content Mobile Applications", poster in the IEEE/ACM CCGrid 2011.M. Satyanarayanan, P. Bahl, R. Cáceres, N. Davies " The Case for VM-Based Cloudlets in Mobile Computing", In PerCom 2009.

Tier 2: Local Cloud(+) Low Delay, Low Power,

Almost Free (-) Not Scalable and

Elastic

Tier 1: Public Cloud (+) Scalable and Elastic

(-) Price, Delay

Wi-Fi Access Point

3G Access Point

RTT: ~290ms

RTT: ~80ms

Page 7: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

7

Mathematical Formulation of the Problem

• User set is defined as:

• User Service Set is the set of all supporting services of the user (computation, storage, transcoding, …):

,…, }

Decoder,Compressor,…

Page 8: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

8

• Region in space is defined as:

• Cloud Service Set is the set of all supporting services on Cloud (usually implemented as a web service ):

R1

R2

R3

Rj

Rn

Page 9: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

9

Workflow• It consists of number of logical and precise

steps known as a function (for application modeling).

• Functions could be composed together in different patterns [Mabrouk_2009] , [Zheng_2004] :F1 F2 F3

F1

F2

F4

F3

F1

F1

F2

F4

F3

SEQ LOOP

AND: CONCURRENT FUNCTIONS XOR: CONDITIONAL FUNCTIONS

k

1

1

P1

P2

𝑷 𝟏+𝑷𝟐=𝟏 , 𝑷𝟏 , 𝑷𝟐 ∈{𝟎 ,𝟏}

N. B. Mabrouk, S. Beauche, E. Kuznetsova, N. Georgantas, and V. Issarny " QoS-aware Service Composition in Dynamic Service Oriented Environments", In Middleware 2009.L. Zeng, B. Benatallah, A. H. NGU, M. Dumas, J. Kalagnanam, and H. Chang "QoS-Aware Middleware for Web Services Composition ", In IEEE Trans. Software. Eng., 2004.

Page 10: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

10

Workflow (Cont.)• Typical workflow (showed by ):

• Each in workflow could be realized and implemented by some services.

• We define as:

• Feasible solution or execution plan for a workflow W consists of n Functions is defined as:

F1

F2

F4

F3

F5

F7

F8

F61

1

P1

P2

3

Start End

Page 11: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

11

Quality of Service (QoS)

The power consumed on cellphone when he is in region using.

The price of executing for when he is in region

The delay of executing for when he is in region.

• The QoS could be defined in two different Levels: • Atomic service level and Composite service level or

workflow level.• Atomic service level could be defined as:

• The workflow QoS is defined based on different patterns as:

Qos SEQ AND XOR LOOP

Page 12: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

12

Normalization• As it can be understood different QoSes have

different dimensions (Price->$, power->joule, delay->s)

• We need the normalization process to make them comparable.

• It could be defined in different levels:• Service,• Workflow.• Services, Max and Min Services (example):

The maximum power consumed on cellphone when he is in region considering all services which implements Function.

The minimum power consumed on cellphone when he is in region considering all services which implements function.

Page 13: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

13

Normalization (Cont.)

• The higher Normalized Power/Price/Delay are The better services are (low power/price/delay).

• The same procedure could be used to define the normalized workflow as:

The maximum power consumed on cellphone considering all feasible plans for workflow W.

The minimum power consumed on cellphone considering all feasible plans for workflow W.

‖𝑾 (𝒖𝒌)𝒑𝒐𝒘𝒆𝒓‖≝¿

Page 14: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

14

Optimal Resource Allocation for Mobile Applications

• The main question in resource allocation problem is: • Knowing the mobile user workflow; what is

the optimal service allocation considering price, power and delay?

• To formally formulate this problem; we need to have utility function.

• Many has been defined in the operational research literature, we use the fairness utility for our problem.

Page 15: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

• In this optimization problem our goal is to maximize the minimum saving of power, price and delay of the mobile applications.

• This problem is NP-Hard(Knapsack is the special case) so we look for heuristic to solve this problem.

15

𝑭𝒂𝒊𝒓𝒏𝒆𝒔𝒔 𝑈𝑡𝑖𝑙𝑖𝑡𝑦 (𝑾 (𝒖𝒌))

Page 16: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

16

Cloud Resource Allocation for Mobile Applications: CRAM

• CRAM uses the combination of two main best practices in heuristic algorithm design:• Simulated Annealing (Good Global Optima

Finder)• Greedy Approach(Good Local Optima Finder)

• It then uses the following observation to customize for pervasive environment:• Near user resources usually have better QoS.

Qos

Page 17: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

17

CRAM (Cont.)• Need Efficient way to retrieve information

of services on cloud in specific region.• Example Query: “Retrieve all MPEG to AVI

decoder services in distance R of mobile user “• R-Tree is an efficient way to answer these

queries.

S3

S6

S1

S2 S8

S7S11

S5

S4

S9

S10

R1R2R

R1 R2

R3R4R5

R6

R3 R4 R5 R6

S1

S8

S11

S3

S1 S2

S4

S6

S5

S7

S9

S10

A. Silberschatz, H. F. Korth, S. Sudarshan, "Database System Concepts", McGraw-Hill, 2010.

Page 18: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

18

Simulated Annealing

CRAM (Cont.)

Utility0=InitialValue;It=0;While(It<MaxIt):

CandidateService= FindService(Utility1=Compute(CandidateService)Δ=Utility1-Utility0

If Δ > 0Utility0=Utility1

𝒎𝒊𝒏 {‖𝑾 (𝒖𝒌)𝒑𝒐𝒘𝒆𝒓‖,‖𝑾 (𝒖𝒌)𝒑𝒓𝒊𝒄𝒆‖,‖𝑾 (𝒖𝒌)𝒅𝒆𝒍𝒂𝒚‖}

Else if ()

Utility0=Utility1

Return CandidateService,Utility1

Page 19: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

19

CRAM• CRAM service selection could be as:

FindCRAMService()

--Only uses initial user locationBegin:

While()1. radius= 2. Service_List= ;3. Assigned_Services=;4. If Assigned_Services satisfy constrains 5. return Assigned_Services 6. else 5. radius = End While Return Service list;

Total Number of Services

Randomly select and assigned services to uk workflow with high

normalized price, normalized power, normalized delay and average

normalized QoS.

Fi

S1,S12,S20,S28,…

Page 20: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

20

R-Tree Indexing Structure

CRAM Core

MAPCloud Middleware Architecture

QoS-Aware Cloud DB

Mobile Profile Analyzer

Admission Control and Scheduling

Mobile User Log DB

Mobile User Space-Time DB

Cloud Service Registry

Mobile Client

Local and

Public Cloud Pool

MAPCloud Middleware

MAPCloud Analytics DB

Page 21: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

21

Experimental and Simulation Results: Mobile Applications (Case Studies)

Preprocessing: Noise cancelation,

Binarization, Area Detection

Text to Speech

Classification

Language Processing

Feature Extraction

Audio Decoding

Decode Video

Render 3D object in all Frames

Compute its Position and Orientation

Extract Symbol in all Frames

Search for Symbol in Video Frames

Encode Video

Video Augmented

Reality (VAR):

OCR+ Speech:

You Tube Link

Page 22: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

22

Mobile Applications Profiling:

Amazon EC2,S3

Local Cloud 1 Local Cloud 5

Local Cloud 2

Local Cloud 7

Local Cloud 4

Local Cloud n

S1...

Sn

S1...

Sn

S1...

Sn

S1...

Sn

S1...

Sn

large instance:equivalent to a PC with

7.5GB of memory, 850 GB of storage

Local Cloud: 64bit Windows dual-core

server, with 8GB of memory and 500GB of storage.

LAN Speed

Page 23: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

23

Simulation Results• In simulation we try to answer two important

questions:• The optimality of CRAM Algorithm in different

scenarios.• The optimality of 2-Tier Architecture in

comparison to only using public cloud.• CRAM Optimality Metrics:

Brute-Force Search has been used to find the optimal solution.

• Simulation Setup:• MATLAB and CloudSim: Simulation Platforms.• 15×15 : 100m length of each cell• # Wi-Fi Access point 50 (Uniform Dist.), 3G ubiquitous connectivity.• #Amazon Instances: [5-10]• #Local Cloud Instances:[5-10]• RWP as the Mobility model U[0-10ms]

Page 24: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

24

Simulation Results

OCRS

VCAR

Page 25: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

25

Simulation Results(Cont.)• Local Cloud+Public Cloud:

• How could we measure the performance of 2-Tiered Cloud Architecture?

• What are the reasonable metrics?

Local Cloud+Public Cloud

Public Cloud

Same Delay

Local Cloud+Public Cloud

Public Cloud

Same Power

Local Cloud+Public Cloud

Public Cloud

Same Price

Page 26: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

26

CRAM

26%

22%

Constant Price; #Users 100

CRAM

32%

7%

Constant Delay; #Users 100

CRAM

28%

10%Constant Power;

#Users 100

Page 27: Mobile Applications on an Elastic and Scalable 2-Tier Cloud Architecture

27

Conclusions and Future Directions

• 2-Tier Cloud architecture has been reviewed.

• CRAM was proposed and its optimality was investigated.

• MAPCloud middleware is reviewed for optimal service allocation.

• Future Work:1. Extending the workflow concept to space-time

workflow which capture the user mobility effects.

2. More class of mobile application such as video streaming and content sharing with CRAM extension.