-
Notifications
You must be signed in to change notification settings - Fork 910
Remove Jackson-databind requirement, make databinding pluggable #2466
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
Comments
#66 (comment) |
Hi @MikeDombo, I'm sorry for the delayed reply. We discussed this as a team, and in fact we have plans to remove all the jackson dependencies from the Java SDK v2. The discussion was about if we should incorporate the changes you're proposing since we are going to remove it altogether later on, and we decided not to merge the PR. We appreciate your work and thank you for submitting it. |
Thank you, that's really great to hear. Is there any timeline for that change? |
|
No timeline for it yet. |
We've removed Jackson as a user-visible SDK dependency in 2.17.0. JSON unmarshalling isn't pluggable, but I'm not sure we have a reason for SDK users to change the way JSON marshalling/unmarshalling works. Is it worth keeping this feature request around, or is the primary reason for this feature resolved? |
#2522 was closed, is there a different PR which removes Jackson? Really the request is to remove jackson-databind as a runtime dependency. Has that been accomplished? |
Jackson-databind is no longer a runtime dependency of the SDK. Jackson-core and Jackson-dataformat-cbor are still runtime dependencies, but they are shaded in the SDK, so they are not visible to the customer. https://aws.amazon.com/blogs/developer/the-aws-sdk-for-java-2-17-removes-its-external-dependency-on-jackson/ This was the PR that removed Jackson: #2598 |
OK, sounds good. Not ideal that they are shaded honestly because my project also needs core and size is a huge concern for us, so de-duplicating that would be good. Thank you for removing databind though, that will help out a ton. |
|
Yeah, shading is not optimal, but our primary reason for the change was to allow us to upgrade Jackson without breaking customers, which requires shading. Removing Jackson-databind was just something we did in the process to decrease the binary size impact of shading. |
Describe the Feature
Jackson databind is required by SDK-core package. Jackson databind adds ~10MB to the runtime memory requirement and should be replaceable by jackson-jr or other smaller databinding packages such as gson. I believe that only the JacksonUtils class would need to be changed
aws-sdk-java-v2/core/sdk-core/src/main/java/software/amazon/awssdk/core/util/json/JacksonUtils.java
Line 32 in 584ccb5
JsonNode
type isn't needed. The parent classTreeNode
should be fine as a replacement.Is your Feature Request related to a problem?
The AWS SDK adds a large amount of additional memory requirement which is a large requirement for IoT use cases.
Proposed Solution
Just like how the SDK HTTP clients are pluggable, jackson-databind should not be a hard requirement. Even better, Jackson-core shouldn't be required and instead there should be APIs for generic serialization and deserialization.
Describe alternatives you've considered
Additional Context
Your Environment
The text was updated successfully, but these errors were encountered: