Loading…
Abstraction Engineering
Rodda John, Jared Wasserman
- Source
- Ramp
- Published
- Added to Yomu
Summary
Ramp’s early product encoded opinionated limits, but by fall 2022 customers needed configuration based on departments, accounting fields, subsidiaries, budgets, and HRIS fields, making incremental feature work increasingly complex. The team reframed these requests as a generic workflows platform in which Python functions served as actions, boolean logic as conditions, and workflows as graphs persisted in Postgres. After rejecting a dependency-based design, they built a graph-traversal engine, a Postgres-backed queue that retries asynchronous tasks, and an SDK for expressing constructs such as elif and else. The infrastructure now supports customer-facing policies and internal tasks; more than 45 million workflows have run, at over a million per day, while the core engine has not changed since launch. The project took weeks upfront but saved the engineering organization months by turning complex features into applications of broader abstractions.
Context
By fall 2022, customers were breaking assumptions embedded in Ramp’s early product and requesting substantially more configuration. Addressing each request through separate feature workstreams and customer-specific conditionals risked increasing state complexity, operational difficulty, and reliance on imprecise abstractions.
Approach / What changed
The team designed a generic workflows platform by modeling actions and conditions as vertices and their relationships as edges in a graph persisted in Postgres. They built a graph-traversal engine, a Postgres-backed retry queue compatible with Celery, and an SDK that transforms easier-to-use dataclasses and constructs such as elif and else into core workflows.
Takeaways
- The initial dependency-based design was discarded because translating linear logic into rules was unnecessary and action-action dependencies were difficult to represent.
- A Postgres-backed queue replaced the brittle asynchronous task behavior, retrying tasks until success was reported and also supporting non-workflow internal use cases.
- The workflows platform powers policies, approvals, accounting-field visibility, alerts, and other product behavior; its core engine has remained unchanged since launch.