BT

GCM 3.0 Sends Messages to Android, iOS and Chrome

| by Abel Avram Follow 12 Followers on Jun 01, 2015. Estimated reading time: 2 minutes |

With GCM 3.0, Google has attempted to simplify the registration process and to make their cloud notification system work similarly on Android, iOS and Chrome. There is a new topic group and a messaging diagnostic tool.

Each client application receives an Instance ID, an identifier associated with the application instance running on a certain device. The Instance ID remains valid throughout the life of the respective application, until the app is uninstalled from the device. Push messages are authorized with a security token generated via an API call. A security token can be replaced in case it gets compromised.

A useful GCM feature is device group. A server can create a device group on GCM receiving a notification key that is used to send messages to the entire group. Groups can be edited, adding or removing clients. A group can contain up to 20 devices, being practical for sending messages to all devices belonging to a certain user. Clients can also send messages to groups.

GCM 3.0 introduces topic messaging, a way of sending messages to many clients. An application can create one or more topics and register clients to each topic. Then messages are sent for a specific topic, GCM informing all clients who have been registered for it. This way one can reach a large number of clients, even all of them.

Google has added a tool to the developer console for diagnosing GCM messages, showing the status of up to 30 messages with details on each individual message. The tool provides diagnostic information within minutes after messages were sent.

These new features work roughly the same across Android, iOS and Chrome. There is one difference when messaging to Apple devices. For iOS one needs to connect to an APNS server to get a token which is then used to get the GCM token. Regarding actual communication, as long as the application is in the background on an iOS device, GCM uses APNS to send messages, the application behaving similarly as using Apple’s notification system. But when the app is active, GCM communicates directly with the app, and all GCM APIs are available to use against the iOS app, including upstream messaging, multicasting, message streaming, etc.

According to Google, there are currently some 600K applications registered with GCM, sending about 1.1M messages/sec to 1.5B devices, making for a projected number of over 25T messages for 2015. The average message latency across the world is 50ms. The service is still free.

This I/O 2015 session (video) provides more details on GCM 3.0.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss
BT