Skip to content

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

Closed
1 task done
MikeDombo opened this issue May 10, 2021 · 12 comments
Closed
1 task done

Remove Jackson-databind requirement, make databinding pluggable #2466

MikeDombo opened this issue May 10, 2021 · 12 comments
Labels
feature-request A feature should be added or improved.

Comments

@MikeDombo
Copy link

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

, as long as the API was changed so that JsonNode type isn't needed. The parent class TreeNode 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

  • I may be able to implement this feature request

Your Environment

  • AWS Java SDK version used:
  • JDK version used:
  • Operating System and version:
@MikeDombo MikeDombo added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels May 10, 2021
@MikeDombo
Copy link
Author

#66 (comment)
Looks like this was talked about 4 years ago. Looking through the code usages of databind seems like hardly anything actually uses it. So it should be fairly trivial to drop it completely.

@debora-ito debora-ito removed the needs-triage This issue or PR still needs to be triaged. label May 26, 2021
@debora-ito
Copy link
Member

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.

@MikeDombo
Copy link
Author

Thank you, that's really great to hear. Is there any timeline for that change?

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@MikeDombo MikeDombo reopened this May 26, 2021
@debora-ito
Copy link
Member

No timeline for it yet.

@millems
Copy link
Contributor

millems commented Jun 10, 2021

#2522

@millems
Copy link
Contributor

millems commented Jul 19, 2021

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?

@MikeDombo
Copy link
Author

#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?

@millems
Copy link
Contributor

millems commented Jul 19, 2021

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

@MikeDombo
Copy link
Author

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.

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@millems
Copy link
Contributor

millems commented Jul 19, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants