Durable Execution: FSM based Orchestration Platform
What is a Durable Workflow? A durable workflow is a long‑running, stateful business process that automatically remembers where it left off, survives crashes or restarts, and can resume or retry instead of starting over. Unlike a simple script that runs once and dies, a durable workflow: Persists its state (current step, variables, context) in a database or durable store Handles timeouts, retries, and failures without losing progress Supports human‑in‑the‑loop steps, approvals, and external events (e.g., a user clicking “confirm”) In effect, durable workflows bring human‑like resilience to automation: they pause, recover, and continue, just like a person who remembers what they’ve already done. ...
Building Machine That Behave Like Human
The Think–Act Model of Human Behavior Human action for any task can be divided into two main parts: 1. Think This involves perception, reasoning, and decision-making. Today, Large Language Models (LLMs) and AI systems are increasingly capable of handling the “thinking” part—analyzing information, generating ideas, and making recommendations. 2. Act Acting is about executing decisions in the real world. Human actions are shaped by goals, context, memory, and experience. Importantly, when humans act, they are able to handle interruptions—pausing, resuming, or adapting their actions as needed. This resilience allows us to recover from distractions or failures and continue working toward our objectives without starting over. ...
Lowest Common Ancestor LCA in Finite State Machines
What is Lowest Common Ancestor (LCA)? The Lowest Common Ancestor (LCA) of two nodes in a tree is the deepest (i.e., lowest) node that is an ancestor of both nodes. In other words, it is the shared ancestor of the two nodes that is located farthest from the root. The concept is fundamental in computer science, especially in the context of tree data structures, such as binary trees, general trees, and state machines. ...
Why Finite State Machines Are Everywhere: From Software to Human Life
Why Finite State Machines Are Everywhere: From Software to Human Life Finite State Machines (FSMs) are everywhere — whether you are writing software, designing systems, or simply living your daily life. From a login screen that moves from “logged out” to “logged in”, to a human being transitioning from “sleeping” to “working”, the same pattern exists. In this article, we’ll explore what a Finite State Machine is, how it works in software, and why human behavior itself can be understood as a series of states and transitions. ...
Finite State Machines Backed by PostgreSQL Intro
If you’re new to the concept of Finite State Machines (FSMs), check out my previous blog post: Why Finite State Machines Are Everywhere: From Software to Human Life. That post explores how FSMs are fundamental to both software systems and real-world processes. Finite State Machine: In Various Languages FSMs as a concept have been implemented in many programming languages, each with its own data structures and libraries. For example: TypeScript/JavaScript: xstate is a popular library for modeling FSMs and statecharts. Python: Libraries like transitions provide easy-to-use FSM implementations. Java: Frameworks such as Spring State Machine offer robust FSM support. C#: Libraries like Stateless are widely used for FSMs. Go: Libraries like looplab/fsm provide simple and effective FSM implementations for Go. These libraries use different data structures—objects, classes, state tables, or even domain-specific languages—to represent states and transitions, but the core principles remain the same. ...