Catalogue / pushover-2012-launch-stack

Pushover launches on one already-owned OpenBSD server, with a MySQL queue table polled every second by a dispatch daemon

Not named in the source; Pushover is built and run by the author, joshua stein, 2012. Pushover API, message queue and dispatch daemon at launch.

Organisation
Not named in the source; Pushover is built and run by the author, joshua stein
Evidence
Reported from production
System
Pushover API, message queue and dispatch daemon at launch
As of
2012-03
Source
Building Pushover

joshua stein (jcs.org), published 2012-03-16

Architecture

At launch Pushover was a Rails 3 application behind Apache on one of the author's OpenBSD servers. The HTTP API wrote messages to a MySQL queue table, and a separate daemon polled that table every second and dispatched them to Google's C2DM and Apple's APNS. Android and iOS apps then synchronised their messages from the server over SSL.

Section: January 20: API Development and Rails 3 | Section: January 21: iOS Changes my Plans

Components

ComponentRoleWhere
HTTP APIA Rails 3 application that accepts messages, handles user and device registration, and serves the message synchronisation calls the apps use.Section: January 20: API Development and Rails 3 | Near: adding the message synchronization calls to the Rails
Queue tableA MySQL table that incoming messages are written to and that the dispatch process reads.Near: Messages are written to a queue table
Message dispatch daemonA small separate process that reads the queue table every second and pushes messages out to Google's and Apple's push servers.Near: I wrote a small daemon to read | Near: polls the queue table every second
Android and iOS appsDevice clients that receive the push notification and download their messages from the server over HTTP, keeping a local database in sync.Section: January 21: iOS Changes my Plans
WebsiteSplash page plus logged-in pages for enabling and disabling devices, creating apps, sending messages and reading the API documentation. Apache serves a static copy of the splash page to visitors without a cookie.Section: January 29: Website Work | Section: February 28: Load Testing and Monitoring
Network monitorThe author's own monitor polls the queue length through an authenticated API call and checks the static and API sites, sending text messages when a Pushover component fails.Section: February 28: Load Testing and Monitoring

Figures, as the source states them

FigureAs statedNoteWhere
App purchases across the two app stores21 purchasesAs of the post, nine days after the announcementNear: there have been 21 purchases of the
Cost of the domain name500 US dollarsOne-off; the largest launch cost listedNear: were $500 for the domain
Apple App Store developer account100 US dollars per yearRecurring yearly feeNear: would subsequently cost $100 every year

Records

Decision#d1

Queue outgoing notifications in a MySQL table polled every second, not in a message broker

pushover-2012-launch-stack#d1 at corpus version 26a1b3a7e3dd
Chosen

Messages are written to a MySQL queue table. Once a second a separate process reads that table and hands what it finds to the push servers of Google (C2DM) and, from later in development, Apple (APNS).

Near: Messages are written to a queue table

Rejected

A queue system such as ActiveMQ or ZeroMQ, or a NoSQL store. The author calls those fancy and says he went with a setup he describes as boring but reliable.

Near: Rather than use a fancy queue setup

Reasoning

The author wanted a boring but reliable setup, and says he will work on threading the dispatch and perhaps on moving to a different queue as the service grows, once the need arises.

Near: I went with a boring-but-reliable MySQL setup | Near: maybe switching to a different queue once

Decision#d2

Keep messages on the server until each app has downloaded them, instead of relying on the push itself

pushover-2012-launch-stack#d2 at corpus version 26a1b3a7e3dd
Chosen

Messages stay on the server and are deleted only once the app has downloaded all of them over HTTP and synced its local database. Synchronisation calls were added to the Rails API, the sending daemon was changed, and both the iOS and the Android app sync over SSL.

Section: January 21: iOS Changes my Plans

Rejected

Let Google's and Apple's push servers queue messages and store each alert on the device when it arrives. This was the author's first plan, which he calls naive. It could not work on iOS, where the app does not see every notification.

Near: My (naive) plan for Pushover was to | Near: completely different from how iOS handles APNS

What forced it

On iOS a notification that arrives while the app is not in the foreground is handled by the operating system and does not wake the app. The app gets it only if the user taps it; opened directly, the app cannot see it. So the app could not reliably receive and store every notification.

Near: a notification is only passed to an | Near: would not be able to reliably receive

What worked before

During development only, before the API existed, a simple script sent test messages straight to Google's C2DM servers for the Android app.

Near: used a simple script to send test

Decision#d3

Serve the splash page as a static file from Apache unless the request carries a cookie

pushover-2012-launch-stack#d3 at corpus version 26a1b3a7e3dd
Chosen

A deployment step fetches the splash page from Rails and saves it as a static file. A cookie-based mod_rewrite rule makes Apache serve that file when a request has no cookie and pass the request to Rails when it has one, so logged-in users still get their own view.

Section: February 28: Load Testing and Monitoring

Reasoning

The author wanted to be sure the Rails site would cope if it were announced somewhere popular, and expected most traffic to hit the static splash page.

Near: I wanted to be sure the Rails | Near: Since most traffic would be hitting the

Outcome

In load tests run with blitz.io before launch, not in production, the author reports the cached setup handled what he calls a respectable amount of traffic. No figure is given.

Section: February 28: Load Testing and Monitoring

Decision#d4

Monitor queue depth from the author's own network monitor and alert by text message, not through Pushover

pushover-2012-launch-stack#d4 at corpus version 26a1b3a7e3dd
Chosen

An authenticated API call returns the number of messages in the queue. The author's network monitor polls that value and also polls the static and API sites for failures. For the Pushover components it falls back to text messages. SNMP hooks export messages received through the API per minute for graphing.

Section: February 28: Load Testing and Monitoring

Reasoning

The monitor was the reason Pushover was built, but once it monitored Pushover itself the author could not use Pushover to receive those alerts.

Near: I couldn't use Pushover to receive alerts

Review

Extracted by
Claude (feed 45)
Human review
Not started. Status recorded on 2026-12-02.