feat(comm): Phase 4 — delete Akka ClusterClient site↔central transport, gRPC-only
ClusterClient→gRPC migration Phase 4 (docs/plans/2026-07-22-clusterclient-to-grpc-plan.md). Phases 2/3 proved both directions on gRPC; this removes the Akka transport underneath. Deleted: - AkkaCentralTransport, AkkaSiteTransport (+ their dedicated tests) - ISiteClientFactory + DefaultSiteClientFactory; CentralCommunicationActor legacy ctor + SelectTransport (Host now builds GrpcSiteTransport and injects it) - ClusterClient creation + both ClusterClientReceptionist.RegisterService calls in AkkaHostedService; the RegisterCentralClient message + receive block - CommunicationOptions.CentralContactPoints; the CentralTransport/SiteTransport coexistence flags; the CentralTransportMode/SiteTransportKind enums gRPC is now the only site↔central transport (site→central CentralControlService via GrpcCentralTransport; central→site SiteCommandService via GrpcSiteTransport), both built unconditionally by the Host. NoOpCentralTransport is the fail-loud null-default so TestKit command-dispatch suites still construct the site actor without a wired transport; production always injects GrpcCentralTransport. Config: CentralGrpcEndpoints is now unconditional — CommunicationOptionsValidator rejects blank entries (role-agnostic), and StartupValidator requires a Site node to list >=1 endpoint (fail-fast, mirrors GrpcPsk). Rig configs moved CentralContactPoints -> CentralGrpcEndpoints (docker x6, docker-env2 x2, Host default, deploy/wonder-app-vd03). Kept Akka.Cluster.Tools (ClusterSingleton still used). Tests: build 0/0; Communication.Tests 640, Host.Tests 421 green. Removed the ClusterClient.Send per-site-routing tests (covered by the transport suites), swapped the ISiteClientFactory-based ctors to a substitute ISiteCommandTransport, converted the audit-push integration relay to an in-process bridge transport. Docs: Component-Communication/Host/StoreAndForward, components/Communication, topology-guide, grpc_streams (SUPERSEDED note), the frame-size known-issue (retired amendment), and CLAUDE.md transport decisions. Not included: the dead IntegrationCallRequest path (#32) is a separate user-owned behavioral decision — SiteEnvelope routing is transport-agnostic so it still compiles.
This commit is contained in:
@@ -178,14 +178,22 @@ database from its peer rather than letting it rejoin.
|
||||
|
||||
### Central-Site Communication
|
||||
|
||||
Three transports cross the boundary, not one:
|
||||
Three transports cross the boundary, not one — **all now gRPC or HTTP; Akka ClusterClient was removed
|
||||
in Phase 4 of the ClusterClient→gRPC migration (2026-07-23), and Akka remoting no longer crosses the
|
||||
boundary at all:**
|
||||
|
||||
- **Akka ClusterClient** — command/control. Sites list every central node in
|
||||
`ScadaBridge:Communication:CentralContactPoints`; contact rotation reaches whichever node
|
||||
answers, so no "active central" needs to be identified. (There is no `Communication:CentralSeedNode`
|
||||
setting — earlier revisions of this guide named one that never existed in the code.)
|
||||
- **gRPC** — real-time data and audit pull. Note the direction is inverted from the data flow:
|
||||
each **site node hosts the gRPC server** on `GrpcPort` (default 8083, h2c) and central dials in.
|
||||
- **gRPC command/control** — both directions, on sticky-failover channel pairs, dialled directly (no
|
||||
receptionist, no "active central" to identify — each side dials both of the peer's node endpoints):
|
||||
- *Site → central* to the central-hosted **`CentralControlService`** (`GrpcCentralTransport`): the
|
||||
site lists the central nodes' gRPC endpoints in `ScadaBridge:Communication:CentralGrpcEndpoints`
|
||||
(e.g. `http://scadabridge-central-a:8083`, the central's `CentralGrpcPort`, default 8083 — direct
|
||||
h2c, **not** via Traefik, which is HTTP/1 only). A Site node must list at least one; central nodes
|
||||
leave it empty.
|
||||
- *Central → site* to the site-hosted **`SiteCommandService`** (`GrpcSiteTransport`): central dials
|
||||
the site's `GrpcNodeAAddress` / `GrpcNodeBAddress` (from the Site entity), NodeA→NodeB failover.
|
||||
- **gRPC streaming + audit pull** — real-time data and audit/telemetry pull on the site-hosted
|
||||
**`SiteStreamService`**. Note the direction is inverted from the data flow: each **site node hosts
|
||||
the server** on `GrpcPort` (default 8083, h2c) and central dials in.
|
||||
- **Plain HTTP** — the deploy config itself, fetched by the site with a per-deployment token.
|
||||
|
||||
#### gRPC control-plane preshared key (required)
|
||||
|
||||
Reference in New Issue
Block a user