Writing & notes

Engineering ideas, explained clearly.

Notes on backend systems, AI workflows, and engineering lessons from building and operating software.

Selected writing

Long-form engineering notes.

Read the English overview here, then explore the related project or original article.
  1. 01

    Design and Implementation of a Lightweight Workflow Engine

    A Chinese-language design article explaining a tree-based workflow engine with branching, parallel gateways, transitions, and rollback behavior.

    English overview

    What this article explains

    This article follows the design of a lightweight approval workflow engine as requirements grow from a simple sequence into nested and reversible processes. It explains why a tree of simple and composite nodes provides a clearer model than a hard-coded chain. Serial, countersign, parallel, and conditional nodes share explicit states, allowing the engine to activate branches, skip alternatives, and determine when a parent node is complete. Later sections examine rejection to an earlier approver, delegation, pre- and post-conditions, progress calculation, and lifecycle scripts. The useful engineering lesson is not a particular framework trick: it is how a small domain model can absorb changing workflow rules while keeping state transitions understandable. Readers can use this progression to reason about extensibility, rollback semantics, and how evolving requirements reshape a shared orchestration model.

    Role
    Author
    Topics
    Python · Django · MySQL · Workflow orchestration
    Original language
    Chinese
    Related project: Lightweight OA Workflow Engine →Read the Chinese original (opens in a new tab) ↗