SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Deep Dive in
GCM
Google Cloud Messaging for Android




By – Mr.Prajyot Mainkar ( @prajyotm)
Founder & C.E.O, SPM Softwares & Designers,
Android Developer and Editor in Chief – Androcid.com
SO WHAT’s IN PLATE
KEY TOPICS

           Topics           Time Duration
         Introduction          5 mins
    C2DM to GCM Migration      15 mins
     About GCM Features        10 mins
How To Keep the Data on
Your Device,Fresh?
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
But….
 Polling Consumes Lot of
     Battery Resource
And…
    Nobody Likes Apps
     That Drain Battery
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
What is GCM ?
Breaking the ice
Google Cloud Messaging for Android (GCM) is a service that
helps developers send data from servers to their Android
applications on Android devices.

The GCM service handles all aspects of queueing of messages
and delivery to the target Android application running on the
target device.

4.7 Millisecond* – when GCM receives the message till the time
GCM sends the message. ( 1/10th sec globally )
So Why GCM Migration?
The Focus
The focus of GCM is as follows:
1.Ease of use.
2.No Buggy sign-up forms.
3.Limitless Quotes (unlike C2DM)
4.GCM and C2DM stats are available through the Android
   Developer Console.
5. Battery efficiency.
6. Rich set of new APIs.
GCM Registration
  ABC News Server                                                          GCM

          3.                                                    ID
             Re                                              n
                                                           io                 n
                gi                                     rat                 tio
                   s   tra                        gist                   ra
                                                                      s t es t
                             ti o               Re                  gi u
                                                                   e q
                                    n
                                        ID   2.                . R Re
                                                              1




                                                                     4.Message Received by the
                                                                       Device from the server
GCM Uninstall State
   ABC News Server                                 GCM
                       Device Not
                       Registered




                                                  er
                                               rv
                                             Se
                                          e
                                        th
                                       y
                                      ti f
                                    No

                     Uninstalled App
GCM Console Keys

                   Project ID



                      API Key
GCM Registration
   GCM



       {Intent}


GCM Framework



                     Project ID




Mobile Application
GCM Data Receive
                     Import
   GCM               com.google.android.gcm.GCMBaseIntentService;

                     Public class GCMIntentService extends
