Red Hat
Aug 19, 2013
by matthiaswessendorf

Today we are releasing the first community release of the AeroGear UnifiedPush Server!

The AeroGear UnifiedPush Server is a server that stores devices specific metadata and is able to sendpush notifications to different (mobile) platforms. The initial version of the server supports Apple’s APNs,Google Cloud Messaging and Mozilla’s SimplePush.

Three supported platforms

While Android and iOS are pretty much very well known, it’s worth spending a few seconds onSimplePush. SimplePush is a specification from Mozilla that describes a JavaScript API and a WebSocket-based protocol which allows backend/application developers to send notification messages to their web applications. Originally SimplePush was introduced for Firefox OS but there are plans to establish the API on the desktop and mobile browsers as well.

The AeroGear project is releasing a Netty-based server and a polyfill JavaScript library for SimplePush as well.

A few problems with Push Notifications

In order to be able to send messages to specific devices, the server side application needs to know the device token, which means the application on the device needs to store it on the server side database.

Another problem is that if you are supporting multiple platforms, they all have different APIs and behave differently – not only on the client side. You need to ensure that the server side application sends the notifications to all clients, for all supported platforms.

Enter AeroGear UnifiedPush Server

The AeroGear UnifiedPush Server addresses these concerns as it is capable to store device specific metadata, including device tokens and it offers a unified way to deliver notifications to Android, iOS and JavaScript applications.

REST API

All features of the server are powered by RESTful APIs:

  • registration of device specific metadata
  • sending push notifications
  • Management of the PushApplications and their different variants

AdminUI

The management of the PushApplications, their variants and all of the actual device installations are best handled by the AdminUI, which is based on Ember.js and Topcoat

Device Registration

As indicated on the above image we have SDKs for our supported platforms (AndroidiOS and JavaScript) to help registration of client devices with the AeroGear UnifiedPush Server.

Sending Push Notifications

Sending can be done over the RESTful API:

curl -u "{PushApplicationID}:{MasterSecret}"
   -v -H "Accept: application/json" -H "Content-type: application/json"
   -X POST
   -d '{
       "someKey":"someValue",
       "alert":"HELLO!",
       "sound":"default",
       "badge":7,
       "simple-push":"version=123"
     }'

http://SERVER:PORT/CONTEXT/rest/sender/broadcast

The above sends a broadcast notification to all the different platforms, supported by our server. Using commandline cURL is nice for testing, but for backend applications you usually want a more fluent API. Right now we do have a Java and a Node.js client. A PHP SDK is currently being developed.

To the cloud – and beyond

The AeroGear SimplePush and UnifiedPush server have been bundled in a OpenShift cartridge, so that you can get started in just minutes!

Feedback

We hope you enjoy what we offer and we are looking forward getting feedback, bug reports and feature requests!