@sigx/actors-surreal
v0.9.2
Published
SurrealDB 3 providers for @sigx/actors — etag-CAS actor storage, host membership, the distributed actor directory and durable reminders
Maintainers
Readme
@sigx/actors-surreal
SurrealDB providers for @sigx/actors — for the team
whose one durable store is SurrealDB. Four providers, one connection.
surrealStorage()— etag-CASActorStorage.surrealMembership()— TTL heartbeats judged on the database clock, with live-query push and a poll fallback.surrealDirectory()— the single-activation claim directory.surrealReminders()— durable reminders on a due-time-indexed table.surrealCluster()bundles membership + directory;surrealSchemaSql()/ensureSurrealSchema()provide the DDL.
Two things to know before you wire it up:
- The DDL step is mandatory. Reading an undefined table is an error in
SurrealDB 3 (2.x returned
[]). - Retry is part of the contract. SurrealDB has no
SELECT … FOR UPDATE, noSKIP LOCKEDand no advisory lock, so the commit-time write–write conflict is the only mutual exclusion — and the SDK ships retry disabled. If you pass your owndb, installsurrealRetryableon it.
pnpm add @sigx/actors-surreal surrealdbRequires SurrealDB ≥ 3.0 (3.2.4 or newer recommended); prefer a
ws:///wss:// endpoint. surrealdb
(≥ 2.0.8) is a peer dependency, as is @sigx/actors itself.
Documentation
https://sigx.dev/actors/packages/actors-surreal/overview/
Clustering guide: https://sigx.dev/actors/docs/clustering/ · Storage seam: https://sigx.dev/actors/docs/storage/
Source, examples and architecture notes: https://github.com/signalxjs/actors
MIT © Andreas Ekdahl
