Push Notifications reference: System architecture

Our Push Notifications system is part of the larger Pusher platform. Externally, it communicates with your server, your user’s client devices (iOS or Android phones), and notification gateways (APNs/GCM/FCM). Your user’s devices subscribe to “interests”, and you publish to those interests. We use GCM, FCM and APNs to fulfil the delivery of push notifications to your user’s devices. This diagram should make the relationships clear:

                        +---------------------------+
                        |                           |
                        |                           |
+---1.register----------+       YOU/YOUR SERVER     +--1.register----------+
| +-2.push certificate-->                           <--2.Server Key------+ |
| |                     |                           |                    | |
| |                     +---------------+           |                    | |
| |                     | pusher server |           |                    | |
| |                     | library       |           |                    | |
| |                     +--+------------+--------+--+                    | |
| |                        |                     |                       | |
| |                        |                     |                       | |
| |                   6.publish     3.Server Key/push certificate        | |
| |                        |                     |                       | |
| |                        |                     |                       | |
| |       +--------------- v---------------+---- v----------------+      | |
| |       | nativepush-cluster1.pusher.com | dashboard.pusher.com |      | |
| |       +--------------------------------+----------------------+      | |
| |       |                                                       |      | |
| |       |                                                       |      | |
| |       |                       PUSHER                          |      | |
| |       |                                                       |      | |
| |       |                                                       |      | |
| |       |       +--------------------------------------+        |      | |
| |       |       | nativepushclient-cluster1.pusher.com |        |      | |
| |       +----+--+------------------^-^-----------------+---+----+      | |
| |            |                     | |                     |           | |
| |            |                     | |                     |           | |
| |      7.notification              | |               7.notification    | |
| |            |                     | |                     |           | |
| |            |                     | |                     |           | |
| |       +----v-----+               | |              +------v----+      | |
| +-------+          |               | |              |           +------+ |
+--------->   APNs   |     5.register/subscribe       |    GCM    +--------+
          |          |               | |              |           |
          +-+------^-+               | |              +-+------^--+
            |      |                 | |                |      |
            |      |                 | |                |      |
            |  4.register            | |                |  4.register
            |      |                 | |                |      |
            |      |                 | |                |      |
            |      |                 | |                |      |
            |      |                 | |                |      |
            |      |                 | |                |      |
  8.notification   |                 | |      8.notification   |
            |      |                 | |                |      |
            |      |                 | |                |      |
+-----------|------|-----------+     | |    +-----------|------|-----------+
| +---------v------+---------+ |     | |    | +---------v------+---------+ |
| |  pusher-websocket-swift  +-------+ +------+ pusher-websocket-android | |
| +--------------------------+ |            | +--------------------------+ |
|                              |            |                              |
|    YOUR USER'S IOS DEVICE    |            |  YOUR USER'S ANDROID DEVICE  |
|                              |            |                              |
+------------------------------+            +------------------------------+

The following interaction diagram shows the interactions between these components for the mainline use-case, where

  1. you create a Pusher app
  2. you enable push notifications for it
  3. one of your user’s app instances subscribes to an interest
  4. you send a push notification to that interest
+--------------+    +---------------+    +--------------+    +---------------+
|      YOU     |    |               |    | NOTIFICATION |    |  YOUR USER'S  |
|      AND     |    |     PUSHER    |    |   PLATFORM   |    |  Android/iOS  |
|  YOUR SERVER |    |               |    |  (APNS/GCM)  |    | app instance  |
+-------+------+    +-------+-------+    +-------+------+    +-------+-------+
        |                   |                    |                   |
        |     create app    |                    |                   |
        +------------------->                    |                   |
        |                   |                    |                   |
        |                   |                    |                   |
        | app id+token      |                    |                   |
        <-------------------+                    |                   |
        |                   |                    |                   |
        |                   |                    |                   |
        |                   |       sign up      |                   |
        +---------------------------------------->                   |
        |                   |                    |                   |
        |                   |                    |                   |
        |   API key/cert    |                    |                   |
        <----------------------------------------+                   |
        |                   |                    |                   |
        |                   |                    |                   |
        |   API key/cert    |                    |      register     |
        +------------------->                    <-------------------+
        |                   |                    |                   |
        |                   |                    |    registration   |
        |                   |                    |       token       |
        |                   |                    +------------------->
        |                   |                    |                   |
        |                   |    registration    |                   |
        |                   |       token        |                   |
        |                   <----------------------------------------+
        |                   |                    |                   |
        |                   |                    |                   |
        |                   |                    |     client id     |
        |                   +---------------------------------------->
        |                   |                    |                   |
        |                   |                    |                   |
        |                   | subscription req.  |                   |
        |                   <----------------------------------------+
        |                   |                    |                   |
        |  publish message  |                    |                   |
        |    to interest    |                    |                   |
        +------------------->    push message to |                   |
        |                   |     registration   |                   |
        |                   |    token with API  |                   |
        |                   |       key/cert     |                   |
        |                   +-------------------->                   |
        |                   |                    |                   |
        |                   |                    |                   |
        |                   |                    |   push message    |
        |                   |                    +------------------->
        |                   |                    |                   |
        |                   |                    |                   |
        |                   |                    |                   |
+-------+------+    +-------+-------+    +-------+------+    +-------+-------+
|      YOU     |    |               |    | NOTIFICATION |    |  YOUR USER'S  |
|      AND     |    |     PUSHER    |    |   PLATFORM   |    |  Android/iOS  |
|  YOUR SERVER |    |               |    |  (APNS/GCM)  |    | app instance  |
+--------------+    +---------------+    +--------------+    +---------------+

Specification: how do you interact with our Push Notifications system?

Our Push Notifications system has two APIs: one for your servers to send push notifications to, and another for your users to subscribe to interests. Both are HTTP APIs over SSL.

Have you tried using the search to find what you’re after? If you still have a question then get in touch with us and let us help you out.