Towards lication Model for Augmenting Computing Capabilities of Mobile Platforms Mobilware 2010 Xinwen Zhang, Simon Gibbs, Anugeetha Kunjithapatham, and Sangoh Jeong Computer Science Lab. Samsung Information Systems America Outline Computing for CE devices Elastic application concept and elasticity patterns Cost model Reference Implementation and applications Experimental Validations -1-1
Outline Computing for CE devices Elastic application concept and elasticity patterns Cost model Reference Implementation and applications Experimental Validations CE + Computing (1 of 2) IT View of Computing cloud = web service platform is a platform for service delivery Push from services into devices -2- -3-2
CE + Computing (2 of 2) API Proposed CE View of Computing cloud = data/core/network center + API is a platform new applications that run across the cloud and device ( elastic applications ) API exposes cloud to device apps Expand the device into the cloud Ongoing Approaches for Mobile + Clone (Hot 09) Clone of phone image at cloud Splitting applications between device and cloud Dynamic partitioning of applications (MCS 10) Dynamic remote method invocation with managed code (Mobisys 10) Dynamic Composable Computing (HotMobile 08) Dynamic composition of functions with mobile devices and surrogates. let (PVC 09) Offloading VM to proximate infrastructure 60-90s on VM synthesis HW-supported VM migration (Atom) (MobiCase 09) Focus on mobility of app Elastic Device/Application On application level Dynamic execution configuration More flexible and easy for parallel -4- -5-3
Motivation CE Devices The Compute Fixed Storage Fixed* Power Limited Bandwidth Limited Applications CONSTRAINED Compute ELASTIC Storage ELASTIC Applications UNCONSTRAINED The goal of the Elastic Device is to enable development of cross device/cloud applications. The advantages are: Remove device constraints, create new classes of powerful applications Help realize a new business model for device applications Provide developers a transition path to multi/many core Outline Computing for CE devices Elastic application concept and elasticity patterns Cost model Reference Implementation and applications Experimental Validations -6- -7-4
Elastic Device Concept Platform Application Store App UI Container New! App Elastic Layer App When device resources are sufficient When device resources are not sufficient Operating System Hardware Core RAM Flash Core Battery -8- lications (EA) EA are cloud aware applications s Define discrete application components Communicate using REST interface Run on Device or Can be replicated to handle loads Application GUI Launches the program Directs the creation of new weblets Manifest Meta-data of EA Dynamic configuration info Integrity of weblets Policies for each weblet E.g. JVM, network, access control, location App GUI Manifest Integrity Security Settings Manifest Access Control Location Info -9-5
Elastic Devices (ED) ED support EAs Enable seamless migration of weblets Manage resources to optimize costs Interface with cloud providers Elastic Manager Spawns weblets on demand Migrates weblets to / from cloud Senses resource availability Fabric Interface Fabric Interface Exposes cloud services to devices Controls weblets on behalf of EM Start / Stop / Create / Destroy Can provide PaaS or IaaS model Elastic Manager App GUI Elastic Device Application Model UI Application weblet weblet code h w UI may be device dependent, possibilities: Native code HTML+CSS+JavaScript Flash or Silverlight s are device independent, possibilities: Java bytecode CLR bytecode Python bytecode data data Autonomous Communicate via HTTP Long-living requests Dedicated (to a client) Persistent data Migratable Synchronizable h weblet request handler w weblet worker -10- -11-6
Benefits Many-to-one virtualization Seamlessly expands and shrinks of platform capability Dynamic user experience User control of expending/shrinking based on factors such as battery consuming, monetary cost, latency/throughput, etc. Device flexibility CE device computation and storage capabilities need not be designed to satisfy the most demanding applications. Dependability Migrating applications to cloud when device is low in battery/weak signal Future proof: Move app from cloud to device, extend app lifetime, reduce development cost s vs Web Services HTTP (REST interface) Web Service HTTP (REST or SOAP interface) single client many clients short-lived & long-lived requests short-lived requests dynamic endpoints (may migrate) lifetime is client dependent fixed endpoints (eg, http://www.google.com) lifetime is client independent runs on servers or client (cloud or device) push to client runs on servers NA / non-standard -12- -13-7
Elasticity Patterns Device Device Replication Pattern Device Device 1 Splitter 2 Splitter Pattern 3 Device Device 1 Aggregator 2 Aggregator Pattern 3 Execution Configurations HTTP request push Elasticity Patterns Outline Computing for CE devices Elastic application concept and elasticity patterns Cost model Reference Implementation and applications Experimental Validations -14- -15-8
Cost Model Sensing (Inputs) Actions (Outputs) battery level network quality device loads cloud loads Scheduler Goal (examples) - minimize costs - maximize performance - minimize power - maximize robustness - maximize security 1) allocation & migration (at launch & run-time) 2) connection selection & switching weblet UI 3) replication wi wiwiwi WiFi 3G w cloud device (weblet pool) aggregated performance data Constraints - resources -cost model - application requirements 4) shadowing UI w w Cost-Optimal Execution Configuration < Training System > < User Device > s -17- CPU Processing time Usage Memory Usage 1 usage cost 0 p1 p2 p3 p4 pm x (Status Vector) Log data Run the training system for all configurations and collect related status vectors y (SWA configuration) Training data ( x, y ) 1 ( x, y. (x, y) n ) 2 Offline computation Cost Prediction -16- Preferred cost-optimal SWA configuration decision p (User preference vector) * (Suggested SWA y configuration for the same-type devices) (# of device SWA s, # of SWA s) 9
Outline Computing for CE devices Elastic application concept and elasticity patterns Cost model Reference Implementation and applications Experimental Validations Reference Architecture Elastic application package including UI and weblets nodes running on Amazon EC2 instances Web service based CFI Application installation on both cloud and device sides IaaS/PaaS Node Manager 1 Container Elasticity Service Application Manager Sensing Manager Fabric Interface Http(s) Elastic Application UI manifest weblet1 weblet 2 UI Container Elastic Layer Device Elasticity Manager Application Installation UI Application Store http Router Sensing Http(s) Elastic Device 2 Container -18- -19-10
SDK Development C# binding only so far A weble is an independent functional unit of an application A weblet resembles an embedded or dedicated web server presents a web service interface accessed via HTTP AppRoot is root UI of an application Actions are HTTP requests Elastic Image Processing Samsung Q1 Samsung Omnia Samsung Galaxy Monitor Image 1 App on Device (Analysis & Filtering of images) Image 2 Image n ElasticIP App Image on device: image processing on cloud: image processing -20- -21-11
Elastic Augmented Video Samsung Q1 ElasticAV Application (identify, track & replace target images) ElasticAV App Camera Tracker Composito r Splitter Matcher 1 Matcher 2 Matcher n planar object recognition and replacement on device: feature point extraction from video, tracking, compositing on cloud: matching live features against library of target images Elastic Augmented Reality ElasticAR Application (register POI icons & real-time info on live camera) POI Servic e ElasticAV App Tracker Composit GPS or Compass Camera Crowd Sim Samsung Galaxy on device: using compass and GPS to align POI markers with live video from camera on cloud: POI service and crowd simulator (gives # people in proximity to POI s) -22- -23-12
Outline Computing for CE devices Elastic application concept and elasticity patterns Cost model Reference Implementation and applications Experimental Validations -24- Experimental Validation Elastic Image Processing application Running on device only and on lab cloud cluster LAMP as web service stack on each cloud node Measured upload/download bandwidth, workload, cpu usage, and available memory Monitor App Monitor App CFI Non- DEM Image Node 1 Controller Image Image Image Image Image Image Node m Controller -25-13
Throughput vs. Configurations Average Throughput (tiles/sec) 50 45 40 35 30 25 20 15 (0,8) (0,16) (1,7) (1,15) (2,7) (2,14) (3,9) (3,13) (4,6) (4,12) 10 5 0 (0,1) (1,0) (2,0) (3,0) (4,0) Configurations = (# of Device s, # of s) CPU usage rate vs. configurations 100 90 (1,7) (1,15) (2,7) (2,14) (3,13) (4,6) (4,12) Average CPU usage (%) 80 70 60 50 40 30 (0,8) (0,16) (3,9) 20 10 0 (0,1) (1,0) (2,0) (3,0) Configurations = (# of Device s, # of s) (4,0) -26- -27-14
Ongoing and Future Work Implementation of more general cost optimization With more sensing data from both device and cloud Cost model as a service Migration and replicate of code and data Some synchronizing protocols Allow offline Security and privacy Mutual authentication between weblets on device and cloud Authorization delegation to weblets running on public cloud Q & A -28- -29-15