Outline. Mobile Software Development Framework: Mobile-Cloud Services (Push/Track) Admin. Recap: Solution Space. Shared Push Service

Similar documents
Mobile Push Architectures

How do I use Push Notifications with ios?

GCM GOOGLE CLOUD MESSAGING

A Case Study of an Android* Client App Using Cloud-Based Alert Service

Extending your Qt Android application using JNI

FDA CFR PART 11 ELECTRONIC RECORDS, ELECTRONIC SIGNATURES

Using the Push Notifications Extension Part 1: Certificates and Setup

Salesforce Mobile Push Notifications Implementation Guide

1 Overview Configuration on MACH Web Portal 1

Administering Jive Mobile Apps

Salesforce Mobile Push Notifications Implementation Guide

Architecture and Data Flow Overview. BlackBerry Enterprise Service Version: Quick Reference

Google Cloud Print Administrator Configuration Guide

Configuration Guide BES12. Version 12.2

Sage Timberline Office

zevent Mobile Application

How To Develop Smart Android Notifications using Google Cloud Messaging Service

QGDocs Documentation. Release 1.0. QuantumGraph Engineers

Sophos Mobile Control Installation guide

Configuration Guide. BlackBerry Enterprise Service 12. Version 12.0

Cloud to Device Messaging with Voice Notification Using GCM

Copyright 2013, 3CX Ltd.

Symantec Mobile Management 7.2 SP3 MR1 Release Notes

UP L18 Enhanced MDM and Updated Protection Hands-On Lab

The full setup includes the server itself, the server control panel, Firebird Database Server, and three sample applications with source code.

Configuration Guide BES12. Version 12.1

BlackBerry Enterprise Service 10. Secure Work Space for ios and Android Version: Security Note

Dell World Software User Forum 2013

CLOUD MESSAGING FOR ANDROID IS A PUSH NOTIFICATION SERVICE

IETF 94 - NMRG 38 meeting Intent Based Network Modeling (IBNEMO) Bert Wijnen

Online signature API. Terms used in this document. The API in brief. Version 0.20,

Mobile Device Management Solution Hexnode MDM

Comodo Mobile Device Manager Software Version 1.0

Configuration Guide BES12. Version 12.3

This document is downloaded from DR-NTU, Nanyang Technological University Library, Singapore.

Fax User Guide 07/31/2014 USER GUIDE

PingFederate. Windows Live Cloud Identity Connector. User Guide. Version 1.0

Storage Basics Architecting the Storage Supplemental Handout

Sophos Mobile Control Installation guide. Product version: 3.5

Sophos Mobile Control Installation guide. Product version: 3

INFERRING APP DEMAND FROM PUBLICLY AVAILABLE DATA 1

Configuration Guide. BES12 Cloud

Google Developer Group Perugia DevFest Central Rome

Technical Overview Simple, Scalable, Object Storage Software

APPFORUM2014. Helping the developer community build next-generation, multi-platform apps. SCHAUMBURG, ILLINOIS SEPTEMBER 8-10

Enterprise Mobility Management Migration Migrating from Legacy EMM to an epo Managed EMM Environment. Paul Luetje Enterprise Solutions Architect

Amazon Simple Notification Service. Developer Guide API Version

Rummage Web Server Tuning Evaluation through Benchmark

Wakefield Council Secure and file transfer User guide for customers, partners and agencies

RSA Secured Implementation Guide for VPN Products

Kony MobileFabric Messaging. Demo App QuickStart Guide. (Building a Sample Application

Two Factor Authentication (TFA; 2FA) is a security process in which two methods of authentication are used to verify who you are.

BBVA Wallet Application Privacy Policy

MaaS360 Cloud Extender

GO!Enterprise MDM Device Application User Guide Installation and Configuration for ios Devices

Intermedia Cloud Softphone. User Guide

MaaS360 On-Premises Cloud Extender

Lessons from an Internet-Scale Notification System. Atul Adya

Secure synthesis and activation of protocol translation agents

GO!Enterprise MDM Device Application User Guide Installation and Configuration for ios with TouchDown

Mobile Device Management Version 8. Last updated:

Cloud Services MDM. ios User Guide

Web Inv. Web Invoicing & Electronic Payments. What s Inside. Strategic Impact of AP Automation. Inefficiencies in Current State

Microsoft Exchange 2013 Citrix NetScaler Deployment Guide

Vocera Messaging Platform Administration Guide. Version 4.8

GCM for Android Setup Guide

Mobile Iron User Guide

ENFORCING SAFETY PROPERTIES IN WEB APPLICATIONS USING PETRI NETS

APPLE PUSH NOTIFICATION IN EMC DOCUMENTUM MOBILE APPLICATION

GEM90 TrackMe GPS Tracking Application

BES10 Cloud architecture and data flows

Cloud Powered Mobile Apps with Azure

Dell Mobile Management. Apple Device Enrollment Program

Synchronization Agent Configuration Guide

Generating the APNs certificate is a three-step process: Download the AirWatch-signed CSR from the AirWatch Admin Console.

The impact of metadata implementation on webpage visibility in search engine results (Part II) q

How To Use Blackberry Web Services On A Blackberry Device

Meeting Rooms User Manual

Building Apps for iphone and ipad. Presented by Ryan Hope, Sumeet Singh

Citrix NetScaler and Citrix XenDesktop 7 Deployment Guide

Advanced Configuration Steps

Enterprise Mobile App Management Essentials. Presented by Ryan Hope and John Nielsen

An Android-based Instant Message Application

McAfee Enterprise Mobility Management 11.0 Software

A Scalable Network Monitoring System as a Public Service on Cloud

Systems Manager Cloud Based Mobile Device Management

DOCUMENT REFERENCE: SQ EN. SAMKNOWS SMARTPHONE-BASED TESTING SamKnows App for Android White Paper. March 2014

Sophos Mobile Control SaaS startup guide. Product version: 6

Publish Cisco VXC Manager GUI as Microsoft RDS Remote App

Background Deployment 3.1 (1003) Installation and Administration Guide

How To Create An Easybelle History Database On A Microsoft Powerbook (Windows)

ZENworks Mobile Management 3.0.x Deployment Quick Start

Live Maps. for System Center Operations Manager 2007 R2 v Installation Guide

Step 1. Step 2. Open your browser and go to and you will be presented a logon screen show below.

Cisco Events Mobile Application

Lab Exercise SSL/TLS. Objective. Step 1: Open a Trace. Step 2: Inspect the Trace

Transcription:

Outline Mobile Software Develoment Framework: Mobile-Cloud Services (Push/Track) Admin Mobile cloud service Push notification service Storage service Track service Slit service 10/18/2012 Y. Richard Yang 1 2 Admin. HW3 osted Reca: Accessing Data in Cloud A tyical design attern is that a device udates/receives data in the cloud Cloud as a rendezvous oint Challenge: How do you kee data on a device fresh? 3 4 Reca: Solution Sace Shared Push Service Mobile oll Cloud ush Each a ush Shared (infrastructure) ush A single ersistent connection from device to a cloud ush service rovider Multile alication roviders ush to the service rovider Service rovider ushes to a device using the ersistent connection Two examles Ale Push Notification Service (APNS) Google Cloud Messaging (GCM) 5 6 1

Design Requirements of a Shared Push Service Security/Authorization Do not allow arbitrary a to ush to a device Design Point: Authorization Design 1: A does not know registered devices. Broadcast to all. Scalability A large scale system may have millions of clients A Design 2: A query registered devices; Multicast Registration(DEV_ID, A_ID) Device Fault tolerance Client/device, ush servers all can fail Generality Design 3: Device notifies registration ID to its server; Can be used by diverse alications 7 8 Design Point: What to Push? Design Point: Reliability (What Can Go Wrong) Otion 1: Just ush signal (data available) to devices and then devices fetch from a servers Otion 2: ush a data A A sends to regids RegID=Registration(DEV_ID, A_ID) Device A Device Device notifies regid to its server; 9 10 Soft State Design State at the third arty is soft state if the the entity who sets u the state does not refresh it, the state will be runed at the 3 rd arty Ale Push Notification Service ios device maintains a ersistent TCP connection to an Ale Push Notification Server(APNS) A ush notification from a rovider to a client alication Multi-roviders to multile devices 11 12 2

! APNS Authorization: Device Token Device token Contains information that enables APNs to locate the device Client a needs to rovide the token to its a rovider Device token should be requested and assed to roviders every time your alication launches Ale Push Notification Data Each ush notification carries a ayload 256 bytes maximum Best effort delivery A rovider rovides a JSON dictionary object, which contains another dictionary identified by the key as as secifies the following actions An alert message to dislay to the user A number to badge the alication icon with A sound to lay 13 14 APNS Examle: Client 1. - (BOOL)alication:(UIAlication *)alication didfinishlaunchingwithotions:(nsdictionary *)launchotions! 2. {! 3. // Let the device know we want to receive ush notifications! 4. [[UIAlication sharedalication] registerforremotenotificationtyes:! 5. "(UIRemoteNotificationTyeBadge "UIRemoteNotificationTyeSound "UIRemoteNotificationTyeAlert)];! 6.! 7. return YES;! 8. }! 9. - (void)alication:(uialication*)alication didreceiveremotenotification:(nsdictionary*)userinfo! 10. {//userinfo contains the notification! 11. NSLog(@"Received notification: %@", userinfo);! 12. }! 13. - (void)alication:(uialication*)alication didregisterforremotenotificationswithdevicetoken:(nsdata*)devicetoken! 14. {! 15. " NSLog(@"My token is: %@", devicetoken);! 16. }! APNS Examle: Server 1. $devicetoken ='f05571e4be60a4e11524d76e4366862128f430522fb470c46fc6810fffb07af7 ;! 2. // Put your rivate key's asshrase here:! 3. $asshrase = 'PushChat';! 4. // Put your alert message here:! 5. $message = CS434: my first ush notification!';! 6. $ctx = stream_context_create();! 7. Stream_context_set_otion($ctx, 'ssl', 'local_cert', 'ck.em');! 8. stream_context_set_otion($ctx, 'ssl', 'asshrase', $asshrase);! 9. // Oen a connection to the APNS server! 10. $f = stream_socket_client(! 11. " 'ssl://gateway.sandbox.ush.ale.com:2195', $err,! 12. " $errstr, 60, STREAM_CLIENT_CONNECT STREAM_CLIENT_PERSISTENT, $ctx);! 13. if (!$f)! 14. " exit("failed to connect: $err $errstr". PHP_EOL);! 15 15. echo 'Connected to APNS'. PHP_EOL;! 16 APNS Examle: Server (cont ) Google Cloud Messaging 16. // Create the ayload body! 17. $body['as'] = array(! 18. " 'alert' => $message,! 19. " 'sound' => 'default'! 20. " );! Very similar to APNS 21. // Encode the ayload as JSON! 22. $ayload = json_encode($body);! 23. // Build the binary notification! 24. $msg = chr(0). ack('n', 32). ack('h*', $devicetoken). ack('n', strlen($ayload)). $ayload;! GCM Servers 25. // Send it to the server! 26. $result = fwrite($f, $msg, strlen($msg));! 27. if (!$result)! 28. " echo 'Message not delivered'. PHP_EOL;! 29. else! 30. " echo 'Message successfully delivered'. PHP_EOL;! 31. // Close the connection to the server! 32. fclose($f); 17 See htt://develoer.android.com/guide/google/gcm/gs.html for detailed stes 18 3

GCM Flow: A Develoer Registration A develoer registers a roject at Google Oen API console: htts://code.google.com/ais/console/ GCM Flow: Device A Registration Enable cloud to device messaging in your a Add ermissions in Manifest A (on device) registers with Google to get registration ID ublic class MyActivity extends Activity { After Create roject Project ID; Sender ID ublic void oncreate(bundle savedinstancestate) { suer.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); } GCMRegistrar.checkDevice(this); GCMRegistrar.checkManifest(this); final String regid = GCMRegistrar.getRegistrationId(this); if (regid.equals("")) { GCMRegistrar.register(this, SENDER_ID); } else { Log.v(TAG, "Already registered"); } 19 20 Device A Handle Events <receiver android:name="com.google.android.gcm.gcmbroadcastreceiver" android:ermission="com.google.android.c2dm.ermission.send" > <intent-filter> <action android:name="com.google.android.c2dm.intent.receive" /> <action android:name="com.google.android.c2dm.intent.registration" /> <category android:name="my_a_ackage" /> </intent-filter> </receiver> The GCMBroadcastReceiver (defined in GCM library) handles the broadcast messages, and calls methods defined in.gcmintentservice, if you define this service GCMIntentService // called after GCM library finishes registration // you need to send regid to your server onregistered(context context, String regid); onunregistered(context context, String regid); // called after your server sends a msg to GCM, and // GCM sends to this device onmessage(context context, Intent intent); onerror(context context, String errorid); onrecoverableerror(context context, String errorid) 21 22 A Server If you use GCM server library imort com.google.android.gcm.server.*; Sender sender = new Sender(myAiKey); Message message = new Message.Builder().build(); MulticastResult result = sender.send(message, devices, 5); Summary: GCM Flow Enabling cloud to device messaging A (on device) registers with Google to get registration ID A sends registration ID to its A Server Per message A Server sends (authenticated) message to Google Google sends message to device, which sends to a Disabling cloud to device messaging A can unregister ID, e.g., when user no longer wants ush 23 24 4

Additional Details Discussion: Mobile Cloud Services See Thialfi: A Client Notification Service for We have discussed ush notification service. Internet-Scale Alications, by Atul Adya, Gregory Cooer, Daniel Myers, Michael Piatek, ACM SOSP 2011. What other services can you think of? 25 26 Outline Examle Mobile Cloud Services Push notification service Admin Location based service Track service (suorting location based services) Mobile cloud service Push notification service Track service Storage and sync Syncing and storage service (icloud) StarTrack Next Generation: A Scalable Infrastructure for Track-Based Alications, by Maya Haridasan, Iqbal Mohomed, Doug Terry, Chandramohan A. Thekkath, and Li Zhang, in OSDI 2010. Proxy service (Kindle Slit Browser) Recognition services Seech to text/text to seech service language rocessing service (oen Siri API for 3rd arty alications in the future) Natural 27 Location-Based Alications Many hones already have the ability to determine their own location 28 A Common Abstraction: Track Time-ordered sequence of location readings GPS, cell tower triangulation, or roximity to WiFi hotsots Many mobile alications use location information La#tude: 37.4013 Longitude: - 122.0730 Time: 07/08/10 08:46:45.125 Courtesy: Maya et al. 5

32 A Taxonomy of Alications Alication: Personalized Driving Directions Goal: Find directions to new gym Personal Social Current loca=on Driving direc#ons, Nearby restaurants Friend finder, Crowd scenes Past loca=ons Personal travel journal, Geocoded hotos Post- it notes, Recommenda#ons Tracks Personalized Driving Direc#ons, Ride sharing, Discovery, Track- Based Search Urban sensing Class of alica=ons enabled by StarTrack 31 Courtesy: Maya et al. StarTrack System Inser#on Alica#on Loca#on ST Client Manager System Challenges 1. Handling error-rone tracks Inser#on ST Server 2. Flexible rogramming interface ST Server ST Client 3. Efficient imlementation of oerations on tracks Alica#on ST Server 4. Scalability and fault tolerance Retrieval Maniula#on Comarison 34 33 Challenges of Using Raw Tracks StarTrack API: Track Collections Crea#on TC MakeCollec#on(GrouCriteria criteria, bool removedulicates) Maniula#on Advantages of Canonicalization: efficient retrieval and comarison oerations Enables StarTrack to maintain a list of non-dulicate tracks TC JoinTrackCollec#ons (TC tcs[], bool removedulicates) TC SortTracks (TC tc, SortASribute asr) TC TakeTracks(TC tc, int count) TC GetSimilarTracks (TC tc, Track reftrack, float simthreshold) TC GetPassByTracks (TC tc, Area[] areas) TC GetCommonSegments(TC tc, float freqthreshold) More 35 Pre- filter tracks Maniulate tracks Fetch tracks 36 6

API Usage: Ride-Sharing Alication Track Similarity // get user s most oular track in the morning TC mytc = MakeCollec#on( name = Maya, [0800 1000], true); TC mypotc = SortTracks(myTC, FREQ); Track track = GetTracks(myPoTC, 0, 1); // find tracks of all fellow emloyees TC mstc = MakeCollec#on( name.emloyer = MS, [0800 1000], true); S5 Tracks A, B Track C s7 s6 s5 s4 S6-7 s8 // ick tracks from the community most similar to user s oular track TC similartc = GetSimilarTracks(msTC, track, 0.8); Track[] similartracks = GetTracks(similarTC, 0, 20); s3 s2 s9 Track D // Verify if each track is frequently traveled by its resec#ve owner User[] result = FindOwnersOfFrequentTracks(similarTracks); s1 S1-4 Summary The Track abstraction is simle but quite interesting Think about abstractions in your roject 39 7