Skip to content

[Meta] Isomorphic actors — browser & edge program #446

Description

@pathosDev

Coordination umbrella — sequences the browser/edge tickets into one program with a clear on-ramp.

Rationale

No actor framework in any language runs the same actor code across server, browser and edge with a shared cluster story. We already have the unusual ingredients: MessageChannel transport, WebWorker backend, CRDTs, a WebSocket server actor, and a runtime abstraction layer. The pieces are ticketed individually (#210 browser ActorSystem, #215 cross-runtime cluster incl. browser, #209 WASM/edge) — this umbrella orders them and adds the client-side on-ramp (#435/#436).

Phases

  1. Typed client on-ramp[Feature] actor-ts/client — typed browser/frontend client (ask over WebSocket/HTTP) #435 (typed browser client) + [Feature] React/Vue/Svelte bindings for the actor-ts client (useActor, useAsk, useTopic) #436 (framework bindings): browsers talk to the cluster without being members.
  2. Browser ActorSystem[Feature] Browser-side ActorSystem with Web Workers #210: the actor programming model (spawn/tell/ask/supervision) in the browser, Web-Worker-backed.
  3. Browser in the cluster[Feature] Cross-runtime cluster (Bun + Node + Deno + Browser in one cluster) #215: browser nodes join as weakly-up, role-restricted members over a WebSocket/WebTransport transport (no shard hosting, no voting).
  4. Edge runtimes[Feature] WASM/Edge-runtime subpackage (Cloudflare Workers / Deno Deploy) #209: WASM/edge subpackage (Cloudflare Workers / Deno Deploy), persistence via the D1/libSQL backends from [Feature] Additional persistence backends: MongoDB, DynamoDB, MSSQL, libSQL/Turso, Cloudflare D1 (umbrella) #438.
  5. Local-first showcase: offline-capable browser actors syncing state via the existing CRDT module — the demo that makes the story tangible.
// same actor code in the browser (#210), attached to the server cluster (#215):
const system = ActorSystem.create('ui');
const remote = await ClusterClient.connect('wss://api.example.com/cluster');
remote.send('shard/cart', { kind: 'add', sku: 'book-1' });

Documentation

Program page in the docs (EN + DE) once phase 1 lands; per-phase guides with the owning issues.

Acceptance (umbrella)

  • Each phase issue references this program and its predecessor; the local-first demo exists as an example app by the end of phase 5.

Relates

Tracks: #435, #436, #210, #215, #209, #438 (D1/libSQL). Security constraints: browser members never hold shards or votes. Improvement program M7.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions