Run statechart actors inside your own process

tinyactors embeds SCXML actors on your event loop across Node.js, Python, browsers and C. Your code owns the process, store, effects and cross-host placement while the core passes 191 W3C tests.

Check capacity numbersWrite a first chartBuild a team chat

tinyactors fits millions of in-process statechart actors

tinyactors fits when you need memory density, SCXML charts, event-based effects, simulated-clock tests and one core across runtimes.

Limits: SCXML charts, single hosts and changing APIs

tinyactors stops at SCXML charts inside single hosts under active development with frequent breaking changes.

A crash stops memory and keeps saved state

Actors live in process memory, so a crash stops every actor and keeps only what your program saved.

Portable charts and MIT license, build-bound snapshots

Charts, event boundaries and the MIT license move across runtimes, whereas snapshots require matching memory layout.

W3C SCXML charts meet code at events

Each chart is a W3C SCXML document rather than a proprietary format.

Your code meets tinyactors only at event boundaries: inputs go in, and effects come out to your handlers.

Source:W3C, "State Chart XML (SCXML)"

MIT license covers every tinyactors package

Every package is MIT licensed, allowing you to use, change and ship tinyactors while keeping its copyright and permission notice.

Source:tinyactors, LICENSE

tinyactors runs SCXML directly inside your own hosts

Temporal, Durable Objects and Rivet manage persistence or placement, whereas XState is inspired by SCXML.

Durable Objects place Workers; tinyactors uses your process

Cloudflare describes a Durable Object as a Worker that combines compute with storage, placed near its first request.

A tinyactors actor runs inside any server or browser tab your program operates, with storage under your control.

tinyactors compared with Durable Objects sets the two side by side: idle sessions, tests and deploys.

Source:Cloudflare, "Durable Objects"

Rivet places durable processes; tinyactors pins to hosts

Rivet describes its actors as durable processes in your backend, placed by Rivet Cloud or your control plane.

A tinyactors actor stays in the host that spawned it, and your program routes across hosts.

tinyactors compared with Rivet sets the two side by side: placement, sleeping actors and deploys.

Source:Rivet, "Actors"

Write a first chartTest your chartsCheck capacity numbers