MOBILE COMPUTINGcpoellab/teaching/cse40814... · 1/31/17 5 MBaaS – Focus on Frontend! Advantages...

12
1/31/17 1 MOBILE COMPUTING CSE 40814/60814 Spring 2017 What is Cloud Computing? NIST.GOV: “Cloud computing is a model for enabling available, convenient, on- demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, services) that can be rapidly provisioned and released with minimal management effort or service provider interaction.” This is a user-centric view and highlights: Access method = availability, convenience, on-demand, via network Computing method = shared pools, configurable virtualized resources, including application, storage, and print Setup = rapid provisioning/release, dynamic scalability, minimal management and service-provider interaction Pay-per-usewhere relevant (differs from hostedenvironments, where model is pay for maximum capacity) Not a technology but a means for using technology Treats IT more as a utility than as a capital expense that must be managed and upgraded Cloud Computing Delivery Models Software-as-a-Service (SaaS): an application environment is provided Platform-as-a-Service (PaaS): an application development platform is provided Infrastructure-as-a-Service (IaaS): infrastructure capabilities (such as storage or a bare operating system) are provided Dimension of ownership: Public (someone else owns it outside of the enterprise) Can be either a consumer or enterprise market model Private (the enterprise has sole ownership) Focus is enterprise, not consumer market Many dimensions to private, the “enterprise” can potentially include groups of enterprises, special interest groups, etc.

Transcript of MOBILE COMPUTINGcpoellab/teaching/cse40814... · 1/31/17 5 MBaaS – Focus on Frontend! Advantages...

Page 1: MOBILE COMPUTINGcpoellab/teaching/cse40814... · 1/31/17 5 MBaaS – Focus on Frontend! Advantages for Developer • Efficiency gains: reducing the development cost, development time

1/31/17

1

MOBILE COMPUTING CSE 40814/60814 Spring 2017

What is Cloud Computing? •  NIST.GOV:

•  “Cloud computing is a model for enabling available, convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, services) that can be rapidly provisioned and released with minimal management effort or service provider interaction.”

•  This is a user-centric view and highlights: •  Access method = availability, convenience, on-demand, via network •  Computing method = shared pools, configurable virtualized resources,

including application, storage, and print •  Setup = rapid provisioning/release, dynamic scalability, minimal

management and service-provider interaction •  “Pay-per-use” where relevant (differs from “hosted” environments, where

model is “pay for maximum capacity”) •  Not a technology but a means for using technology •  Treats IT more as a utility than as a capital expense that must be

managed and upgraded

Cloud Computing Delivery Models •  Software-as-a-Service (SaaS): an application

environment is provided •  Platform-as-a-Service (PaaS): an application

development platform is provided •  Infrastructure-as-a-Service (IaaS): infrastructure

capabilities (such as storage or a bare operating system) are provided

•  Dimension of ownership: •  Public (someone else owns it outside of the enterprise)

•  Can be either a consumer or enterprise market model •  Private (the enterprise has sole ownership)

•  Focus is enterprise, not consumer market •  Many dimensions to private, the “enterprise” can potentially

include groups of enterprises, special interest groups, etc.

Page 2: MOBILE COMPUTINGcpoellab/teaching/cse40814... · 1/31/17 5 MBaaS – Focus on Frontend! Advantages for Developer • Efficiency gains: reducing the development cost, development time

1/31/17

2

The Virtual Private (“Hybrid”) Cloud

Private Cloud (Internal)

Private Cloud (External)

Non-Cloud Local

Applications

External Hosted

Applications

Community Cloud

(External)

Public Cloud (External)

Public Clouds (External)

Public Clouds (External)

The Virtual Private Cloud is the aggregate of all the above environments.

Enterprise

Partners

Inter-Cloud Access

Inter-Cloud Access

Communications Circuit (dedicated, Internet, etc.)

Public Clouds (External)

