-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[WIP] Separate serialization logic from class #13697
[WIP] Separate serialization logic from class #13697
Conversation
Signed-off-by: Vacha Shah <[email protected]>
❌ Gradle check result for a8da31f: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Extracting the serializer seems like a good idea on its own merit because then it can be tested separately, etc, however the real problem is that |
💯 what @dblock says
Just to explain why it is a key - the model (classes like |
Thank you @dblock and @reta! Just so I understand correctly, if we do something like |
I think that |
+1 to this. So thats what I have drafted in this PR, I cannot remove the The purpose of this PR was to move serde out of these classes with a |
Yes, you don't need to, I would say the class itself could be kept as-is (as you mentioned, this is public class, we are constrained here). However, the calls to |
Ah so right now the calls go from |
Totally correct, and the protobuf serde would be implemented completely inside the |
This PR is stalled because it has been open for 30 days with no activity. |
Closing this PR since won't be working on this actively. If this change needs to be picked up, please feel free to use my branch https://github.com/VachaShah/OpenSearch/tree/separate-serializer-from-class. |
Description
This is a draft of the idea to separate native serialization from classes as discussed in #13178. Currently, it is not possible to decouple
Writeable
and its implementations from the native protocol classes (without breaking changes) but we can move serialization primitives to their own serializers as a starting point. This will be the building block for adding protobuf in a way that serialization is not coupled with the classes.For protobuf (or any other future protocol), the idea is not have any serialization within the class but rather it be handled by its own serializer implementation (fe
ProtobufQuerySearchResultSerializer
) and not tie the class to serde implementations.Resolves #[Issue number to be closed when this PR is merged]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.