Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

Mongoose-os Migrate from GCM to FCM

jorgemontalvaojorgemontalvao Porto Alegre/RS Brazil
As of April 10, 2018, Google has deprecated GCM. The GCM server and client APIs are deprecated and will be removed as soon as April 11, 2019. Migrate GCM apps to Firebase Cloud Messaging (FCM), which inherits the reliable and scalable GCM infrastructure, plus many new features.

https://developers.google.com/cloud-messaging/android/android-migrate-fcm

What's is new about this on Mongoose platform?

Comments

  • mamuespmamuesp Germany/Northern coast

    I never stumbled upon GCM/FCM in conjunction with Mongoose-OS - so your question is not easy to sort out - where are the connections? Mongoose-OS in general uses MQTT for IoT messaging.

  • jorgemontalvaojorgemontalvao Porto Alegre/RS Brazil

    Google Cloud Pub/Sub is a globally distributed message bus.
    Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably deliver messages at no cost to single devices, to groups of devices, or to devices subscribed to topics based on the publish/subscribe model.
    FCM is HTTPs, not MQTT, but they are very similar. If Google is deprecated GCM because of FCM, I can infer from this facts Pub/Sub could migrate as well.
    Also, Google Cloud Function migrated to Firebase as well. You can trigger cloud functions hosted in Firebase triggered bu Google Cloud Pub/Sub topics.

    As Google Cloud Partner, I expected to see some changes about this.

  • mamuespmamuesp Germany/Northern coast

    So where does Moongoose-OS connects oveer GCM/FCM? Thats my question. Don't have any glue where this would be used - besides I know what GCM/FCM stands for, but I don't see the connection to Mongoose-OS. As you're asking, you should be able to explain your concern. And I'm really asking, not making jokes ...

  • jorgemontalvaojorgemontalvao Porto Alegre/RS Brazil

    @mamuesp

    Sorry if I sounded rude.

    Don't worry buddy. It is not clear to me as well. you may be correct. GOOGLE CLOUD PUB/SUB and GOOGLE CLOUD MESSAGE may be different things.

    My point is Firebase Cloud Message has topics and allow publish and subscribe in the same way Google Pub/Sub. If Google Message deprecated, Google Pub/Sub may have the same path, based on Firebase allow subscribe and send a message to topics.

    You can trigger a function whenever a new Pub/Sub message is sent to a specific topic, you have to implement this code IN FIREBASE
    exports.helloPubSub = functions.pubsub.topic('topic-name').onPublish((message) => {...

    The FCM API allows you to subscribe a device to a topic
    var admin = require('firebase-admin');
    admin.messaging().subscribeToTopic(registrationTokens, topic)
    .then((response) => {...

    Could I make my point clear now? :smiley:

  • mamuespmamuesp Germany/Northern coast

    But again: where is the connection to Mongoose-OS?

  • jorgemontalvaojorgemontalvao Porto Alegre/RS Brazil

    Mongoose-os can use Firebase Message as an alternative to Google Pub/Sub since FCM is no cost and allow the same features (subscribe to topics and send messages)

  • mamuespmamuesp Germany/Northern coast

    Again you did not answer my question: as GCM is a notification service mostly designed for Android and has nothing to do with MQTT. I'm asking where the connection to Mongoose-OS will be found. Please enlighten me ... but I think we are talking about two differrent things. I do not find any hint or mentioning of GCM in the Monogsse-OS source or in the doc and community places. Maybe I'm missing something, so please give me a hint (I'm seriously interested).

  • jorgemontalvaojorgemontalvao Porto Alegre/RS Brazil

    If you are seriously interested, no problem
    * "as GCM is a notification service mostly designed for Android and has nothing to do with MQTT" - correct. FCM is https message service. Not only to android and IOS, but any web client. Check this out Firebase Cloud Messaging on the Web
    * "where the connection to Mongoose-OS will be found" - none at this moment. This is a recommendation based on FCM benefits. Guess your device can send and receive messages using HTTPS with no costs!!!
    * " I do not find any hint or mentioning of GCM in the Mongose-OS" - correct. Mongoose-os uses Google Iot Core +Pub/Sub. I would like to update this title discussion if I could. Google is migrating to FCM, not Mongoose-os. If Google is doing this, Mongoose shoud do the same and enjoy the ($$$) benefits :-)

  • mamuespmamuesp Germany/Northern coast

    Well, if Mongoose-OS will be used to connect to Googles services this might be an option for some cases, but as far as I'm using Mongoose-OS in an industrial environment, I would never be allowed to connect the devices to Googles services - I use an on-premises MQTT broker. So if the target of the Mongoose-OS use are the industrial scenarios, FCM wouldn't be any benefit at all. MQTT is an industrial standard, FCM is not AFAIK. And I'm afraid they are attacking MQTT with it ...

  • jorgemontalvaojorgemontalvao Porto Alegre/RS Brazil
  • mamuespmamuesp Germany/Northern coast

    ... and BTW no one stops you to write a library which supports FCM. :wink:

Sign In or Register to comment.