The Range of Mobile Devices • Smart Phones •  Laptops, “Net-books”, iPads • Sensors • Embedded Systems (e.g., RFID Readers, Biometric

Readers, OnStar) • Vehicles, UAVs • Satellites

Mobile Apps & Cloud Computing •  “Information at your fingertips anywhere and anytime”

• Mobile Cloud Computing (MCC) •  Infrastructure where both the data storage and data

processing happen outside of the mobile device

Page 3: MOBILE COMPUTINGcpoellab/teaching/cse40814... · 1/31/17 5 MBaaS – Focus on Frontend! Advantages for Developer • Efficiency gains: reducing the development cost, development time

1/31/17

3

Mobile Cloud Computing – Why? •  Limited mobile resources

•  Battery, storage, processing, network, … •  Consider tradeoffs!

• Permanent storage •  Backup (reliability), long-term storage, anywhere access

(availability)

• Data sharing •  Social media, sensor data, collaboration, producer-consumer, …

Mobile Cloud Computing • Mobile cloud applications move the computing power and data

storage away from the mobile devices and into powerful and centralized computing platforms located in clouds, which are then accessed over the wireless connection based on a thin native client

MOBILE CLOUD COMPUTING = MOBILE COMPUTING + CLOUD COMPUTING

Mobile Cloud Computing

Page 4: MOBILE COMPUTINGcpoellab/teaching/cse40814... · 1/31/17 5 MBaaS – Focus on Frontend! Advantages for Developer • Efficiency gains: reducing the development cost, development time

1/31/17

4

Mobile Cloud Computing •  More resources •  Reliability and availability •  Sharing of data & information •  Control access of data •  MCC allows for dynamic provisioning

•  Resources always available; no need for reservation •  Mobile applications can be scaled to meet user demands •  Services can be added and expanded easily •  Multiple services can be integrated through cloud

•  New/additional services possible (or easier) •  Mobile payment •  Push notifications •  Advertising •  Analysis tools •  Social network integration •  User management tools

“Backend” • No clear definition of backend •  Front end – mobile device user interface • Backend - data, server, programs the user does not

interact with directly • Backend as a Service (Baas) • Sometimes MBaaS (M for mobile)

Definition of MBaaS •  Provide web and mobile app developers with a way to connect their

applications to backend cloud storage and processing while also providing common features such as user management, push notifications, social networking integration, and other features that mobile users demand from their apps these days

mBaaS provides End – to – End data sync framework, this ensures user always has latest data available on mobile Application

BaaS helps reduce time-to-market. Implement with 50% less effort

Kick start your customer mobility journey using ready made apps.

mBaaS features, ensures application and data security

Data Synchronization

Seamless Integration

Ready Made Apps

App Security

mBaaS

Low Memory footprint based platforms to support truly asynchronous operations with significant flexibility

Technology

Multi Channel notifications through push, SMS, email

across devices and platforms.

Notifications

Identity federation through Oauth to extract data from external platforms for augmented information

Enhanced Semantics

Rule Platform Offline & Server Side rules to establish standard operating

procedures as well as ensure compliance

Page 5: MOBILE COMPUTINGcpoellab/teaching/cse40814... · 1/31/17 5 MBaaS – Focus on Frontend! Advantages for Developer • Efficiency gains: reducing the development cost, development time

1/31/17

5

MBaaS – Focus on Frontend!

Advantages for Developer • Efficiency gains: reducing the development cost, development

time and maintenance cost

•  Faster Time To Market: reduce obstacles from idea to production and operations overhead.

• Optimized for Mobile and Tablets: optimization of data and network for mobile apps, and lower fragmentation problems across multiple platforms and devices.

• Secure & Scalable: bundled infrastructure that deals with scalability, security, performance and other operational headaches.

• Handle App Growth & Maintenance: brings common and essential 3rd party API resources into a single stack, preventing developers from having to go gather them separately.

MBaaS Providers

