Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Supabase 5 min read Announcement mediumAdept

Workflows are coming to Supabase

Supabase is building Workflows, an open source orchestration engine written in Elixir that uses the Amazon States Language to coordinate existing functions (AWS, GCP, Azure, OpenFaaS, Postgres) in response to database events or HTTP calls. Jobs, queues and logs are stored in Postgres via Oban. Workflows can be persistent, surviving restarts, or transient and in-memory. A worked example shows a state machine that maps over Realtime INSERT events on a users table, waits 86400 seconds, then sends a templated welcome email. The interpreter is already open sourced on Hex, with dashboard integration and a Zapier-like UI planned.

Related posts

  • Running Durable Workflows in Postgres using DBOS

    Supabase mediumAdept

    DBOS implements durable workflows entirely in Postgres: workflow and step decorators record a workflow's ID, inputs and status in a workflow_status table and each step's output in operation_outputs, all within a separate system database. On restart, a background thread re-runs PENDING workflows with their original inputs and skips steps whose outputs are already stored, so execution resumes from the last completed step. This relies on workflows being deterministic. Because a step transition is a ~1ms Postgres write rather than a ~100ms external dispatch, DBOS claims 25x the speed of AWS Step Functions, and it offers exactly-once transactional steps and idempotency keys used as workflow IDs.

  • Processing large jobs with Edge Functions, Cron, and Queues

    Supabase mediumAdept

    Large data-processing jobs on Supabase can be split into a three-layer pipeline: cron-triggered Edge Functions collect work, distributor jobs route it into per-source Postgres queue tables, and specialized workers process one item at a time to stay within serverless timeouts. The worked example is an NFL news aggregator that scrapes sites, classifies articles with OpenAI, upserts player and team entities, and stores pgvector embeddings for search. Key practices include letting unique constraints handle deduplication, always marking queue items processed in a finally block to avoid infinite retries, reporting failures to Sentry, queuing user interactions for batched trending updates, and offloading expensive work like embeddings to background tasks.

  • How Zillow runs 100 million daily notifications on AWS Step Functions

    AWS Architecture Blog mediumAdept

    Zillow replaced more than 10 per-campaign notification generator services with a configuration-driven Campaign Orchestrator that runs each of 100M+ daily email and push notifications as a short-lived AWS Step Functions Express Workflow, calling a shared library of stateless, schema-driven content modules (the Universal Content Generator) via HTTP Invoke. Step Functions beat Temporal, Flowable and an in-house engine at roughly a quarter of the build and maintenance effort. Express mode was chosen over Standard for its higher start quota and low latency, with at-least-once semantics handled by idempotent modules. Key techniques include an SQS-fed router for pausing, replay and throttling, EventBridge connections for API-key auth, component inheritance compiled into task states, a declarative config layer that AI tools can safely generate, and batching for throughput and cost.

  • Updates for Supabase Functions

    Supabase mediumAdept

    Supabase is shipping Database Webhooks in alpha, a convenience wrapper around Postgres triggers that fires asynchronous HTTP requests on INSERT, UPDATE and DELETE with a Realtime-style JSON payload. It also adds dashboard editors for Postgres functions and triggers, and lays out a staged roadmap toward its own serverless Supabase Functions. The networking layer is pg_net, a new Postgres extension that queues requests to a background worker using the libcurl multi interface. Queuing 10 GETs returned in 1.5 ms versus 3.5 s for the synchronous pgsql-http, and the extension handles over 300 requests per second.

  • Introducing Supabase Pipelines

    Supabase mediumAdept

    Supabase Pipelines is a managed change-data-capture service that replicates Postgres tables to analytical destinations in near real time using logical replication, publications and replication slots, with an initial sync followed by batched ongoing changes. BigQuery was the first destination, and an update adds ClickHouse, DuckLake and Snowflake in public alpha. Setup is done in the Dashboard. Constraints include required primary keys for BigQuery, no generated columns, custom types replicated as strings, beta-only schema change support, and no transformations. The underlying ETL engine is open source and written in Rust.

The quest for software engineering knowledge.

Look:
Layout: