The genesis of Ramp’s workflows product and lessons learned
Overview
The article discusses the evolution of Ramp's workflows platform, highlighting the importance of abstraction engineering in creating a unified system for managing complex business logic. It details the challenges faced during implementation and the solutions developed to enhance flexibility and performance.
What You'll Learn
1
How to design a generic workflows platform that accommodates diverse customer requirements
2
Why effective abstraction can simplify complex business logic management
3
How to implement a Postgres-backed queue for reliable task management
Prerequisites & Requirements
- Understanding of workflows and business logic customization
- Familiarity with PostgreSQL and asynchronous task management frameworks(optional)
Key Questions Answered
What challenges did Ramp face when building their workflows platform?
Ramp faced challenges such as limited customization options for business logic, the need for a more generic solution to accommodate diverse customer requests, and complexities in managing synchronous and asynchronous actions. These challenges prompted the development of a unified workflows platform that could handle complex logic efficiently.
How did Ramp improve the performance of their workflows engine?
Ramp improved the performance of their workflows engine by optimizing the database interactions, reducing the time to write workflows from over twenty seconds to under 200 milliseconds. This was achieved by consolidating multiple queries into a single massive query, significantly enhancing execution speed.
What is the significance of the workflows SDK developed by Ramp?
The workflows SDK allows users to define complex logic using simpler data structures, enabling the use of advanced control structures like 'elif' and 'else' statements. This enhances the usability of the workflows platform, making it easier for customers to implement their specific business logic without unnecessary complexity.
How does Ramp's workflows platform handle asynchronous tasks?
Ramp's workflows platform utilizes a Postgres-backed queue to manage asynchronous tasks, ensuring reliable execution and retries until success is reported. This approach addresses the brittleness of their previous task management framework, providing a more robust solution for handling workflows.
Key Statistics & Figures
Workflows run daily
over a million
This statistic highlights the scale at which Ramp's workflows platform operates, demonstrating its effectiveness and reliability.
Time to write a workflow
under 200ms
This significant reduction in time showcases the optimization efforts made to enhance the performance of the workflows engine.
Total workflows run since launch
over 45 million
This figure illustrates the extensive usage and trust in the workflows platform across Ramp's operations.
Technologies & Tools
Some links below are affiliate links. We may earn a commission if you make a purchase.
Database
Postgresql
Used for persisting workflows and managing task queues.
Backend
Celery
Utilized for asynchronous task management within the workflows platform.
Key Actionable Insights
1Invest time in designing a robust abstraction layer for your workflows to handle complex logic efficiently.A well-thought-out abstraction can simplify the implementation of diverse customer requirements, reducing the need for repetitive coding and enhancing maintainability.
2Consider using a database-backed queue for managing asynchronous tasks to improve reliability.By leveraging a Postgres-backed queue, you can ensure that tasks are retried appropriately, minimizing the risk of dropped tasks and enhancing overall system robustness.
3Iterate quickly on your product features based on customer feedback to refine your workflows.Launching features to a small group of users allows for real-world testing, which is crucial for identifying areas for improvement and optimizing the user experience.
Common Pitfalls
1
Failing to validate abstractions before implementation can lead to complex and unmanageable code.
It's crucial to evaluate and test your abstractions against real-world scenarios to ensure they meet the intended requirements and avoid unnecessary complexity.
Related Concepts
Workflow Management
Abstraction Engineering
Asynchronous Task Management