Softanza
StartFrançais
Softanza
Systems & runtime

Concurrency & distribution

Excellent substrates: nodes, supervision, multicore, fleet; the unifying vocabulary is design-only.

6 Strong · 4 Solid · 1 Partial · 1 Emerging

Measured against: Go · Akka · Erlang/OTP · Ray · Folders: base/concurrent(opens in a new tab) · base/cluster(opens in a new tab) · base/network(opens in a new tab) · For programmers: this area's reference

work spread over the cores of this machine, each block a job, drawn to scale
work spread over the cores of this machine, each block a job, drawn to scale. drawn on 2026-10-01 by the site's script tools/areas-figurative.ring, run inside the library at commit 0e72e2e2c · the source(opens in a new tab)

Rethought from first principles

What Softanza kept from what works, and what it rethought, as the library wrote it down in its design documents and narrations.

The Softanza wayA process is the natural unit of concurrency: nodes share nothing, talk only by messages, and every crossing has a measured cost that decides whether it pays.

Kept from the best practice

  • From Erlang, Softanza takes share-nothing processes, messages as the only contact, location transparency, and supervisors that restart failed nodes under declared strategies and budgets. source(opens in a new tab)
  • The event loop is libuv, vendored and compiled from source, rather than a home-made reactor: avoid reinventing the wheel, and rely on its tested Windows support. source(opens in a new tab)
  • Security reuses what exists: the same HMAC request signer and the same mutual-TLS channel as the rest of the library. No new crypto, no second signer. source(opens in a new tab)

Rethought

  • The hard part of distribution is refused in writing: no exactly-once delivery, consensus or message broker. At-most-once is the honest default; apps needing shared state use a database. source(opens in a new tab)
  • No wait is endless and no queue is silent. Every request carries a mandatory timeout, and every mailbox is bounded and counts what it drops. source(opens in a new tab)
  • A node topology is plain data: it can be described and rebuilt identically. Moving a node to another host is one changed line, Deploy, with nothing else touched. source(opens in a new tab)
  • Concurrency is a routing vocabulary, not a new machine. One word, Concurrently, routes work to engine threads, the event loop or worker processes, fanning out only where measurement shows it pays. (planned) source(opens in a new tab)

An unusual shape: the substrates are complete and excellent, while the vocabulary over them is design-only. Three sub-planes ship, each heavily guarded with real multi-process tests -- OTP-style supervised nodes, a measured-gated multicore tier, an elastic HTTP worker fleet -- over a full libuv reactor with mTLS. What is not built is the plane's own headline: the one routing vocabulary (Concurrently()) that would let you say 'do this concurrently' and land it on the right substrate.

What a crafter does with it, and what stands out

  • OTP-style supervision proven under real kills -- the pragmatic 80% of Erlang in a non-BEAM language
  • A measured-gated multicore tier: bit-identical or justified, elementwise killed by the memory wall
  • A full libuv reactor where no callback crosses into Haro (submit -> ticket -> await)
  • An elastic HTTP worker fleet with a smart router and autoscaling, guarded with a real 3-process fleet

What is owed

  • The routing vocabulary: Concurrently() + stzTask/ticket/stzWorkshop (CN0-CN5)
  • Channels and structured concurrency
  • Federation over the node plane; UDP and a native WebSocket; a managed-PKI mTLS story
  • Dynamic task-graph distribution and live multi-machine verification

One example, run

The engine sees this laptop's twelve cores. The cluster, fleet and multicore guards are this group's proof; here, the count.

Softanza
? StzEngineSystemCpuCount()
Output
12

run on 2026-10-01 at 01:40

The articles of this area (5)

The lanes, one by one

Lanes and their notes are quoted as they were read at the source, on Read from the source on 2026-09-16, from a read-only main worktree.

Message-passing nodes & mailboxes
Strong
Share-nothing stzNode with an engine-enforced bounded inbox, On(tag,f) dispatch, location-transparent Send/Ask over STZM; guarded with real OS processes.stzNode, stzNodePlane, stzm.zig; D0-D2 guards under test/cluster
Actor supervision
Strong
OneForOne/AllForOne, a restart budget with escalation, heartbeats, death-notice monitors; proven by surviving vs wiped state under real kills.stzNodeSupervisor; D3 guard
Distributed computing (D0-D6)
Strong
Share-nothing OS processes exchanging STZM frames over reactor TCP/mTLS, topology as data, Deploy moves a node in one line; guarded end-to-end D4-D6.SOFTANZA_DISTRIBUTION_PLAN.md; D4-D6 guards (semantic-search node Deploy'd and killed mid-run)
Multicore parallel tier (M1-M5)
Strong
Five parallel sites behind a measured calib.Gate: matmul, LU, reductions, kNN/distance; 2.7-6.7x; elementwise killed by the memory wall.SOFTANZA_COMPUTE_MODEL.md; matrix/linalg/stats/cluster/umap.zig
Async reactor / event loop
Strong
Vendored libuv on its own thread, submit -> ticket -> await, no callback crosses into Haro; timers, TCP, subprocess, curl HTTPS, HTTP/STZM/TLS listeners.reactor.zig, stzReactor
Worker fleet & autoscaling (R8)
Strong
stzWorkerPool, 3-tier stzRequestClassifier, stzAppCluster, stzClusterSupervisor autoscaling on /health, p50-p99 telemetry; guarded with a real 3-process fleet.stzAppCluster, stzClusterSupervisor; R8 fleet guard
Fault tolerance & hardening
Solid
Retry-with-failover, circuit breakers, token-bucket rate limiting, at-most-once delivery, mandatory timeouts; fleet-scoped, thinner than a service mesh.hardening guard (SSRF, CRLF smuggling, injection)
Networking (HTTP / TCP)
Solid
HTTP client sync + async, TCP client/server, URL parsing, DNS; framing fuzzed and property-tested; no UDP, WebSocket is curl-based.http.zig, tcp.zig
Transport security (mTLS)
Solid
Mutual TLS via vendored mbedTLS: server require_client, client reactor_connect_tls, a reactor-free smoke guard; test certs only, no PKI lifecycle.mtls_smoke.zig (exit-code gated)
Compute federation
Solid
stzComputeFederation: Join, a governance lattice (risk/grant/authority), FederatedCall over reactor async curl; facet discovery still HTTP (D5 residue).stzComputeFederation
Dynamic task-graph distribution
Partial
Distribution routes named work only; no Ray-style task graph with dependency scheduling; the plan refuses it until a workload earns it.
The routing vocabulary (Concurrently)
Emerging
Plan of record CN0-CN5 (Concurrently(), stzTask, ticket, stzWorkshop); no code exists, base/concurrent/ holds only the plan, its test dir is empty.SOFTANZA_CONCURRENT_PLAN.md (plan-only)