Skip to content

Conversation

@w1am
Copy link
Contributor

@w1am w1am commented Jul 16, 2025

This PR primarily introduces the Kurrent Client v2, which includes major updates and improvements to the client user experience from KurrentDB client v1.0.0 that was released this year. While initial scaffolding and setup for the schema registry have been started, the schema registry is not complete and is not fully tested.

PR includes multi append and result base pattern for all operations.

Changelist
fixes DEV-853 that Includes Authorization in Empty instance of UserCredentials
fixes DEV-852 to support messages with no namespaces when using MesageSchemaNameStrategy

RagingKore and others added 30 commits December 16, 2024 17:03
dropped support for net6.0 and net7.0
added some helpers to fluentdocker
playing around the idea of keeping the container on tests
Refactored the folder structure for streams and protocol files to improve organization and clarity. Introduced `Modules` as the main folder for streams, and migrated protocol definitions to a new hierarchical structure under `proto/kurrentdb/protocol`. Added new v2 protocol files for schema registry functionality.
Moved core files and modules to reorganized namespaces for better project modularity and maintainability. Introduced a clearer folder structure aligning with version-specific implementations, while consolidating and relocating common utility files.
`DefaultRequestVersionHandler` was removed to simplify or deprecate its functionality. Additionally, the namespaces were updated to adopt a cleaner, concise syntax throughout the project for improved readability and consistency.
Removed redundant `using` directives and simplified several class constructors. Streamlined method signatures and adhered to consistent formatting across interceptors. Introduced `KurrentDBConnectionString` for parsing and managing connection strings, along with updated connectivity settings implementation in `KurrentDBClientConnectivitySettings`.
…otobuf.

Added abstractions and implementations for schema serialization and deserialization, enabling multi-format data handling. Included support for schema-based data validation, serialization exceptions, and extensibility for future formats. Refactored client modules to integrate the schema framework seamlessly.
Removed legacy stream handling code and replaced it with more modular, extensible append models using `OneOf` and Proto-based definitions. Introduced new `Appender` and `Protocol` utilities for improved batching, schema handling, and multi-stream transactional operations. Updated metadata processing strategy for compatibility with both old and new database contracts.
Deleted unused or outdated gRPC client-related code, schema serialization infrastructure, and related logic. Simplifies the codebase by discarding legacy components no longer in use or relevant.
Refactored schema serialization to use a streamlined auto-registration and validation approach. Introduced new exception types to improve error specificity, added gRPC compression support (e.g., Brotli), and improved hash code generation APIs. Replaced legacy serialization code, cleaned up unused methods, and aligned serialization formats with updated schema registry standards.
RagingKore and others added 27 commits August 1, 2025 13:55
Refactor error handling in PersistentSubscriptionsModel, RecordSchemaInfo,
and StreamsClient files to improve clarity and maintainability.

- Simplified error type references by removing redundant namespace prefixes.
- Renamed StreamsClient to StreamsClient for consistency across the codebase.
- Adjusted method signatures to align with updated error handling conventions.
Consolidate and rename namespaces for improved clarity and structure.
This change enhances maintainability and aligns with the new project organization.
Update namespaces in persistent subscription files to improve structure
and maintainability. This change enhances code readability and aligns
with the overall project organization.
- Updated service names in operations.proto, streams.proto, and usermanagement.proto to follow a consistent naming convention.
- Added C# namespaces for better organization in generated code.
- Minor formatting adjustments for improved readability.
…rojections

- Replace EventStore.Client references with KurrentDB.Protocol in multiple files
- Clean up appsettings.json by removing unnecessary blank lines
- Adjust formatting for consistency across various files
Implement ConnectorsService with methods for creating, reconfiguring,
deleting, starting, stopping, and renaming connectors. This service
provides a structured way to manage connector lifecycle and settings.