Page 6: MOBILE COMPUTINGcpoellab/teaching/cse40814... · 1/31/17 5 MBaaS – Focus on Frontend! Advantages for Developer • Efficiency gains: reducing the development cost, development time

1/31/17

6

Example: back4app (parse.com) •  Founded in 2011 • Acquired by Facebook in 2013 • More than 500,000 apps in 2014 • Shut down January 2017 • Made code open-source • Many replacements, including self-hosted • Back4app.com

Back4app • www.back4app.com •  iOS: http://docs.back4app.com/docs/ios/ • Android: http://docs.back4app.com/docs/android/ • Cloud Code: http://docs.back4app.com/docs/integrations/

Cloud Code (main.js) Parse.Cloud.define("notify", function (request, response) {

Parse.Push.send({ channels: request.params.channels, data: { alert: request.params.message } }, { success: function ({ response.success('Success! ' + request.params.message); }, error: function (error) { response.error('Error! ' + error.message); }, useMasterKey: true, });

});

Page 7: MOBILE COMPUTINGcpoellab/teaching/cse40814... · 1/31/17 5 MBaaS – Focus on Frontend! Advantages for Developer • Efficiency gains: reducing the development cost, development time

1/31/17

7

Cloud Code (main.js) Parse.Cloud.define("notify2", function (request, response) {

var pushQuery = new Parse.Query(Parse.Installation); pushQuery.equalTo('user', request.params.receiver); Parse.Push.send({ where: pushQuery, data: { alert: request.params.message } }, { success: function () { response.success('Success! ' + request.params.message); }, error: function (error) { response.error('Error! ' + error.message); }, useMasterKey: true, });

});

iOS Code [PFCloud callFunctionInBackground:@"notify” withParameters:@{

@"channels": @[username], @"message": message } block:^(NSString *success, NSError *error) {

if (!error) { NSLog(@”Success (%@)!”, success); } else { NSLog(@”Fail!”); } } ];

iOS Code [PFCloud callFunctionInBackground:@"notify2" withParameters:@{

@"receiver": someUser.objectId, @"message": message } block:^(NSString *success, NSError *error) {

if (!error) { NSLog(@”Success (%@)!”, success); } else { NSLog(@”Fail!”); } } ];

Page 8: MOBILE COMPUTINGcpoellab/teaching/cse40814... · 1/31/17 5 MBaaS – Focus on Frontend! Advantages for Developer • Efficiency gains: reducing the development cost, development time

1/31/17

8

Configure Mobile App •  iOS: http://docs.back4app.com/docs/ios/quickstart/ • Android:

http://docs.back4app.com/docs/android/how-to-build-an-android-app-on-back4app/

Parse/Back4app Dashboard

More Parse/Back4app •  Includes capability to do local data store

•  Save objects on device, save to cloud later •  Abstracts away a lot of the details •  Store/fetch objects in background if possible:

•  Make sure to keep app consistent •  Provide progress feedback for user

• Parse objects are meant to be "small” •  Less than 128Kb •  Parse files for large pieces of data

Page 9: MOBILE COMPUTINGcpoellab/teaching/cse40814... · 1/31/17 5 MBaaS – Focus on Frontend! Advantages for Developer • Efficiency gains: reducing the development cost, development time

1/31/17

9

MCC Applications • Mobile Learning:

•  M-learning combines e-learning and mobility •  Traditional m-learning has limitations on high cost of devices/

network, low transmission rate, limited educational resources •  Cloud-based m-learning can solve these limitations •  Enhanced communication quality between students and teachers •  Help learners access remote learning resources •  A natural environment for collaborative learning

MCC Applications • Mobile Healthcare:

•  M-healthcare is to minimize the limitations of traditional medical treatment (e.g., small storage, security/privacy, medical errors, …)

•  M-healthcare provides mobile users with convenient access to resources (e.g., medical records)

•  M-healthcare offers hospitals and healthcare organizations a variety of on-demand services on clouds

•  Examples: •  Comprehensive health monitoring services •  Intelligent emergency management system •  Health-aware mobile devices (detect pulse-rate, blood pressure, level of

alcohol, etc) •  Pervasive access to healthcare information •  Pervasive lifestyle incentive management (to manage healthcare

expenses)

MCC Applications • Mobile Gaming:

•  M-game is a high potential market generating revenues for service providers

•  Can completely offload game engine requiring large computing resource (e.g., graphic rendering) to the server in the cloud

•  Offloading can also save energy and increase game playing time •  Rendering adaptation technique can dynamically adjust the game

rendering parameters based on communication constraints and gamers’ demands

Page 10: MOBILE COMPUTINGcpoellab/teaching/cse40814... · 1/31/17 5 MBaaS – Focus on Frontend! Advantages for Developer • Efficiency gains: reducing the development cost, development time

1/31/17

10

MCC Applications • Assistive technologies:

•  Pedestrian crossing guide for blind and visually-impaired •  Mobile currency reader for blind and visually impaired •  Lecture transcription for hearing impaired students

• Other applications: •  Sharing photos/videos •  Keyword-based, voice-based, tag-based searching •  Monitoring a house, smart home systems •  …

MCC Challenges •  Mobile communication issues:

•  Low bandwidth: One of the biggest issues, because the radio resource for wireless networks is much more scarce than wired networks

•  Service availability: Mobile users may not be able to connect to the cloud to obtain a service due to traffic congestion, network failures, mobile signal strength problems

•  Heterogeneity: Handling wireless connectivity with highly heterogeneous networks to satisfy MCC requirements (always-on connectivity, on-demand scalability, energy efficiency) is a difficult problem

•  Computing issues: •  Computation offloading:

•  One of the main features of MCC •  Offloading is not always effective in saving energy •  It is critical to determine whether to offload and which portions of the

service codes to offload

MCC Security Issues • Protecting user privacy and data/application secrecy from

adversaries is key to establish and maintain consumers’ trust in the mobile platform, especially in MCC

• MCC security issues have two main categories: •  Security for mobile users •  Securing data on clouds

Page 11: MOBILE COMPUTINGcpoellab/teaching/cse40814... · 1/31/17 5 MBaaS – Focus on Frontend! Advantages for Developer • Efficiency gains: reducing the development cost, development time

1/31/17

11

Security for Mobile Users • Mobile devices are exposed to numerous security threats

like malicious codes and their vulnerability • GPS can cause privacy issues for subscribers • Security for mobile applications:

•  Installing and running security software are the simplest ways to detect security threats

•  Mobile devices are resource constrained, protecting them from the threats is more difficult than that for resourceful devices

Quality-of-Service (QoS) •  Throughput (large files; video/audio streaming)

•  Wi-Fi, LTE, Bluetooth, … •  Compression •  Prefetch

•  Latency (slow delivery of data) •  Prefetch •  Multiple cloud servers; choose closest one

Other Issues in MCC • Pricing:

•  MCC involves both mobile service provider (MSP) and cloud service provider (CSP) with different services management, customers management, methods of payment and prices

•  This will lead to many issues •  The business model including pricing and revenue sharing has to

be carefully developed for MCC

Page 12: MOBILE COMPUTINGcpoellab/teaching/cse40814... · 1/31/17 5 MBaaS – Focus on Frontend! Advantages for Developer • Efficiency gains: reducing the development cost, development time

1/31/17

12

Alternative to Parse: Firebase •  Firebase is a real-time cloud data service. Firebase

database is stored as JSON and synchronized in real time to every connected client. When you build cross-platform apps with our Android, iOS, and JavaScript SDKs, all of your clients share one Firebase database and automatically receive updates with the newest data

Choosing a MBaaS • Ease of Use (Parse, Back4app) • Automated updates (Firebase) • Analytics (User data, Crashes) • Authentication (including social media integration) • App/Database management • Push notifications • Cloud code, background jobs • System emails (password reset, verification) • Variety of APIs (iOS, Android, REST)