Delving into Push Notification architecture
Push Notifications are an implementation of the publish/subscribe pattern. Clients (mobile devices) can subscribe to a specific channel, and data can be published in these channels from the backend infrastructure. Often, the request is regarding a specific piece of data, but it's also possible to publish more general data, such as a notification that all users of the system need to see.
Typically, Push Notification architectures look something like the following figure:
Push Notifications originate from the backend (although pushes can be generated from clients as well), and these notifications are often routed through a gateway that forwards the notification to the appropriate provider (Apple or Google). The gateway can be a service running on a local server in your data center, or it can be a service provided by a third party. In our case, we'll use a service named Boxcar (http://www.boxcar.io), but there are many other options available, including...