Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

How I built my own Airflow/Temporal (no)

说明与用途

开发者谢尔盖创建了 slapflow 库,该库将业务过程描述为由普通函数组成的图,使图成为人类可读性和运行时执行的唯一数据源。它与 Repository、Unit of Work、Saga 补偿、幂等性和断路器模式集成。

问题

Business logic in projects grows too complex, making it hard for developers to understand and maintain the codebase.

结果

The developer built slapflow, a library that lets business processes be described as graphs of plain functions, making the graph the single source of truth for both human readability and runtime execution. It integrates with Repository, Unit of Work, Saga with compensations, idempotency, and circuit breaker patterns.

工作流

  • Identify the core problem: business logic complexity makes code hard to understand and maintain
  • Evaluate existing tools (FigJam, Miro, Enterprise Architect, React Flow, AntV X6, Node-RED, Blockly) — none provide a working config that is both human-readable and executable as code
  • Design slapflow: graph is the working config for the runtime, not just a presentation picture
  • Define steps as plain functions so the runtime doesn't need to know if they touch DB, HTTP, or S3
  • Glue steps together so the graph itself is the data source of truth
  • Integrate with Repository and Unit of Work patterns on the backend
  • Implement Saga with compensation strategies (e.g., order > payment > refund on failure)
  • Add idempotency and circuit breaker support via event configuration

证据

My name is Sergey. For 20+ years, I've been hitting the same wall: business logic in projects grows too complex, and after a while, even the author can't explain how it works.

来源

I threw away the debugger and went to draw trees. Lots of trees-beautiful and different.

来源

I wanted the graph to be a working config for the runtime, not just a picture for a presentation. So that the same structure is understandable to a human on a diagram and executed as code. Without a second source of truth.

来源

Classic saga: order > payment > refund if something breaks. The catch branches here are not 'exception handling'-they are a full compensation graph.

来源

Neural networks often try to fix things they don't understand, breaking the architecture.

来源

  • 记录日期: 2026-10-24T11:11:16.139Z