Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Android Cloud to Device Messaging Framework
1. Cloud to
Device Messaging
Pathway and the trend
By – Mr.Prajyot Mainkar ( @prajyotm)
C.E.O, SPM Softwares & Designers
2. SO WHAT’s IN PLATE
KEY TOPICS
Topics Time Duration
Introduction 5 mins
Cloud to Device Messaging - Breaking 10 mins
the Ice
Building Mobile Apps on Cloud 5 mins
Challenges in M-Clouds 5 mins
Emerging Trends : NFC v/s Cloud Based 10 mins
Mobile Payments
Case study : Cloud Automation 10mins
Engagement
3. DATA ACCESS METHODS
LETS DISCUSS
1. Some apps Provide Seamless Access to data in cloud
Mobile Messages or Mobile Alerts
Messages Sent to Phone
Background Threads/ Sync
5. POLLING
Key Points
1. Simple to Implement
2. Device Periodically Asks Server For New Data
3. Used widely where the content changes constantly
Any New Updates?
No
Any New Updates? Publisher/Centr
No al Server
Any New Updates?
Yes
Smartphone
6. But….
Polling Every 5mins can
consume 10% of your
Battery
And…
Nobody Likes Apps
That Drain Battery
7. Pushing
Minimizing pain of Regular Updates
Push Technology or Server Push Defines type of internet
based communication where request for transaction is
initiated by publisher/server
1. Constant Connection
2. Less Battery Consumption
3. Harder to implement
Data Publisher/Centr
al Server
Smartphone
8. INTRODUCTION TO C2DM
Breaking the ice
Android Cloud to Device Messaging (C2DM) is a service that
helps developers send data from servers to their applications on
Android devices.
•Uses Simple Google API and Supports Android 2.2 onwards
•Uses Existing Connections for Google Services
•Allows to send lightweight data messages to apps initiating notice of new data
availability
•C2DM makes no guarantee of delivery or the order of messages
•Application need not be running to receive messages.
•No building UI for handling messages data
https://developers.google.com/android/c2dm/signup
9. THE C2DM Logical Flow
Google Cloud
t
Web Browser
en 9.Remove From the queue
e to
cli C2DM Messaging
ag
em
es
s
Server
th
ev
eli pp
er
JavaScript
ssa
ge
C2DM
8.D a 7.Route the delivery
e me
e th
6 .Q
ueu Messaging Queue
1. Register with email to get
the per device registration ID
C2DM Interface Client Authentication
5.Authenticate The Request Service
ss
dre
il ad
ma en
4.Post message to the device with th e Tok
t wi
Registration ID and Token ues s Auth
req ate
tion er
n tica . Gen
au the word
s
end pas
2.Send Registration ID to server 3.S And
Client Authentication
Service
10. PEEKING UNDER THE HOOD
Cautious Points
Feature Feature Description
Background Service Honor Background settings, start when network is available
Heartbeats Maintain persistent connection with server - Use Heartbeats
to detect dead connections
Collapse Keys Latest messages replace the old ones with same key
Efficiency Minimize Heartbeat frequency, concurrent connection and
per connect over head
Attenuation Messages may not be delivered to app immediately, so
avoid constant radio wake up
Delay While Idle Device tells app server when the screen is off.
Screen off == Device Idle
Avoid Wake up of the device with unnecessary updates
11. SO WHAT’s THE FLAW?
Hmm…Lets Discuss
•Message Size : The message size limit is 1024 bytes.
•Message Limit : Google limits the number of messages a sender sends in aggregate,
and the number of messages a sender sends to a specific device
12. HANDLING QUOTE LIMIT
A registration..and that’s all
You can’t do much about the Message Size, but of the quote,
Yes! There is a Remedy
If your application needs to send a large number of C2DM Messages than the default 200,000 Messages Per
Day, Then answer the following
Are you using C2DM for payload?
C2DM is meant as a means to notify your application that there are messages available for it. You should
Not carry your data payload through C2DM.
Are you sending C2DM messages too frequently?
If you need to communicate with your application frequently over a short period of time, C2DM is probably not
the best solution.
https://developers.google.com/android/c2dm/quotas
13. BUILDING CLOUD APPS
HEADSTARTER IN M-CLOUD
CLOUD DEVELOPERS
Cloud Developers Issue cloud development
techniques to trigger cloud based apps.
CLOUD ADMIN
If you administer cloud servers or services, you
don't need access to a notebook or desktop PC
to perform routine administrative tasks.
CLOUD END USERS
The end users using the cloud apps.
14. CLOUD - DEVELOPERS
TUNING SDK’s
The AWS SDK for Android provides a library, code samples, and documentation for
developers to build connected mobile applications using Amazon Web Services.
2.A media application that uploads photos, videos, and more to Amazon Simple Storage
Service (Amazon S3) for world-wide distribution through Amazon CloudFront.
3.A social game that shares moves, high scores, and other data between devices using
Amazon SimpleDB.
4.A messaging client that broadcasts messages between devices using Amazon Simple
Queue Service (Amazon SQS) and Amazon Simple Notifications Service (Amazon SNS),
without requiring any additional server infrastructure
http://aws.amazon.com/sdkforandroid/
16. CLOUD ADMIN
TUNING ADMIN PANEL
AWS Console is a free Android app that provides a simple administrative interface to the following Amazon
Web Services: Elastic Cloud Computer (EC2), Simple Storage Service (S3), Simple Notification Service
(SNS), Relational Database Services (RDS), Route 53 (Amazon's Domain Name System Web service), and
CloudFront (Amazon's Web-hosting service).It's primarily designed for tablets running Honeycomb or Ice
Cream Sandwich, but it also works on Android phones.
17. ARE YOU CLOUD READY?
DEMYSTIFYING M-CLOUD
SECURITY CONCERNS INTEROPERATIBILITY
Since enterprises deal with sensitive data, Enterprises which allow the BYOD
security is of paramount importance policy typically need to deal with
interoperability challenges.
COLLABORATION INTEGRITY
Irrespective of whether it’s private, public or Enterprise users typically need to sync
hybrid, a cloud-based offering facilitates their devices with the cloud to maintain
collaboration among the key stakeholders. data integrity.
ACCESS
Enterprise can add a security shield to public
and hybrid networks using firewalls and
VPNs, providing access across complex cloud
21. CASE STUDY
CLOUD AUTOMATION ENGADEMENT
Self-Service Interface
Lifecycle Management
Service Delivery Automation
Operational Process Automation
Resource Management
22. GET IN TOUCH
CONTACT US Address:
SPM Softwares & Designers
f facebook.com/prajyotmainkar
Zarina Towers,St.Inez,Panaji Goa
t twitter.com/prajyotm
Phone:
+91-9822987513
linkedin.com/in/prajyotm
Email:
prajyotm@msn.com