Hi Inosh and All,

Having following questions regarding this feature and the enabling
technology :

[1] Are we bringing FCM as a replacement for GCM or as another Push
Notification Mechanism that can be enabled apart from GCM ?
[2] If as a replacement, what advantages are there with FCM over GCM ?
[3] When it comes to Google-services.json, It seems that it is required to
obtain a separate Google-services.json + FCM server token per each
production deployment and
     compile the agent embedding this file. If that's the case here, cannot
we achieve the same without letting a user to compile the source ? what if
the device could retrieve this file
     at the time of enrollment with the server and we provide this
configuration to the server via platform configurations ?
[4] And at last a general question, architecturally, how FCM differs from
GCM ?

Cheers,
Dilan.

*Dilan U. Ariyaratne*
Senior Software Engineer
WSO2 Inc. <http://wso2.com/>
Mobile: +94766405580 <%2B94766405580>
lean . enterprise . middleware


On Wed, Nov 30, 2016 at 3:25 PM, Inosh Perera <[email protected]> wrote:

> ​Hi all,
>
> Following is the architecture of FCM implementation of Android agent of
> IoT/EMM. Firebase cloud messaging(FCM) is a push notification mechanism
> introduced by Google for app developers to send notifications to devices.
> Prior to FCM, EMM used Google cloud messaging(GCM) which was the earlier
> standard for sending notifications to devices.
> Coming from GCM to FCM, major changes in architecture are in the Agent
> side implementation compared to server side implementation of EMM. In case
> of EMM, only a wake up call is sent to a device asking the device to
> contact the EMM server to fetch new pending operation. Following is a
> simple illustration of how the mechanism works with FCM.
>
>
>
> --
>
>
> *Prerequisites*
> Using firebase console, a new project needs to be created which will
> provide the user with Google-services.json file and a firebase cloud
> messaging token. Google-services.json contains authentication details
> required  to communicate with the Google FCM server. This file needs to be
> added to Android agent source code's root folder as defined by Google and
> will be later be used to communicate with FCM server. Firebase cloud
> messaging token has to be available to IOT/EMM server and this token acts
> as the API key when sending messages to FCM server.
>
> *Things that happen one time*
> 1. Registration details sending
>
> When the agent starts up for the very first time, since the FCM related
> services are implemented in the agent and the Google-services.json is
> available, FCM services begin an automatic registration process with the
> FCM server. This call is hidden from the developers to avoid the earlier
> GCM complexities of handling the registration with the GCM server manually.
> Device will send the necessery details to FCM server extracted from
> Google-services.json to register it-self with the FCM server.
>
> 2. FCM instance ID token
>
> FCM server will keep a record of the device and issue a token for the
> device, which will be returned and will be automatically persisted by the
> FCM libraries in the Agent.
>
> 3. Send FCM instance ID token to EMM/IoT server
>
> Agent will retrieve the persisted token and send it to EMM/IoT server, so
> that it can send commands to FCM referring the instance ID token of the
> device.
>
> Now the server has all the details that are necessery to send a message to
> the device.
>
> *Sending a wake up call to device*
> 4. Whenever a new operation is added against a specific device, IoT/EMM
> server will send a wake up call to FCM server with the Firebase cloud
> messaging token and FCM instance ID token. Firebase cloud messaging token
> will show that the IoT/EMM server has permission to use FCM services and
> FCM instance ID token specifies to which device the wake up must be sent.
> 5. FCM server send the wake up call to the device and the Android agent
> listens to incoming FCM messages.
> 6. At this point FCM communication is over and as a response to the wake
> up, the Agent will poll the IoT/EMM server to fetch any pending operations
> such as ring and will execute it.
>
> Regards,
> Inosh
>
> Inosh Perera
> Senior Software Engineer, WSO2 Inc.
> Tel: 077813 7285, 0785293686
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to