Why Even Builders Buy Push
Today's post comes from Brian Wilson, Lead Architect at Kinvey, a Backend as a Service platform that makes it ridiculously easy for developers to setup and operate the backends for their mobile, web and tablet apps. Rather than worrying about connecting to cloud services, setting up servers for their backend, or maintaining and scaling them, developers can focus on creating beautiful, engaging apps.
Push notifications are an important solution in the app developer’s toolbox, and as a leading and innovative Backend as a Service provider one might think that push messaging would be a tool Kinvey offers itself. Since every app developer, and service providers alike, face the build vs. buy decision, I’m here to shed a little light on why we partner with Urban Airship rather than building push messaging support ourselves.
Each mobile platform (Apple, Android/Google, Amazon, Blackberry and Windows) has a dedicated set of push notification servers and different methods for how developers implement push support and send messages to a phone. And these different methods continue to change as platforms evolve their push messaging infrastructure and add new capabilities, as evidenced by Google’s move from C2DM to GCM, and Amazon’s introduction of ADM.
Complex Technology: Security, Performance and Scale
Prior to sending any notifications some security set-up is required. This includes provisioning certificates for server-to-server communication and provisioning a unique “device token” that ensure notifications are delivered to the correct device. As an example we’ll discuss how the Apple APNS system works.
Once the security provisioning is complete we can actually start sending messages. The backend starts by establishing connections to the APNS servers. Apple maintains different servers for sandbox (aka development) and production, the connection must be made to the correct server for push to work. Using the established connection, the backend server sends a binary message to the APNS server for each device (using the device token to identify the device) that will receive the notification. The APNS system then sends the notification to the phone, which delivers the notification to your app.
When you uninstall an application or no longer use your phone, pushes may still be sent to your device's token and the APNS service attempts to deliver the notification. However, since your phone is no longer receiving these notifications Apple is wasting resources attempting to deliver the notifications. As a result of this, Apple requires developers to periodically connect to a feedback service to get a list of no longer used device tokens and to not send notifications to these devices. Providers who repeatedly send notifications to unused tokens can lose the ability to use the APNS service.
The largest challenge is not in the steps required to send a single push notification, but it’s in the steps required to securely and reliably send push notifications to thousands or millions of devices for thousands of apps—which for some purposes need to be sent and received in near real-time. To manage this scale a provider needs to manage the device token lifecycle for each device (from generation, through use to the eventual removal of the token). They need hardcore infrastructure to handle receiving and sending messages from thousands of users to millions of devices efficiently. They need to manage the distinction between the production and development phases of the app. Once the provider has mastered the scale for one app, they then need to master the scale for thousands of apps.
It’s More than Just Push
Sending the same message to all of your users will only get you so far, and over time could actually cause people to tune-out due to lack of relevancy. The technology Urban Airship has built to support sending messages to specific audience segments based on in-app behaviors and preferences is impressive. Throw in Rich Push, new location history targeting capabilities via its acquisition of SimpleGeo, as well as analytics for optimization, and it’s easy to see how push is much more than a simple feature within a broader BaaS solution.
As companies adopt push messaging for the first time or implement increasingly sophisticated mobile messaging strategies, the type of support they need grows, ranging from technical and strategic services to best practices education. And these need to be accessible to both developer and marketing audiences.
Enter Urban Airship
While evaluating how to implement push notifications with Kinvey we asked ourselves the question, “Is our core business managing the scale of push notifications?” Since Kinvey focuses on more features then just push, we started looking for partners who lived and breathed push notifications. The obvious choice is Urban Airship. Urban Airship had clearly already solved the sheer technical difficulty around push notifications and they supported all of our target platforms (iOS and Android). The choice to use Urban Airship was easy and has been a smart way to support our customer’s push needs.