Glossary — Technology

What is Outbox Architecture?

Outbox Architecture (Outbox Pattern) is a design pattern that queues messages locally and automatically sends them when network connectivity is restored. In Simple Memo, this ensures memos are never lost — even in subways, airplanes, or any offline environment.

Definition

Outbox Architecture is a message delivery guarantee pattern used in distributed systems. The sender first persists messages in a local Outbox, and a background process monitors the Outbox to send messages when network connectivity is available. After confirming successful delivery, messages are removed from the Outbox. This prevents both data loss during network failures and duplicate sends. In mobile apps, it forms the foundation of offline-first design.

Three Components of the Outbox Pattern

Local Persistence
Memos are first saved to on-device storage regardless of network state, so user actions complete instantly. Simple Memo encrypts stored memos with AES-256-GCM.
Background Monitoring
iOS background tasks and NWPathMonitor (network state monitoring API) automatically detect connectivity restoration. Monitoring continues at the OS level even when the app is closed.
Confirmed Deletion
Outbox data is deleted only after receiving a successful delivery response from Cloudflare Workers + Resend API. On API errors, the system retries — memos are never lost.

Simple Memo's Outbox Implementation

Simple Memo's Outbox goes beyond a simple offline queue — it balances security and UX. Memos are AES-256-GCM encrypted on save and decrypted only for transmission. After successful delivery, Outbox data is immediately and permanently deleted. Users never even notice the Outbox exists — the "sent" UI appears instantly when the send button is tapped, while actual delivery happens asynchronously in the background.

Example: Sending a Memo on the Subway

Scenario

1. On the subway, type an idea and tap send

2. The app shows "Sent" immediately (from the user's perspective, it's done)

3. Behind the scenes, the memo is AES-256-GCM encrypted and saved to the Outbox

4. You emerge above ground and connect to LTE/Wi-Fi — NWPathMonitor detects connectivity

5. The memo is retrieved from the Outbox, decrypted, and sent to Cloudflare Workers API

6. Resend API delivers to the recipient email address — success response confirmed

7. Encrypted Outbox data is permanently deleted

FAQ: Outbox Architecture

What is the Outbox architecture pattern?

A design pattern that stores messages in a local queue and automatically sends them when connectivity is available. It ensures no data loss during network failures and guarantees delivery upon reconnection.

How does Simple Memo's Outbox work?

When a memo is sent without connectivity, it is AES-256-GCM encrypted and saved to the Outbox. iOS background tasks detect when connectivity returns, then memos are decrypted, sent via Cloudflare Workers + Resend API, and deleted from the Outbox upon success.

Are memos in the Outbox secure?

The Outbox stored on your device is encrypted with AES-256-GCM. Its key is stored in iOS Keychain and read by the app for encryption and decryption. The key is configured not to migrate to another device. Email delivery is not end-to-end encrypted. Read the backup and key management details.

References

Never Lose a Memo, Even Offline
Outbox architecture + AES-256-GCM encryption ensures your memos are delivered reliably — subway, airplane, anywhere. Free to download.
Download on the App Store

Related Pages