Includes messages for handling connector operations and responses.
- Rename ProjectionsClientModel and PersistentSubscriptionsModel to ErrorResults for clarity.
- Introduce new ConnectorType and NodeAffinity enums for better type management.
- Update LegacyExceptions to improve error handling consistency across the Connectors module.
- Refactor RegistryClient and OperationsClient to streamline service client initialization.
- Renamed model files for consistency and clarity.
- Updated exception handling to use KurrentException instead of KurrentClientException.
- Added new error details for connectors and persistent subscriptions.
- Consolidate persistent subscription related files by renaming for clarity
- Update namespaces to reflect new organizational structure
- Introduce new enums for projection modes and subsystem states
- Adjust service names in proto files for consistency
- Fixed v1 protocol service names
- Refactored interceptors
- Deleted zombie code
… clarity

- Rename PersistentSubscriptionInfo to PersistentSubscriptionDetails
- Update method signatures and internal references accordingly
- Remove unused legacy code and imports
- Improve error handling and exception mapping for subscriptions
…spaces

- Renamed exception classes for clarity and consistency.
- Updated namespaces to reflect new organizational structure.
- Adjusted method signatures to use new action enum for Nack operations.
- Modified properties in PersistentSubscriptionDetails for improved readability.
…factored multiple projections methods

- Updated method name from Shutdown to ShutdownServer for clarity.
- Renamed ShutdownError to ShutdownServerError to reflect the new method name.
- Adjusted related error handling in AdminClient and ErrorResults.
- Introduced default options for DeleteProjectionOptions and ListProjectionsOptions.
- Added ProjectionStatistics and ProjectionStatus records for better state management.
- Refactored ProjectionDetails to streamline properties and improve clarity.
- Created ProjectionsMapper for mapping projection statistics and details.
- Updated error handling in ProjectionsClient for better clarity on projection states.
- Removed unnecessary comments from CoreErrorDetails messages.
- Added FailedPrecondition error type to ErrorDetails.
- Updated DeleteProjectionOptions to default DeleteEmittedStreams to true.
- Refactored ProjectionsMapper methods for clarity and consistency.
- Improved error handling in ProjectionsClient methods.
- Added extension methods for ProjectionsClient to simplify usage.
…ly for resilient backdoor calls

Add new projection-related types and options to enhance
projection management capabilities:
- Introduced `ProjectionDefinition` for defining projections.
- Added `ProjectionType` enum to categorize projections.
- Enhanced `ProjectionDetails` to include definition and type.
- Updated various client methods to accommodate new projection options.
- Rename `SubClientBase` to `ModuleClientBase` in relevant classes.
- Refactor `ProjectionsClient` to streamline backdoor client usage.
- Introduce `EnsureSuccessStatusHandler` for improved HTTP response handling.
- Add `KurrentBackdoorClientFactory` for better management of HTTP clients.
- Enhance `ConnectionOptionsBuilder` and `KurrentClientSecurityOptions` for clarity and functionality.
- Clean up unused code and comments across multiple files.
…ted references

- Updated class names and references across multiple files for consistency.
- Removed unused imports and cleaned up code structure.
- Enhanced resilience handling in client configurations.
Add StreamState enum to represent the state of streams (Active, Deleted, Tombstoned, Missing) and implement classes for handling stream append requests and responses.

Refactor existing message handling to utilize new structures for better clarity and maintainability.
…r handling

- Deleted obsolete `SerializationExceptions` and `SystemRoles` files.
- Simplified legacy exception mapping by removing `TryMapToErrorResult`.
- Updated `StreamsClient` methods to handle legacy errors consistently.
- Replaced custom `MaximumAppendSizeExceededException` with `KurrentException`.
- Enhanced `ErrorDetails` records with utility methods for consistency.
@linear
Copy link

linear bot commented Aug 26, 2025

@linear
Copy link

linear bot commented Aug 26, 2025

* Tracing multi stream append

* use correct method for certificate-only loading (#367)
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.

4 participants