Prysm
Menu

Notifications and push

Every notification is written to the database in the same moment as the action that caused it. A scheduled sweep then delivers it through OneSignal, so a push provider having a bad minute can never make your like fail.

What you get

An in-app inbox, plus push for new followers, likes, comments, reposts, mentions, and release day for a game you are watching.

How it works

From action to phone
  1. Action

    a like, a follow

  2. Trigger

    same transaction

  3. Notification row

    also feeds the inbox

  4. Push sweep

    on a schedule

  5. OneSignal

  6. Your phone

The inbox and the push read the same row.

A database trigger writes the notification row in the same transaction as the action. A scheduled push sweep picks up rows not yet sent and delivers them through OneSignal. A row is marked as pushed only after OneSignal accepts it, so a failed send is retried on the next sweep, never dropped and never sent twice.

Why a sweep and not "send on insert"

Dedupe

Unfollowing and re-following doesn't ring the bell twice.

Release day

A separate scheduled sweep finds games whose release day is today and writes a notification for everyone watching them. It only fires for games whose date is known to the day, because release dates in games data are often placeholders. Delivery then goes through the same push sweep as everything else.

Who it is sent to

Push targets your Prysm account rather than a device, so it follows you across reinstalls.

Last updated