ABSTRACT
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
- Actyx AG. 2020-2022. Actyx developer website. https://developer.actyx.com accessed 2023-05-18 Google Scholar
- Actyx AG. 2020–2023. Actyx Pond library. https://www.npmjs.com/package/@actyx/pond/v/3.4.0 Google Scholar
- Actyx AG. 2023. @actyx/machine-check library. https://www.npmjs.com/package/@actyx/machine-check/v/0.2.0 Google Scholar
- Actyx AG. 2023. @actyx/machine-runner library. https://www.npmjs.com/package/@actyx/machine-runner/v/0.3.1 Google Scholar
- Michael J. Fischer, Nancy A. Lynch, and Michael S. Paterson. 1985. Impossibility of Distributed Consensus with One Faulty Process. J. ACM, 32, 2 (1985), apr, 374–382. issn:0004-5411 https://doi.org/10.1145/3149.214121 Google ScholarDigital Library
- Seth Gilbert and Nancy Lynch. 2002. Brewer’s conjecture and the feasibility of consistent, available, partition-tolerant web services. SIGACT News, 33, 2 (2002), June, 51–59. issn:0163-5700 https://doi.org/10.1145/564585.564601 Google ScholarDigital Library
- Roland Kuhn. 2021. Local-First Cooperation. https://www.infoq.com/articles/local-first-cooperation/ Google Scholar
- Roland Kuhn, Hernán Melgratti, and Emilio Tuosto. 2023. Behavioural Types for Local-First Software. arxiv:2305.04848. To appear in ECOOP Google Scholar
- Leslie Lamport. 2019. Time, Clocks, and the Ordering of Events in a Distributed System. Association for Computing Machinery, New York, NY, USA. 179–196. isbn:9781450372701 https://doi.org/10.1145/3335772.3335934 Google ScholarDigital Library
- R. A. Light. 2017. Mosquitto: server and client implementation of the MQTT protocol. The Journal of Open Source Software, 2, 13 (2017), https://doi.org/10.21105/joss.00265 Google ScholarCross Ref
- Microsoft. 2012-2023. TypeScript: JavaScript with Syntax for Types. https://www.typescriptlang.org/ Google Scholar
- STATELY. 2023. XState website. https://xstate.js.org/docs/ accessed 2023-05-18 Google Scholar
- Lewis Tseng. 2019. Eventual Consensus: Applications to Storage and Blockchain. In 2019 57th Annual Allerton Conference on Communication, Control, and Computing (Allerton). 840–846. https://doi.org/10.1109/ALLERTON.2019.8919675 Google ScholarDigital Library
Index Terms
- Behaviorally Typed State Machines in TypeScript for Heterogeneous Swarms
Recommendations
Generating finite state machines from abstract state machines
ISSTA '02: Proceedings of the 2002 ACM SIGSOFT international symposium on Software testing and analysisWe give an algorithm that derives a finite state machine (FSM) from a given abstract state machine (ASM) specification. This allows us to integrate ASM specs with the existing tools for test case generation from FSMs. ASM specs are executable but have ...
Generating finite state machines from abstract state machines
We give an algorithm that derives a finite state machine (FSM) from a given abstract state machine (ASM) specification. This allows us to integrate ASM specs with the existing tools for test case generation from FSMs. ASM specs are executable but have ...
Behavior Changing Schedules for Heterogeneous Particle Swarms
BRICS-CCI-CBIC '13: Proceedings of the 2013 BRICS Congress on Computational Intelligence and 11th Brazilian Congress on Computational IntelligenceHeterogeneous particle swarm optimizers (HPSO) add multiple search behaviors to the swarm. This is done by allowing particles to utilize different update equations to each other. Dynamic and adaptive HPSO algorithms allow the particles to change their ...
Comments