RegID
        {Intent}
                     GCMBaseIntentService {
GCM Framework        @override

                     Protected void onRegistered ( Context ctx, String
                     regId) {
                     sendToNewsServer(RegID)



Mobile Application
GCM Permission
   GCM               <uses-permission android:name=
                     "com.google.android.c2dm.permission.RECE
RegID                IVE" />
        {Intent}


GCM Framework




Mobile Application
Server
 {RegID, API Key}                 {RegID,API Key}

ABC News Server                        GCM                            Auth

               HTTP Post Request                     Project ID




                     Content-Type:application/json Authorization:key=AIzaSyB-
                     1uEai2WiUapxCs2Q0GZYzPu7Udno5aA
                     { "registration_id" : "APA91bHun4MxP5egoKMwt2KZFBaFUH-1RYqx...",
                     "data" :
                     { ”Topic" : ”Goa",
                     ”Region" : "3",
                     ”Reporter" : ”Mahesh",
                     },
Mobile Application   }
Power of GCM
… And they are Different
 1.   Simple API Key
 2.   Sender ID
 3.   JSON format
 4.   Multicast messages
 5.   Multiple senders
 6.   Time-to-live
 7.   Messages with payload
 8.   Canonical registration ID
MultiCast Messages(Multicast API)

ABC News Server                        GCM




 Mobile Application   Mobile Application     Mobile Application
      User 1               User 2                 User 3
MultiCast Messages(Multicast API)
{
“collapse_key” : “Goa news”,
“data” : {
”Topic" : ”Goa News",
”Reporter" : ”Mahesh",                           Collapse Key
}
                               Reg Device ID’s
“registration_ids” : [
"APA91bHun4MxP5egoKMwt2KZFBaFUH-1RYqx...”,
"goKMwt2KZFBaFUH-1RYqxAPA91bHun4MxP5e...”,
]
},
Multiple Sender

ABC News Server         GCM   Social Update
                                 Server




   Mobile Application
Time To Live

ABC News Server         GCM




   Mobile Application
Message with payload

ABC News Server                      GCM


        Full Sync



                        •Up to 100 messages before initiating full sync
                        •4K size per message


   Mobile Application
GCM Reliability
Ensuring Data Containership RMQ

                                         GCM
RMQ    GCM

                                               Re-Connects when Device is
          Message Lost Due to Offline                   Online
                   Device
                                                     ACK Bunch




      News App                          News App
GCM Optimization
                                   4K

World cup Server       GCM
                                   4K   8K


                                   4K   8K   16K




                   World Cup App
GCM Optimization
                                        Delete All The
                                   4K    Messages
World cup Server       GCM
                                   4K   8K


                                   4K   8K      16K



   Sync-Process




                   World Cup App
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
GET IN TOUCH
CONTACT US
      http://facebook.com/prajyotmainkar


       http://twitter.com/prajyotm


       http://linkedin.com/in/prajyotm


        + Prajyot Mainkar


Phone: +91-9822987513
Email: prajyotm@msn.com

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to google cloud messaging in android
Introduction to google cloud messaging in androidIntroduction to google cloud messaging in android
Introduction to google cloud messaging in androidRIA RUI Society
 
GCM with Pushbots
GCM with PushbotsGCM with Pushbots
GCM with PushbotsAshish RAj
 
GOOGLE CLOUD MESSAGING PPT 2017
GOOGLE CLOUD MESSAGING PPT 2017GOOGLE CLOUD MESSAGING PPT 2017
GOOGLE CLOUD MESSAGING PPT 2017ketan Bordekar
 
Firebase Cloud Messaging Device to Device
Firebase Cloud Messaging Device to DeviceFirebase Cloud Messaging Device to Device
Firebase Cloud Messaging Device to DeviceTakuma Lee
 
google cloud messaging
google cloud messaginggoogle cloud messaging
google cloud messagingBhavana Sharma
 
GCM Technology for Android
GCM Technology for AndroidGCM Technology for Android
GCM Technology for AndroidRanjitha R_14
 
Push it! How to use Google Cloud Messaging in your Android App
Push it! How to use Google Cloud Messaging in your Android AppPush it! How to use Google Cloud Messaging in your Android App
Push it! How to use Google Cloud Messaging in your Android AppAchim Fischer
 
ID Android TechTalk Series #6 : Google Service and Gradle - Andrew Kurniadi
ID Android TechTalk Series #6 : Google Service and Gradle - Andrew KurniadiID Android TechTalk Series #6 : Google Service and Gradle - Andrew Kurniadi
ID Android TechTalk Series #6 : Google Service and Gradle - Andrew KurniadiDicoding
 
Android Cloud To Device Messaging
Android Cloud To Device MessagingAndroid Cloud To Device Messaging
Android Cloud To Device MessagingFernando Cejas
 
Developing Android Client Apps via SyncAdapter
Developing Android Client Apps via SyncAdapterDeveloping Android Client Apps via SyncAdapter
Developing Android Client Apps via SyncAdapterAnatoliy Kaverin
 
Android BroadcastReceiver - How to start a service using BroadcastReceiver
Android BroadcastReceiver - How to start a service using BroadcastReceiverAndroid BroadcastReceiver - How to start a service using BroadcastReceiver
Android BroadcastReceiver - How to start a service using BroadcastReceiverSriSankeerth Reddy
 
Effective use of amazon web services for web deployment
Effective use of amazon web services for web deploymentEffective use of amazon web services for web deployment
Effective use of amazon web services for web deploymentGhazanfar Latif (Gabe)
 
Firebase on Android: The Big Picture
Firebase on Android: The Big PictureFirebase on Android: The Big Picture
Firebase on Android: The Big PictureSriyank Siddhartha
 

Was ist angesagt? (20)

Introduction to google cloud messaging in android
Introduction to google cloud messaging in androidIntroduction to google cloud messaging in android
Introduction to google cloud messaging in android
 
FCM & GCM
FCM & GCMFCM & GCM
FCM & GCM
 
GCM with Pushbots
GCM with PushbotsGCM with Pushbots
GCM with Pushbots
 
Gcm tutorial
Gcm tutorialGcm tutorial
Gcm tutorial
 
GOOGLE CLOUD MESSAGING PPT 2017
GOOGLE CLOUD MESSAGING PPT 2017GOOGLE CLOUD MESSAGING PPT 2017
GOOGLE CLOUD MESSAGING PPT 2017
 
Firebase Cloud Messaging Device to Device
Firebase Cloud Messaging Device to DeviceFirebase Cloud Messaging Device to Device
Firebase Cloud Messaging Device to Device
 
google cloud messaging
google cloud messaginggoogle cloud messaging
google cloud messaging
 
GCM Technology for Android
GCM Technology for AndroidGCM Technology for Android
GCM Technology for Android
 
Push it! How to use Google Cloud Messaging in your Android App
Push it! How to use Google Cloud Messaging in your Android AppPush it! How to use Google Cloud Messaging in your Android App
Push it! How to use Google Cloud Messaging in your Android App
 
Magda badita gcm
Magda badita  gcmMagda badita  gcm
Magda badita gcm
 
ID Android TechTalk Series #6 : Google Service and Gradle - Andrew Kurniadi
ID Android TechTalk Series #6 : Google Service and Gradle - Andrew KurniadiID Android TechTalk Series #6 : Google Service and Gradle - Andrew Kurniadi
ID Android TechTalk Series #6 : Google Service and Gradle - Andrew Kurniadi
 
Google cloud messaging
Google cloud messagingGoogle cloud messaging
Google cloud messaging
 
Android Cloud To Device Messaging
Android Cloud To Device MessagingAndroid Cloud To Device Messaging
Android Cloud To Device Messaging
 
Workshop: Android
Workshop: AndroidWorkshop: Android
Workshop: Android
 
Developing Android Client Apps via SyncAdapter
Developing Android Client Apps via SyncAdapterDeveloping Android Client Apps via SyncAdapter
Developing Android Client Apps via SyncAdapter
 
Android BroadcastReceiver - How to start a service using BroadcastReceiver
Android BroadcastReceiver - How to start a service using BroadcastReceiverAndroid BroadcastReceiver - How to start a service using BroadcastReceiver
Android BroadcastReceiver - How to start a service using BroadcastReceiver
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 
Effective use of amazon web services for web deployment
Effective use of amazon web services for web deploymentEffective use of amazon web services for web deployment
Effective use of amazon web services for web deployment
 
Firebase on Android: The Big Picture
Firebase on Android: The Big PictureFirebase on Android: The Big Picture
Firebase on Android: The Big Picture
 
Firebase
FirebaseFirebase
Firebase
 

Andere mochten auch

Google Cloud Messaging
Google Cloud MessagingGoogle Cloud Messaging
Google Cloud MessagingArvind Devaraj
 
Ankara Cloud Meetup 6. Etkinlik Scaling Real-Time Messaging on Cloud Sunumu
Ankara Cloud Meetup 6. Etkinlik Scaling Real-Time Messaging on Cloud SunumuAnkara Cloud Meetup 6. Etkinlik Scaling Real-Time Messaging on Cloud Sunumu
Ankara Cloud Meetup 6. Etkinlik Scaling Real-Time Messaging on Cloud Sunumuİbrahim Gürses
 
Trending The Future - space150 v27
Trending The Future - space150 v27Trending The Future - space150 v27
Trending The Future - space150 v27space150
 
Android Cloud to Device Messaging with the Google App Engine
Android Cloud to Device Messaging with the Google App EngineAndroid Cloud to Device Messaging with the Google App Engine
Android Cloud to Device Messaging with the Google App EngineLars Vogel
 
secure data retrieval for decentralized disruption-tolerant military networks
secure data retrieval for decentralized disruption-tolerant military networkssecure data retrieval for decentralized disruption-tolerant military networks
secure data retrieval for decentralized disruption-tolerant military networksswathi78
 
Eucalyptus: Open Source for Cloud Computing
Eucalyptus: Open Source for Cloud ComputingEucalyptus: Open Source for Cloud Computing
Eucalyptus: Open Source for Cloud Computingclive boulton
 
[ApacheCon 2016] Advanced Apache Cordova
[ApacheCon 2016] Advanced Apache Cordova[ApacheCon 2016] Advanced Apache Cordova
[ApacheCon 2016] Advanced Apache CordovaHazem Saleh
 
Jump into cross platform development with firebase
Jump into cross platform development with firebaseJump into cross platform development with firebase
Jump into cross platform development with firebaseConstantine Mars
 
Azure Mobile Services for Cross Platform Mobile Apps
Azure Mobile Services for Cross Platform Mobile AppsAzure Mobile Services for Cross Platform Mobile Apps
Azure Mobile Services for Cross Platform Mobile AppsWinWire Technologies Inc
 
PhoneGap: Building Mobile Applications with HTML/JS
PhoneGap: Building Mobile Applications with HTML/JSPhoneGap: Building Mobile Applications with HTML/JS
PhoneGap: Building Mobile Applications with HTML/JSRyan Stewart
 
Iris-iPNS / 푸시 솔루션 (Push Solution) 제품 소개
Iris-iPNS / 푸시 솔루션 (Push Solution)  제품 소개Iris-iPNS / 푸시 솔루션 (Push Solution)  제품 소개
Iris-iPNS / 푸시 솔루션 (Push Solution) 제품 소개현용 황
 
Big Data Analysis Patterns with Hadoop, Mahout and Solr
Big Data Analysis Patterns with Hadoop, Mahout and SolrBig Data Analysis Patterns with Hadoop, Mahout and Solr
Big Data Analysis Patterns with Hadoop, Mahout and Solrboorad
 
Build Your Mobile App with AWS Mobile Services
Build Your Mobile App with AWS Mobile ServicesBuild Your Mobile App with AWS Mobile Services
Build Your Mobile App with AWS Mobile ServicesAmazon Web Services
 

Andere mochten auch (19)

Google Cloud Messaging
Google Cloud MessagingGoogle Cloud Messaging
Google Cloud Messaging
 
Pitch that matters
Pitch that mattersPitch that matters
Pitch that matters
 
Ankara Cloud Meetup 6. Etkinlik Scaling Real-Time Messaging on Cloud Sunumu
Ankara Cloud Meetup 6. Etkinlik Scaling Real-Time Messaging on Cloud SunumuAnkara Cloud Meetup 6. Etkinlik Scaling Real-Time Messaging on Cloud Sunumu
Ankara Cloud Meetup 6. Etkinlik Scaling Real-Time Messaging on Cloud Sunumu
 
Trending The Future - space150 v27
Trending The Future - space150 v27Trending The Future - space150 v27
Trending The Future - space150 v27
 
Building Modern Web Apps Using ASP.NET 5
Building Modern Web Apps Using ASP.NET 5Building Modern Web Apps Using ASP.NET 5
Building Modern Web Apps Using ASP.NET 5
 
Android Cloud to Device Messaging with the Google App Engine
Android Cloud to Device Messaging with the Google App EngineAndroid Cloud to Device Messaging with the Google App Engine
Android Cloud to Device Messaging with the Google App Engine
 
secure data retrieval for decentralized disruption-tolerant military networks
secure data retrieval for decentralized disruption-tolerant military networkssecure data retrieval for decentralized disruption-tolerant military networks
secure data retrieval for decentralized disruption-tolerant military networks
 
Eucalyptus: Open Source for Cloud Computing
Eucalyptus: Open Source for Cloud ComputingEucalyptus: Open Source for Cloud Computing
Eucalyptus: Open Source for Cloud Computing
 
[ApacheCon 2016] Advanced Apache Cordova
[ApacheCon 2016] Advanced Apache Cordova[ApacheCon 2016] Advanced Apache Cordova
[ApacheCon 2016] Advanced Apache Cordova
 
cloude computing
cloude computingcloude computing
cloude computing
 
Jump into cross platform development with firebase
Jump into cross platform development with firebaseJump into cross platform development with firebase
Jump into cross platform development with firebase
 
Azure Mobile Services for Cross Platform Mobile Apps
Azure Mobile Services for Cross Platform Mobile AppsAzure Mobile Services for Cross Platform Mobile Apps
Azure Mobile Services for Cross Platform Mobile Apps
 
Apple push notification service
Apple push notification serviceApple push notification service
Apple push notification service
 
PhoneGap: Building Mobile Applications with HTML/JS
PhoneGap: Building Mobile Applications with HTML/JSPhoneGap: Building Mobile Applications with HTML/JS
PhoneGap: Building Mobile Applications with HTML/JS
 
Java project-presentation
Java project-presentationJava project-presentation
Java project-presentation
 
All About Phonegap
All About Phonegap All About Phonegap
All About Phonegap
 
Iris-iPNS / 푸시 솔루션 (Push Solution) 제품 소개
Iris-iPNS / 푸시 솔루션 (Push Solution)  제품 소개Iris-iPNS / 푸시 솔루션 (Push Solution)  제품 소개
Iris-iPNS / 푸시 솔루션 (Push Solution) 제품 소개
 
Big Data Analysis Patterns with Hadoop, Mahout and Solr
Big Data Analysis Patterns with Hadoop, Mahout and SolrBig Data Analysis Patterns with Hadoop, Mahout and Solr
Big Data Analysis Patterns with Hadoop, Mahout and Solr
 
Build Your Mobile App with AWS Mobile Services
Build Your Mobile App with AWS Mobile ServicesBuild Your Mobile App with AWS Mobile Services
Build Your Mobile App with AWS Mobile Services
 

Ähnlich wie Deep Dive into GCM Architecture and Features

我的GCM時代-推送訊息的實做分享
我的GCM時代-推送訊息的實做分享我的GCM時代-推送訊息的實做分享
我的GCM時代-推送訊息的實做分享Morning Kao
 
Push to Me: Mobile Push Notifications (Zend Framework)
Push to Me: Mobile Push Notifications (Zend Framework)Push to Me: Mobile Push Notifications (Zend Framework)
Push to Me: Mobile Push Notifications (Zend Framework)Mike Willbanks
 
Real Time Tracking of Complete Transport System Using GPS
Real Time Tracking of Complete Transport System Using GPSReal Time Tracking of Complete Transport System Using GPS
Real Time Tracking of Complete Transport System Using GPSMit mysore
 
GOOGLE CLOUD MESSAGING (GCM): A LIGHT WEIGHT COMMUNICATION MECHANISM BETWEEN ...
GOOGLE CLOUD MESSAGING (GCM): A LIGHT WEIGHT COMMUNICATION MECHANISM BETWEEN ...GOOGLE CLOUD MESSAGING (GCM): A LIGHT WEIGHT COMMUNICATION MECHANISM BETWEEN ...
GOOGLE CLOUD MESSAGING (GCM): A LIGHT WEIGHT COMMUNICATION MECHANISM BETWEEN ...ijistjournal
 
Anthos Security: modernize your security posture for cloud native applications
Anthos Security: modernize your security posture for cloud native applicationsAnthos Security: modernize your security posture for cloud native applications
Anthos Security: modernize your security posture for cloud native applicationsGreg Castle
 
What’s new in Android? - Kenji Kawaida
What’s new in Android? - Kenji KawaidaWhat’s new in Android? - Kenji Kawaida
What’s new in Android? - Kenji Kawaidagdgsantacruz
 
Microservices summit talk 1/31
Microservices summit talk   1/31Microservices summit talk   1/31
Microservices summit talk 1/31Varun Talwar
 
SCCM Intune Windows 10 Co Management Architecture Decisions
SCCM Intune Windows 10 Co Management Architecture DecisionsSCCM Intune Windows 10 Co Management Architecture Decisions
SCCM Intune Windows 10 Co Management Architecture DecisionsAnoop Nair
 
Deep Dive into SpaceONE
Deep Dive into SpaceONEDeep Dive into SpaceONE
Deep Dive into SpaceONEChoonho Son
 
GCP Meetup #3 - Approaches to Cloud Native Architectures
GCP Meetup #3 - Approaches to Cloud Native ArchitecturesGCP Meetup #3 - Approaches to Cloud Native Architectures
GCP Meetup #3 - Approaches to Cloud Native Architecturesnine
 
How FINRA achieves DevOps agility while securing its AWS environments - GRC33...
How FINRA achieves DevOps agility while securing its AWS environments - GRC33...How FINRA achieves DevOps agility while securing its AWS environments - GRC33...
How FINRA achieves DevOps agility while securing its AWS environments - GRC33...Amazon Web Services
 
Android cloud to device messaging
Android cloud to device messagingAndroid cloud to device messaging
Android cloud to device messagingFe
 
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, GoogleBringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, GoogleAmbassador Labs
 
4_pillars_for_app_development_in_GCP.pdf
4_pillars_for_app_development_in_GCP.pdf4_pillars_for_app_development_in_GCP.pdf
4_pillars_for_app_development_in_GCP.pdfLuillyfe Blanco
 

Ähnlich wie Deep Dive into GCM Architecture and Features (20)

我的GCM時代-推送訊息的實做分享
我的GCM時代-推送訊息的實做分享我的GCM時代-推送訊息的實做分享
我的GCM時代-推送訊息的實做分享
 
GCM aperitivo Android
GCM aperitivo AndroidGCM aperitivo Android
GCM aperitivo Android
 
Push to Me: Mobile Push Notifications (Zend Framework)
Push to Me: Mobile Push Notifications (Zend Framework)Push to Me: Mobile Push Notifications (Zend Framework)
Push to Me: Mobile Push Notifications (Zend Framework)
 
Real Time Tracking of Complete Transport System Using GPS
Real Time Tracking of Complete Transport System Using GPSReal Time Tracking of Complete Transport System Using GPS
Real Time Tracking of Complete Transport System Using GPS
 
A Journey into Google Cloud Messaging
A Journey into Google Cloud MessagingA Journey into Google Cloud Messaging
A Journey into Google Cloud Messaging
 
GOOGLE CLOUD MESSAGING (GCM): A LIGHT WEIGHT COMMUNICATION MECHANISM BETWEEN ...
GOOGLE CLOUD MESSAGING (GCM): A LIGHT WEIGHT COMMUNICATION MECHANISM BETWEEN ...GOOGLE CLOUD MESSAGING (GCM): A LIGHT WEIGHT COMMUNICATION MECHANISM BETWEEN ...
GOOGLE CLOUD MESSAGING (GCM): A LIGHT WEIGHT COMMUNICATION MECHANISM BETWEEN ...
 
Anthos Security: modernize your security posture for cloud native applications
Anthos Security: modernize your security posture for cloud native applicationsAnthos Security: modernize your security posture for cloud native applications
Anthos Security: modernize your security posture for cloud native applications
 
What’s new in Android? - Kenji Kawaida
What’s new in Android? - Kenji KawaidaWhat’s new in Android? - Kenji Kawaida
What’s new in Android? - Kenji Kawaida
 
Microservices summit talk 1/31
Microservices summit talk   1/31Microservices summit talk   1/31
Microservices summit talk 1/31
 
SCCM Intune Windows 10 Co Management Architecture Decisions
SCCM Intune Windows 10 Co Management Architecture DecisionsSCCM Intune Windows 10 Co Management Architecture Decisions
SCCM Intune Windows 10 Co Management Architecture Decisions
 
Deep Dive into SpaceONE
Deep Dive into SpaceONEDeep Dive into SpaceONE
Deep Dive into SpaceONE
 
GCP Meetup #3 - Approaches to Cloud Native Architectures
GCP Meetup #3 - Approaches to Cloud Native ArchitecturesGCP Meetup #3 - Approaches to Cloud Native Architectures
GCP Meetup #3 - Approaches to Cloud Native Architectures
 
FcmD2D
FcmD2DFcmD2D
FcmD2D
 
AMIT SRIVASTAVA
AMIT SRIVASTAVAAMIT SRIVASTAVA
AMIT SRIVASTAVA
 
Gc Easy
Gc EasyGc Easy
Gc Easy
 
How FINRA achieves DevOps agility while securing its AWS environments - GRC33...
How FINRA achieves DevOps agility while securing its AWS environments - GRC33...How FINRA achieves DevOps agility while securing its AWS environments - GRC33...
How FINRA achieves DevOps agility while securing its AWS environments - GRC33...
 
Android cloud to device messaging
Android cloud to device messagingAndroid cloud to device messaging
Android cloud to device messaging
 
Where should I run my code? Serverless, Containers, Virtual Machines and more
Where should I run my code? Serverless, Containers, Virtual Machines and moreWhere should I run my code? Serverless, Containers, Virtual Machines and more
Where should I run my code? Serverless, Containers, Virtual Machines and more
 
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, GoogleBringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
 
4_pillars_for_app_development_in_GCP.pdf
4_pillars_for_app_development_in_GCP.pdf4_pillars_for_app_development_in_GCP.pdf
4_pillars_for_app_development_in_GCP.pdf
 

Mehr von Prajyot Mainkar

Kolkata kreate - Talk by Prajyot Mainkar
Kolkata kreate - Talk by Prajyot MainkarKolkata kreate - Talk by Prajyot Mainkar
Kolkata kreate - Talk by Prajyot MainkarPrajyot Mainkar
 
Devfest baroda 2019 By prajyot mainkar
Devfest baroda 2019 By prajyot mainkarDevfest baroda 2019 By prajyot mainkar
Devfest baroda 2019 By prajyot mainkarPrajyot Mainkar
 
Android Power Optimization: May the Power be with you
Android Power Optimization: May the Power be with youAndroid Power Optimization: May the Power be with you
Android Power Optimization: May the Power be with youPrajyot Mainkar
 
Gaining the app visibility that matters
Gaining the app visibility that mattersGaining the app visibility that matters
Gaining the app visibility that mattersPrajyot Mainkar
 
Nitrodroid 2013 - Closing Report
Nitrodroid 2013 - Closing ReportNitrodroid 2013 - Closing Report
Nitrodroid 2013 - Closing ReportPrajyot Mainkar
 
Building Hybrid Applications using PhoneGap
Building Hybrid Applications using PhoneGapBuilding Hybrid Applications using PhoneGap
Building Hybrid Applications using PhoneGapPrajyot Mainkar
 
Android Cloud to Device Messaging Framework
Android Cloud to Device Messaging FrameworkAndroid Cloud to Device Messaging Framework
Android Cloud to Device Messaging FrameworkPrajyot Mainkar
 
Evolution google-android play
Evolution google-android playEvolution google-android play
Evolution google-android playPrajyot Mainkar
 
Steps to install android
Steps to install androidSteps to install android
Steps to install androidPrajyot Mainkar
 
Android Tutorials - Powering with Selection Widget
Android Tutorials - Powering with Selection WidgetAndroid Tutorials - Powering with Selection Widget
Android Tutorials - Powering with Selection WidgetPrajyot Mainkar
 
Android Tutorials : Basic widgets
Android Tutorials : Basic widgetsAndroid Tutorials : Basic widgets
Android Tutorials : Basic widgetsPrajyot Mainkar
 

Mehr von Prajyot Mainkar (14)

Kolkata kreate - Talk by Prajyot Mainkar
Kolkata kreate - Talk by Prajyot MainkarKolkata kreate - Talk by Prajyot Mainkar
Kolkata kreate - Talk by Prajyot Mainkar
 
Devfest baroda 2019 By prajyot mainkar
Devfest baroda 2019 By prajyot mainkarDevfest baroda 2019 By prajyot mainkar
Devfest baroda 2019 By prajyot mainkar
 
Building for next india
Building for next indiaBuilding for next india
Building for next india
 
Android Power Optimization: May the Power be with you
Android Power Optimization: May the Power be with youAndroid Power Optimization: May the Power be with you
Android Power Optimization: May the Power be with you
 
Android performance
Android performanceAndroid performance
Android performance
 
Gaining the app visibility that matters
Gaining the app visibility that mattersGaining the app visibility that matters
Gaining the app visibility that matters
 
DroidSync 2014
DroidSync 2014DroidSync 2014
DroidSync 2014
 
Nitrodroid 2013 - Closing Report
Nitrodroid 2013 - Closing ReportNitrodroid 2013 - Closing Report
Nitrodroid 2013 - Closing Report
 
Building Hybrid Applications using PhoneGap
Building Hybrid Applications using PhoneGapBuilding Hybrid Applications using PhoneGap
Building Hybrid Applications using PhoneGap
 
Android Cloud to Device Messaging Framework
Android Cloud to Device Messaging FrameworkAndroid Cloud to Device Messaging Framework
Android Cloud to Device Messaging Framework
 
Evolution google-android play
Evolution google-android playEvolution google-android play
Evolution google-android play
 
Steps to install android
Steps to install androidSteps to install android
Steps to install android
 
Android Tutorials - Powering with Selection Widget
Android Tutorials - Powering with Selection WidgetAndroid Tutorials - Powering with Selection Widget
Android Tutorials - Powering with Selection Widget
 
Android Tutorials : Basic widgets
Android Tutorials : Basic widgetsAndroid Tutorials : Basic widgets
Android Tutorials : Basic widgets
 

Kürzlich hochgeladen

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Kürzlich hochgeladen (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

Deep Dive into GCM Architecture and Features

  • 1. Deep Dive in GCM Google Cloud Messaging for Android By – Mr.Prajyot Mainkar ( @prajyotm) Founder & C.E.O, SPM Softwares & Designers, Android Developer and Editor in Chief – Androcid.com
  • 2. SO WHAT’s IN PLATE KEY TOPICS Topics Time Duration Introduction 5 mins C2DM to GCM Migration 15 mins About GCM Features 10 mins
  • 3. How To Keep the Data on Your Device,Fresh?
  • 4. 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
  • 5. But…. Polling Consumes Lot of Battery Resource And… Nobody Likes Apps That Drain Battery
  • 6. 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
  • 7. What is GCM ? Breaking the ice Google Cloud Messaging for Android (GCM) is a service that helps developers send data from servers to their Android applications on Android devices. The GCM service handles all aspects of queueing of messages and delivery to the target Android application running on the target device. 4.7 Millisecond* – when GCM receives the message till the time GCM sends the message. ( 1/10th sec globally )
  • 8. So Why GCM Migration?
  • 9. The Focus The focus of GCM is as follows: 1.Ease of use. 2.No Buggy sign-up forms. 3.Limitless Quotes (unlike C2DM) 4.GCM and C2DM stats are available through the Android Developer Console. 5. Battery efficiency. 6. Rich set of new APIs.
  • 10. GCM Registration ABC News Server GCM 3. ID Re n io n gi rat tio s tra gist ra s t es t ti o Re gi u e q n ID 2. . R Re 1 4.Message Received by the Device from the server
  • 11. GCM Uninstall State ABC News Server GCM Device Not Registered er rv Se e th y ti f No Uninstalled App
  • 12. GCM Console Keys Project ID API Key
  • 13. GCM Registration GCM {Intent} GCM Framework Project ID Mobile Application
  • 14. GCM Data Receive Import GCM com.google.android.gcm.GCMBaseIntentService; Public class GCMIntentService extends RegID {Intent} GCMBaseIntentService { GCM Framework @override Protected void onRegistered ( Context ctx, String regId) { sendToNewsServer(RegID) Mobile Application
  • 15. GCM Permission GCM <uses-permission android:name= "com.google.android.c2dm.permission.RECE RegID IVE" /> {Intent} GCM Framework Mobile Application
  • 16. Server {RegID, API Key} {RegID,API Key} ABC News Server GCM Auth HTTP Post Request Project ID Content-Type:application/json Authorization:key=AIzaSyB- 1uEai2WiUapxCs2Q0GZYzPu7Udno5aA { "registration_id" : "APA91bHun4MxP5egoKMwt2KZFBaFUH-1RYqx...", "data" : { ”Topic" : ”Goa", ”Region" : "3", ”Reporter" : ”Mahesh", }, Mobile Application }
  • 18. … And they are Different 1. Simple API Key 2. Sender ID 3. JSON format 4. Multicast messages 5. Multiple senders 6. Time-to-live 7. Messages with payload 8. Canonical registration ID
  • 19. MultiCast Messages(Multicast API) ABC News Server GCM Mobile Application Mobile Application Mobile Application User 1 User 2 User 3
  • 20. MultiCast Messages(Multicast API) { “collapse_key” : “Goa news”, “data” : { ”Topic" : ”Goa News", ”Reporter" : ”Mahesh", Collapse Key } Reg Device ID’s “registration_ids” : [ "APA91bHun4MxP5egoKMwt2KZFBaFUH-1RYqx...”, "goKMwt2KZFBaFUH-1RYqxAPA91bHun4MxP5e...”, ] },
  • 21. Multiple Sender ABC News Server GCM Social Update Server Mobile Application
  • 22. Time To Live ABC News Server GCM Mobile Application
  • 23. Message with payload ABC News Server GCM Full Sync •Up to 100 messages before initiating full sync •4K size per message Mobile Application
  • 24. GCM Reliability Ensuring Data Containership RMQ GCM RMQ GCM Re-Connects when Device is Message Lost Due to Offline Online Device ACK Bunch News App News App
  • 25. GCM Optimization 4K World cup Server GCM 4K 8K 4K 8K 16K World Cup App
  • 26. GCM Optimization Delete All The 4K Messages World cup Server GCM 4K 8K 4K 8K 16K Sync-Process World Cup App
  • 27. 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
  • 28. GET IN TOUCH CONTACT US http://facebook.com/prajyotmainkar http://twitter.com/prajyotm http://linkedin.com/in/prajyotm + Prajyot Mainkar Phone: +91-9822987513 Email: prajyotm@msn.com