Skip to content

Add KurrentDB gRPC persistence adapter for EventFlow 0.x - #1152

Open
warren-pieterse wants to merge 1 commit into
eventflow:develop-v0from
warren-pieterse:feature/kurrentdb-client
Open

warren-pieterse wants to merge 1 commit into
eventflow:develop-v0from
warren-pieterse:feature/kurrentdb-client

Conversation

@warren-pieterse

Copy link
Copy Markdown

Adds an opt-in KurrentDB gRPC persistence adapter to EventFlow 0.x while retaining the existing EventStore TCP adapter and all existing core target frameworks.

The new EventFlow.EventStores.KurrentDB package targets net48;net8.0, uses KurrentDB.Client 1.6.0, and provides UseKurrentDBEventStore(connectionString). The client is owned by each root resolver and shared across its scopes. The adapter implements aggregate append/read, global reads, and soft deletion, preserving stream names, event type names, serialized data/metadata, sequence numbering, and optimistic concurrency exceptions.

Checkpoint compatibility

Existing TCP commit-prepare checkpoints are read inclusively. New checkpoints use after:commit-prepare and resume exclusively after the last scanned record. They must be stored unchanged and cannot be passed back to the TCP adapter. This avoids unsafe arithmetic on physical log offsets. Migration tests exercise checkpoints produced by the actual unchanged TCP adapter, including transaction records sharing a commit position and end-of-log resumes.

Validation

  • 70 Release tests passed on .NET 8.0.24.
  • 70 Release tests passed targeting net48 on .NET Framework 4.8.1 (runtime 4.8.10008.0), Windows build 26300, using TLS and WinHttpHandler.
  • All 18 inherited EventFlow event-store contract tests run without overrides or skips on each target.
  • TCP-to-gRPC migration tests cover aggregate replay, continued writes, data/metadata preservation, checkpoint boundaries, and cross-client concurrency against EventStoreDB 23.10.8.
  • KurrentDB integration tests use isolated KurrentDB 26.1.1 servers.
  • Release NuGet and symbol packages built and inspected for both framework assemblies, README, and dependency isolation; the production package has no TCP-client dependency.
  • The adapter also builds with .NET SDK 8.0.418. Workflow and Docker YAML parse successfully.

The existing workflows now provision isolated .NET 8 test databases and always clean them up. Framework runtime tests are enabled explicitly with -p:EnableNet48Tests=true and use a separate TLS Docker profile because the existing Windows 10 CI runner label does not establish the HTTP/2 streaming support required by WinHttpHandler.

Scope and limitations

The existing TCP adapter, its package version, and its tests are unchanged. This PR is independent of the separate TCP-client 5.0.12 update.

Framework 4.8-targeted binaries were tested on the installed 4.8.1 runtime, not on a Framework 4.8-only installation. Framework runtime usage requires suitable Windows HTTP/2 streaming support and TLS. Development certificate-validation bypasses are confined to local test connection strings. Protocol migration tests do not perform a server database-file upgrade. GitHub CI has not yet run for this PR.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant