Skip to content

v5.1.0

Choose a tag to compare

@windischb windischb released this 05 Sep 12:37
· 48 commits to develop since this release
a331b9f

5.1.0 adds a second backplane, a cluster-wide observable, and an agent skill that is generated from the documentation. Nothing in it is breaking: the Redis package, the server and the clients keep their API and wire format, and a single-node application is unaffected. Verified in a two-node production deployment on the betas.

  • Backplane guide — choosing between Redis and Postgres, catch-up, cluster-aware observables
  • Changelog — the full list

What is new

  • PostgreSQL backplane — Cocoar.SignalARRR.Server.Backplane.Postgres, AddSignalARRRPostgresBackplane. The same cluster behaviour as the Redis package over the PostgreSQL primary an application already has, for deployments whose only stateful dependency is Postgres. LISTEN/NOTIFY carries the traffic; the connection registry and node heartbeats are rows; liveness is judged on the database clock. The schema is created on first start, or supplied through migrations with SignalARRRPostgresBackplaneSchema.GetCreateScript().
  • Catch-up after a subscription drop (Postgres, on by default). Each node keeps a cursor; when its listener connection drops and comes back, it replays what it missed, in order, before resuming live delivery. Publishes are serialized so the cursor is exact. An outage longer than MessageRetention (default five minutes) is reported as a gap. WithCatchUp(false) restores the Redis contract.
  • Cluster subjects — AddSignalARRRClusterSubject<T>("name"), IClusterSubject<T>: an observable whose events reach subscribers on every node, so a hub streaming from an in-process source is cluster-aware without a relay of its own. Once locally, once remotely, never echoed; in order per publishing node; the event type is fixed at registration so no type name travels on the wire. Works over Redis and Postgres; a plain local subject without a backplane.
  • Agent skill, generated from the docs. Every documentation page now carries a description, llms.txt is a real index, and the skill in the server package is the documentation page by page with that index — installed on demand with agentskills-cli add Cocoar.SignalARRR.Server, never copied into your repository by the build anymore.
  • Fixed: a node restarting under a stable node id kept its crashed predecessor's registrations alive. Both backplanes now clear their node id's leftovers on startup.

Installing

<PackageReference Include="Cocoar.SignalARRR.Server" Version="5.1.0" />
<!-- pick one, only for more than one node -->
<PackageReference Include="Cocoar.SignalARRR.Server.Backplane.Postgres" Version="5.1.0" />
<PackageReference Include="Cocoar.SignalARRR.Server.Backplane.Redis" Version="5.1.0" />
npm install @cocoar/signalarrr@5.1.0

The TypeScript and Swift packages are published at 5.1.0 for consistency; their content is unchanged since 5.0.0.

Worth knowing before you integrate

  • Postgres: primary only, direct listener connection. NOTIFY is not replicated, and a transaction-pooling PgBouncer cannot hold a LISTEN session. Startup fails within 30 seconds if the subscription cannot be established, and says so.
  • Postgres: the schema is the isolation unit. It names the tables and the notification channels, so two applications sharing one database need two schemas.
  • Throughput. Postgres carries low thousands of cross-node messages per second, Redis hundreds of thousands. Far above what an application-level backplane sees in practice; Redis remains the choice for high realtime volume.
  • One cluster subject per event type, resolved by T; two subjects cannot share a name.
  • Upgrading from a 5.1.0 beta with WithAutoCreateSchema(false): run GetCreateScript() again through your migrations; it is idempotent. With automatic creation nothing needs doing.

Feedback

Please open an issue for anything that surprises you — particularly around ordering, duplicates, or what a node does after a reconnect.