Google Cloud Messaging (Gcm): An Evaluation

I had written close our piece of job on edifice a crowdsourced superplayer for the "Who wants to hold out a millionaire (WWTBAM)" quiz exhibit earlier. In that piece of job nosotros developed an Android app that enabled the app users inwards Turkey to participate inwards WWTBAM inwards existent fourth dimension every bit the exhibit was airing on TV. When a query was read past times the exhibit host, my PhD students typed the query in addition to the multiple-choice options, which were transmitted via Google Cloud Messaging (GCM) to the app users. App users played the game, in addition to enjoyed competing amongst other app users, in addition to nosotros got a jeopardy to collect precious information close MCQA dynamics inwards crowdsourcing. Our app was downloaded 300K+ times, in addition to at the peak of its popularity 20K participants played the game simultaneously.

We used GCM to post the questions to the participants because nosotros wanted to proceed the app simple. GCM is the default force messaging solution for the Android platform in addition to is maintained past times Google every bit a costless service amongst no quotas. GCM allows app developers to post force messages to Android devices from the server. As an alternative to GCM, nosotros could convey developed our app to keep opened upwardly TCP connections amongst the backend servers, simply this would convey made our backend pattern complicated in addition to nosotros would involve many machines to hold out able to serve the need. Using GCM, nosotros were able to post quiz questions every bit force messages easily, in addition to tin larn away amongst using exclusively ane backend server to collect the answers from the app users. Another alternative to GCM was to deploy our messaging service, tell using MQTT, simply since nosotros were developing this app every bit an experiment/prototype, nosotros wanted to proceed things every bit unproblematic every bit possible.

After nosotros deployed our app, nosotros noticed that at that spot were no studies or analysis of GCM performance, in addition to nosotros wondered whether GCM was plenty to satisfy the real-time requirements inwards our application. Since nosotros had a lot of users, nosotros instrumented our app to timestamp the reception fourth dimension of the GCM messages in addition to reply dorsum to the backend server amongst this information.

Our evaluation was done for both offline in addition to online trend of GCM messaging. In the online mode, nosotros post the message to the online participants that are playing the game piece WWTBAM is broadcasting. That is, inwards the online mode, nosotros know that the customer devices are powered on, actively inwards locomote in addition to convey network connection. In the offline mode, nosotros post the GCM message at a random time, in addition to then the server has no cognition of whether the customer devices are powered on, are inwards use, or convey network connection. Table2 shows the break of devices involved inwards each of our experiments.

We flora a giant tail inwards the GCM delivery latencies. Figure iv inwards a higher house shows the message arrival fourth dimension cumulative distribution inwards the online in addition to offline modes. Note that the x-axis is inwards logarithmic scale. Table half dozen shows message arrival times broken into quartiles. The median in addition to the average message arrival times inwards the tabular array dot that the latency inwards the offline experiment is significantly high compared to the online experiment.

In Figure 5, comparison the GCM delivery times nether WiFi versus cellular information connexion inwards the offline trend shows that GCM delivery latencies are lower using the cellular information connection.
To investigate the GCM arrival times inwards the offline scenario further, nosotros devised a double message experiment, where nosotros post 2 GCM messages initiated at the same fourth dimension on our server. This time, instead of mensuration the message arrival time, nosotros mensurate the divergence betwixt the arrival times of the outset message in addition to the arrival fourth dimension of the 2d message. We were expecting to come across rattling depression fourth dimension divergence betwixt these twin messages, simply Figure nine shows that the giant tail is preserved, in addition to that or in addition to then of the devices have the 2d message hours afterwards receiving the outset one. Since nosotros know that, at the fourth dimension the outset of the twin messages has arrived to the device, the device is reachable past times Google’s GCM servers, the latency for the 2d message should hold out due to scheduling it to hold out sent independently than the outset message.

These results exhibit that the GCM message delivery is unpredictable, namely having a reliable connexion to Google's GCM servers on the customer device does non past times itself guarantee a timely message arrival. It would hold out worth replicating this experiment where all participants are inwards the US, to come across how that changes the results.

Our experiments raised to a greater extent than questions than it answered. Delving deeper at the documentation, nosotros flora or in addition to then information that may explicate or in addition to then of the problems amongst GCM inwards the offline mode, simply nosotros involve to a greater extent than examples to assay these in addition to sympathise the demeanor better. It turns out that both cellular in addition to WiFi modes proceed a long lived connexion to GCM servers. In the instance of deep slumber trend (where user does non plough on the concealment for long), the CPU wakes upwardly in addition to sends heartbeat to the servers every 28 minutes on cellular, every xv minutes on the WiFi. This causes the connexion to drib inwards many cases, because routers in addition to providers kill the inactive TCP connections without sending whatever information to the customer and/or server. Not all users are affected past times this problem, it depends on carrier and/or router they use.

Related links

Our GlobeCom14 newspaper includes to a greater extent than information.

0 Response to "Google Cloud Messaging (Gcm): An Evaluation"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel