WWDC 2015: Apple Push goes HTTP2 for APNs

Last week was WWDC 2015 and one session got my attention: What’s New in Notifications!

The session is a two part session, focusing on iOS notifications (local/remote) and new features, like text-apply, but the most interesting part for me was the second half, which announced some coming APNs changes!

The big news is, Apple will have HTTP/2 API to send notification requests to APNs.

YAY!

Here is a little summary of more details:

  • request/reponse (aka stream) for every sent (more reliable (e.g. JSON reason for a ‘bad request’ or 410 if the token is invalid))
    • allows ‘instant’ feedback (no separate feedback service!), since details are on the HTTP/2 response
  • multiplexing: multiple requests (to APNs) on a single connection
  • binary
  • simpler certificate handling: Just a single cert! (no separate for dev/prod, VOIP etc)
  • 4KB size of payload (for all versions of iOS/OSX), but just on the new HTTP/2 API

The new HTTP/2 API for APNs will be available in “Summer 2015” for the development environment and will be made available for production “later this year”. No exact dates were given.

 

I really like this move, and this means for our AeroGear UnifiedPush Server, we will be busy implementing this new Apple APIs!

Posted in aerogear

AeroGear Germany tour 2015

Over the last three days Sébastien Blanc and I have been touring through Germany to visit a few JUGs.

The talks

We had the same setup for every evening: First, Sebi was talking about JBoss Tools and Forge and showed how to quickly create a Java EE based backend. Afterwards the audience saw the how to create a good looking Apache Cordova mobile app, that he also generated using Forge! At the end the solution was also protected using Keycloak. Afterwards I had a talk about Push Notifications in general. During the talk I had various demos, like our AeroDoc server and iOS client to demonstrate a rich push interaction, between different clients and servers, using geolocation and user segementation. I was also happy that I could demo some hot new stuff on our UI by showing stuff off code from different pull requests.

The cities

We had three different cities on the agenda and the start of the tour was Berlin. However, unfortunately I forgot my powerplug at home… :sob: But, arriving in Berlin I could borrow one fromSimon Willnauer. THANKS DUDE! :heart:

Berlin

The event took place at the VOTUM GmbH and it was a good start of our tour. We had a packed room and lot’s of questions during both talks, so we ended up talking a bit longer. Afterwards there was time to socialize with a drink or two. Here are some impressions from the evening.

Dortmund

After arrving in Dortmund Hendrik Ebbers we giving us a ride to the BVB training center. It was funny, that one guy thought that Sebi looks like the coach (Juergen Klopp) :joy: However, the real Juergen was a few hundred meters away, watching the team doing their training. Before the event started we did some preparation at Hendrik’s awesome home-office. Here is a picture of me talking about the push server, showing the latest greatest of a pending pull-request from Lukáš Fryč. The talks went well and while we enjoyed some Pizza we had a some good conversations with the attendees!

Stuttgart

On our way to the JUG Stuttgart we got effected by the strike, which turned out to be a very positive thing. We got an almost empty ICE train :v: This time the talks took place in the Stuttgart Red Hat Office and Heiko was already awaiting us at the S-Bahn station. After a little introduction by Heiko it was again Sebi’s part before I took over talking about push.

Summary

It was a great tour and lot’s of questions during and after the talks showed we had the right content for the different events. I am already looking forward to see some of the attendees getting in touch with our AeroGear community for more debats! On the last evening Heiko, Sebi and I went for a few :beers: in Stuttgart. Traveling back home, I had another interaction with the strike, which was again very positive. They had to change the train and all seats were opened up, so I ended up sitting on a nice and comfortable seat in the first class for free :stuck_out_tongue_winking_eye:

Posted in aerogear

Push Notifications and the Internet of Things

Today on Facebook’s F8 conference they announced Parse for IoT. This a cool, but not unexpected move, especially since there is demand to have connected objects being part of an (enterprise) cloud systems. We will see more of that happening soon, and our lesson learned on traditional mobile, will be applied to IoT devices or “connected objects” in general.

AeroGear and IoT

In the AeroGear project we have done similar experiments, bringing functionality of our UnifiedPush Server to the IoT space. My colleage Sébastien Blanc did two short screencasts on his work in this area:

The above examples basically leverage our support for SimplePush, which is a WebSocket based protocol used on Firefox OS for Push Notification. Due to the fact Firefox OS uses such an open protocol, we are able to extend this mechanism of Push Notifications delivery to other platforms, not just Firefox OS devices.

Bringing Push Notifications to the IoT sector is a logical move, to integrate connected objects and mobile cloud services!

Posted in aerogear

Fabric8 Gateway for the Unified Push Server

If you want to run the Unified Push Server behind a firewall, you still need to expose those RESTful endpoints that are accessed from the mobile apps running on the different devices:

With the help of the Fabric8 Gateway Servlet this is a fairly simple task!

I have created such a gateway that only exposes the above URLs, nothing else. Checkout therepository on github!

Have fun!

Posted in aerogear

Apache Mesos and Marathon for UnifiedPush Server and WildFly

After reading a bit about Apache Mesos I wanted to play a bit with it. If you don’t know what Mesos is, it’s a cluster manager that provides efficient resource isolation and sharing across distributed applications, or frameworks.

During reading up on Apache Mesos I ran into the Marathon framework, developed by the folks atMesosphere. Marathon is a nice tool to manage tasks on Apache Mesos. The Github repo says:

Marathon is an Apache Mesos framework for long-running applications. Given that you have Mesos running as the kernel for your datacenter, Marathon is the init or upstart daemon.

Installation of Apache Mesos

The folks at Mesosphere did a great job writing up different installation guides. As a Mac user, I did follow this installation. The guide helps on installing the required components of the setup:

  • Apache Zookeeper
  • Apache Mesos
  • Mesosphere’s Marathon

Running WildFly and the AeroGear UnifiedPush Server on Apache Mesos

Once the above setup is done and your Apache Mesos system is running, it’s pretty simple to launch a WildFly server and deploy the UnifiedPush Server to it.

Download the following bundles and place them somewhere into your hosted infrastructure:

Now you need to save this JSON:

to a file and submit it to the Marathon server, using curl:

 curl -i -H 'Content-Type: application/json' -d @unifiedpush-server.json localhost:8080/v2/apps

After Apache Mesos is done with downloading the artifacts from the uris section, it performs the steps chained in the cmd section. This is basically a set of shell commands that copy the UnfiedPush Server and its database file to a WildFly, which uses a PORT provided by the custer manager, instead of the default 8080 http port.

You are done – that’s all you need. On the Marathon UI you now see the URL and the PORT of the WildFly, containing the UnifiedPush Server:

Marathon Framework Web UI

 

Have fun with WildFly and the UnifiedPushServer on Apache Mesos!

Posted in aerogear

UnifiedPush Server: Docker, WildFly and another Beta release!

Today we are announcing the second beta release of our 1.0.0 version. This release contains several improvements

  • WildFly 8.x support
  • PostgreSQL fix
  • Scheduler component for deleting analytics older than 30 days
  • Improvements on the AdminUI
  • Documentation

The complete list of included items are avialble on our JIRA instance

With the release of the server we also released new versions of the senders for Java and Node.js!

Docker

The team is extremely excited about the work that Docktor Bruno Oliveira did on our new Docker images:

Check them out!

Documentation

As mentioned above, the documentation for the UnifiedPush Server has been reorganized, including an all new guide on how to use the UnifiedPush Server.

Demos

To get easily started using the UnifiedPush Server we have a bunch of demos, supporting various client platforms:

  • Android
  • Apache Cordova (with jQuery and Angular/Ionic)
  • iOS

The simple HelloWorld examples are located here. Some more advanced examples, including a Picketlink secured JAX-RS application, as well as a Fabric8 based Proxy, are available here.

Docker

Bruno Oliveira did Docker images for the Quickstart as well:

Feedback

We hope you enjoy the bits and we do appreciate your feedback! Swing by on our mailing list! We are looking forward to hear from you!

NOTE: the Openshift online offering will be updated w/in the next day or two

Enjoy!

Posted in aerogear

Beta1 of the UnifiedPush Server 1.0.0 released

Today we are announcing the first beta release of our 1.0.0 version. After the big overhaul, including a brand new AdminUI with the last release this release contains several enhancements:

  • iOS8 interactive notification support
  • increased APNs payload (2k)
  • Pagination for analytics
  • improved callback for details on actual push delivery
  • optimisations and improvements

The complete list of included items are avialble on our JIRA instance.

iOS8 interactive notifications

Besides the work on the server, we have updated our Java and Node.js sender libraries to support the new iOS8 interactive notification message format.

If you curious about iOS8 notifications, Corinne Krych has a detailed blog post on it and how to use it with the AeroGear UnifiedPush Server.

Swift support for iOS

On the iOS client side Corinne Krych and Christos Vasilakis were also busy starting some Swift work: our iOS registration SDK supports swift on this branch. To give you an idea how it looks, here is some code:

func application(application: UIApplication!, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData!) {
  // setup registration
  let registration = 
  AGDeviceRegistration(serverURL: NSURL(string: "<# URL of the running AeroGear UnifiedPush Server #>"))

    // attemp to register
    registration.registerWithClientInfo({ (clientInfo: AGClientDeviceInformation!) in
        // setup configuration
        clientInfo.deviceToken = deviceToken
        clientInfo.variantID = "<# Variant Id #>"
        clientInfo.variantSecret = "<# Variant Secret #>"

        // apply the token, to identify THIS device
        let currentDevice = UIDevice()

        // --optional config--
        // set some 'useful' hardware information params
        clientInfo.operatingSystem = currentDevice.systemName
        clientInfo.osVersion = currentDevice.systemVersion
        clientInfo.deviceType = currentDevice.model
        },

        success: {
            println("UnifiedPush Server registration succeeded")
        },
        failure: {(error: NSError!) in
            println("failed to register, error: \(error.description)")
        })
}

Demos

To get easily started using the UnifiedPush Server we have a bunch of demos, supporting various client platforms:

  • Android
  • Apache Cordova (with jQuery and Angular/Ionic)
  • iOS

The simple HelloWorld examples are located here. Some more advanced examples, including a Picketlink secured JAX-RS application, as well as a Fabric8 based Proxy, are available here.

For those of you who that are into Swift, there Swift branches for these demos as well:

Feedback

We hope you enjoy the bits and we do appreciate your feedback! Swing by on our mailing list! We are looking forward to hear from you!

Posted in aerogear
Follow

Get every new post delivered to your Inbox.

Join 33 other followers