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

Replace okhttp with azure core http #763

Open
tanvigour opened this issue Jul 18, 2022 · 8 comments
Open

Replace okhttp with azure core http #763

tanvigour opened this issue Jul 18, 2022 · 8 comments
Assignees

Comments

@tanvigour
Copy link
Contributor

Replace this to fix the dependency issue with okhttp3 #687

@tanvigour
Copy link
Contributor Author

/assign

@mukundansundar
Copy link
Contributor

@tanvigour why are we replacing one dependency with another?

@yaron2
Copy link
Member

yaron2 commented Jul 20, 2022

Please do not use an Azure specific HTTP library. Instead, pick a known Java standard.

@artursouza
Copy link
Member

The Azure dependency is the same as the OKHTTP but in a different namespace to avoid conflict. There is a well known issue of conflicting OKHTTP version with the app when importing the Dapr Java SDK. It is a major pain point to get started. People have to pick one version to resolve conflict and hope they are compatible. This will stop this conflict.

We also had plans to remove OKHTTP completely and use Java's native HTTP client but that requires Java 11 as minimum support. Right now, we need to keep Java 8 support because of Spring Cloud requirements.

/cc @skyao

@artursouza artursouza added this to the v1.7 milestone Jul 20, 2022
@tanvigour
Copy link
Contributor Author

tanvigour commented Jul 20, 2022

@tanvigour why are we replacing one dependency with another?

To fix the version compatibility issue while using okhttp as mentioned in this : #687

@mukundansundar
Copy link
Contributor

@artursouza What is the Spring Cloud dependency that you mention?
cc @skyao

@skyao
Copy link
Member

skyao commented Sep 21, 2022

@artursouza What is the Spring Cloud dependency that you mention? cc @skyao

To integrate dapr with spring cloud, since current main version of spring is supporting jdk 1.8 like:

  • spring cloud v3.x
  • spring boot v2.x
  • spring framework v5.x

And for next main version of spring/springboot is required jdk17.

I think most spring users will stay in current spring for a long time because jdk17 and wait for spring new version to be stable.

So, upgrading jdk version of dapr java sdk to jdk11 will bring a risk that if the users are using jdk1.8, then we will loss these users ---- I don't think the user will update to jdk11 just because of dapr.

The best strategy of dapr java sdk is that we can support all of them and let the developer choose one of them:

  • for jdk1.8, use okhttp3
  • for jdk11, use httpclient in jdk
  • customized by the developers if they use other http client in their applications and don't want to introduce a new one.

@johnewart
Copy link
Contributor

@artursouza and I were talking about this earlier and I opened a PR to deprecate the HTTP-transport bits; we could get rid of some code it seems that it could make transitioning easier.

Additionally, we could consider splitting off the HTTP client into its own package/artifact that could be used to keep HTTP support until a project has made the transition away from HTTP (it would also be easier to guarantee you have transitioned your project because removing the -http artifact as a dependency would have no effect)

@artursouza artursouza modified the milestones: v1.7, v1.8 Sep 30, 2022
@artursouza artursouza removed this from the v1.8 milestone Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants