A heterogeneous swarm system is a distributed system where participants come and go, communication topology may change at any time, data replication is asynchronous and partial, and local agents behave differently between nodes. These systems are hard to design and reason about, mainly because we desire a particular class of behaviors to emerge from the interplay of heterogeneous individual agents. Nevertheless, mission-critical operations like manufacturing process orchestration in factories use such systems due to their uncompromising availability and resilience of computing services. This paper presents a set of TypeScript libraries to model peer-to-peer workflows as state machines, execute them using the Actyx middleware, and check the shape of these machines for conformance to a swarm protocol. The swarm protocol describes an idealized global view of the cooperation of machines of different roles. It directly corresponds to a diagram a product manager would sketch on a whiteboard; this allows for verifying that the coded state machines correctly implement the product specification. A well-formed swarm protocol also guarantees that conforming machines will achieve eventual consensus on the overall state progression even in the absence of further coordination. This tool is for developers of business logic for heterogeneous swarm systems, helping them verify that their protocols and implementations are correct. Tool repo: https://github.com/Actyx/machines
翻译:异构群集系统是一种分布式系统,其中参与者动态加入或离开,通信拓扑可随时变化,数据复制是异步且部分的,且本地代理在不同节点上的行为各异。此类系统难以设计与推理,主要因为期望从异构个体代理的相互作用中涌现出特定类别的行为。然而,由于此类系统在计算服务的可用性与弹性方面具有不可妥协的优势,工厂中的制造流程编排等关键任务操作仍采用此类系统。本文提出一套TypeScript库,用于将点对点工作流建模为状态机,通过Actyx中间件执行这些状态机,并检查状态机的形态是否符合群集协议。该群集协议描述了不同角色机器协作的理想化全局视图,直接对应于产品经理在白板上绘制的示意图;由此可验证编码实现的状态机是否正确实现了产品规范。一个良构的群集协议还能确保,即使缺乏进一步协调,符合协议的状态机也能对整体状态演进达成最终共识。本工具面向异构群集系统的业务逻辑开发者,协助他们验证协议与实现的正确性。工具仓库:https://github.com/Actyx/machines