Skip to content
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

Use jackson-jr where possible #761

Closed
driverpt opened this issue Feb 18, 2022 · 8 comments
Closed

Use jackson-jr where possible #761

driverpt opened this issue Feb 18, 2022 · 8 comments

Comments

@driverpt
Copy link

Is your feature request related to a problem? Please describe.
Coldstarts in Lambda

Describe the solution you'd like
Use of jackson-jr for faster startup time

Describe alternatives you've considered
N/A

Additional context
It's recommended by AWS the usage of jackson-jr where possible in the Documentation

@pankajagrawal16
Copy link
Contributor

Thanks for opening this issue @driverpt. It will definitely be great to use jackson-jr instead. As of now, there will be other libraries which which end up importing jackson anyways, but if powertools itself can stop using it, is something definitely worth evaluating.

@driverpt
Copy link
Author

Can't we just include a shaded copy of Jackson JR instead of having External Dependency? Similar to what was already done in AWS SDK for Java V2 ?

@Neuw84
Copy link

Neuw84 commented May 25, 2022

Hi,
I would like to contribute to the project. Quite good experience with Java and Lambda specifically from my previous role.
Could I work on this?

@jeromevdl
Copy link
Contributor

@Neuw84 Did you have a look at this? I'm interested to know what could be done here. As we already have moving stuff on metrics (#944) and logging (#965), that will cause breaking changes and imply a v2, maybe it's an opportunity to also look at the serialization fwk... But as mentioned by @pankajagrawal16, other libraries are importing jackson, so we would end up with more libraries in the end...

@msailes
Copy link
Contributor

msailes commented Nov 16, 2022

Which other libraries are we thinking off?

The managed runtimes uses Jackson, but they change the package name of it, so I don't think we should consider that.

@jeromevdl
Copy link
Contributor

I thought the log4j json layout library was using jackson, but no. It's worth having a deeper analysis, but maybe I'm wrong... (would be great).

@jeromevdl
Copy link
Contributor

After analysis, several libraries are using jackson-databind:

  • aws-java-sdk-core and jmespath-java, both used in x-ray (tracing module)
  • aws-embedded-metrics (metrics module)

We could get rid of it and use something else in powertools but it would lead to an additional library then, and bigger jars, bigger cold starts...

@jeromevdl
Copy link
Contributor

wont fix as other libraries are using heavier versions of jackson (see above), and we cannot embark a new library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

6 participants