-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DEVEX-222] Add built-in auto-serialization #333
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ate method This should enable easier customisation like changing serializer settings.
They currently use dummy serialisation
Currently it's implemented in a dummy way
…erialization It's not fully ready, as it has hardcoded schema serializer. Main question will be how much from schema registry I need to move here.
…rom ResolvedEvent Per @RagingKore suggestion it'll be better not to keep the reference to serializer in ResolvedEvent to keep the clear intention behind it. Now, the serializer is resolved from schema registry based on the auto-serialization settings. Made possible to register more than one serializer per content type. Currently it doesn't support more schema definition types. To be discussed how to include them later on.
That will make resolution easier and give users ability to inject their own serializers implementation
…rialization Context Previously we had DeserializationContext, but after consideration, it'll be better to merge those concepts to make easier customizations per operations (e.g. append, subscribe, etc.).
Refactored the code accordingly. It takes the full object instead of the limited number of parameters, as you may be using metadata to get parameters about clrtype.
…solution of CLR types
…rmation like category name
…pper to make clearer responsibilities Actually, it's just wrapping message serializer based on the client settings.
Removed also obsolete SerializationSettings
… IMessageSerializer There's no need to force all code to know about wrapper existence, it's okay to just create it during the setup.
…ied syntax Now they don't require all the fancy, but redundant in most cases Stream Positions, Directions, EventData etc.
…ad of parameters Thanks to that safe defaults are already provided
…the other way round
Old append and read methods won't be doing default serialization by default. The new one will use auto-seriailization and allow to customize or disable it.
…age type name Now the FullTypeName is placed in the event type name. Not perfect but here it is.
Thanks to that they will be resolved automatically by the registered convention. Then user doesn't need to provide the string name by hand. Added MessageTypeNamingResolution context besides the MessageSerializationContext as it's orthogonal and just overlapping context.
This is a similar API as we already have in Java client, to simplify the handlers registration.
… to subscirbe to all changes
I think that in the longer term, this will make intention clearer
…ustomize serialization for Persistent Subscriptions
…adata By default it'll try to resolve the TraceMetadata, it can be override with the general type or using custom resolution strategy.
…taken but Array.Reverse 🤷
…l and automatic deserialization
This reverts commit 04e0685. I'm reverting it as old methods are wrappers for new ones, so the test scenarios are covered by the old test suite.
…n AppendToStreamOptions
Fixed also XML docs comments
…ision as a parameter
Used also two external assemlies - one that's loaded, - one that's never loaded. To double-check behaviour of loading types from different assemblies.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.