To receive near real-time weather alerts, a device needs to poll the Public Alerts website at least every two minutes. Even then, a weather alert could be over two minutes old when it is first received by the device. Frequent polling increases the amount of downloaded data, which can be problematic for users who are charged for data usage by their Internet or network provider. For mobile devices, frequent polling also decreases battery life. As an alternative to polling, push technologies such as Apple's Push Notification Service or Google's Cloud Messaging (GCM, formerly C2DM) allow third-party applications to send notifications or messages to iOS and Android devices, respectively.
The Weather Alert Server (WAS) is a web server application developed by Silver Spring Software, hosted on Google's reliable cloud server infrastructure. For each Android mobile device, it stores a unique user identifier, as well as the counties and alert types (such as Severe Thunderstorm Warnings or Severe Weather Statements) the user is interested in. WAS also stores the total number of alerts per county and alert type for each month.
Once a minute, WAS issues a request to download the national weather alerts as a single XML file. If the Public Alerts website has been updated since the last request, it then parses the XML into individual alerts. For each county that has new alerts, the WAS checks which users are interested in that particular county and its associated alert type. It then sends a message, via GCM, to all interested mobile devices. After a mobile device receives a message from GCM, the device sends a request to WAS to download the new alerts. The new alerts can then be displayed to the mobile device user.
This presentation will give an overview of how WAS was implemented using Google's App Engine and GCM technologies. In addition to providing quicker access to potentially life-saving information, WAS also decreases the amount of traffic to the Public Alerts website that would have been created by frequent polling from thousands of mobile devices.