-
Notifications
You must be signed in to change notification settings - Fork 56
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
Clarify the need for Spring WebFlux #122
Comments
I agree with @snicoll here - |
So what are you saying, that we should not use |
Using or not Spring Boot is adapting to that and auto-configures things given the presence of In my previous comment, I mentioned cf-java-client, which is using |
@snicoll HOP is a client for RabbitMQ Management HTTP API, usually used for monitoring reasons. It's not meant to be used for messaging protocols that RabbitMQ supports (AMQP, STOMP, etc). So the rationale here is just to use @bclozel This is far from obvious when looking at the Spring reference documentation: https://docs.spring.io/spring/docs/5.0.5.RELEASE/spring-framework-reference/web-reactive.html#webflux-client Quoting the documentation:
So the If I get the dependency explanation correctly, you should maybe add a callout in the documentation, saying Beside that, I don't see how to help you here. Where do you pull Hop from? Spring AMQP I guess? We can plan to use Reactor Netty to refactor the |
I had a discussion about this with @artembilan the other day (I can't find the dialog), but we concluded that we should probably make the Unless, boot can exclude the transitive dep (since it won't - currently - affect |
@garyrussell Thanks for the clarification. Any idea when you'll use the reactive client (so we can start the refactoring to Reactor Netty)? |
@acogoluegnes We haven't decided yet (discussion here spring-projects/spring-amqp#736 - which is what I couldn't find earlier). It will likely be in our 2.1 release (later in the summer). |
@acogoluegnes I agree we should add something in the documentation and make that more clear. |
OK, I suggest the following steps:
WDYT @michaelklishin @garyrussell? |
We are a tiny team and it's very unfortunate that we have to throw away the existing client and redo all that work. @acogoluegnes that schedule SGTM. |
Pay attention, please, that you also have a |
This commit covers the typical use cases (basic authentication, serialization, deserialization, GET/PUT/DELETE methods). Some refactoring will be needed to re-use and clean up code (e.g. URI creation, authentication). TLS support will also be needed. [#157001487] References #122
I would rather say the expectation is that where If HOP is currently using the From the comments under spring-projects/spring-boot#12853 I see that there is a way to indicate a non-web environment. Forgive me if this is a naive question but I'm wondering if there is room for improvement in how a decision is made whether to start a WebFlux server or not? Is there some way to know if spring-boot-starter-webflux is declared or not? |
A Spring Boot starter is nothing but a convenient list of dependencies. In this case, Enforcing different behaviors between using starters and raw dependencies would be inconsistent with the whole Spring Boot ecosystem. Only a few options available here:
Judging from the commits beings prepared as we speak, HOP has alreday chosen to move to reactor-netty, so let's continue this discussion in SPR-16760. |
Thanks @rstoyanchev for clarification. @bclozel We may keep the |
I vote for complete removal of the WebFlux client. Having 3 clients in one library is too much. If we have no choice but to replace WebFlux with something that will be the "async default", we might as well make that thing the only option available. |
@michaelklishin I agree, maintaining 3 clients is a substantive effort. My concern now is to provide an appropriate solution to people using HOP in a Spring WebFlux server application, e.g. to share resources between different |
@bclozel do you have a Spring doc link where it "acknowledges in its documentation that WebClient is not meant to be distributed as an independent HTTP client library"? From where I sit WebFlux is promoted heavily as a new Spring ecosystem feature. That's why we have adopted it. |
@acogoluegnes unfortunately we are in a "damned if we do [integrate with WebFlux], damned if we don't" kind of situation here. This library was first and foremost developed as a standalone one, not a Spring project dependency. It should therefore be as minimalistic as possible. All the nice integration bells and whistles should either be on the Spring side or maintained as separate optional projects. Hop was never meant to be a multi-month active development effort for our team. One way to meet that goal is to make it as small as possible and let other projects provide various integration bits. |
This provide an abstraction and a reactive solution to create the token. Default is to compute the basic value on demand and cache it. [#157001487] References #122
URI path encoding implementation is taken from HTTP components, this avoids depending on Spring Web. The HTTP response wrapper contains the status code, reason phrase, and headers, this avoids leaking the Reactor Netty API. [#157001487] References #122
Namely channels, virtual hosts, users, permissions. [#157001487] References #122
Exchanges, bindings, shovel, queues. [#157001487] References #122
Exchanges & bindings. [#157001487] References #122
This commit covers the typical use cases (basic authentication, serialization, deserialization, GET/PUT/DELETE methods). Some refactoring will be needed to re-use and clean up code (e.g. URI creation, authentication). TLS support will also be needed. [#157001487] References #122
This provide an abstraction and a reactive solution to create the token. Default is to compute the basic value on demand and cache it. [#157001487] References #122
URI path encoding implementation is taken from HTTP components, this avoids depending on Spring Web. The HTTP response wrapper contains the status code, reason phrase, and headers, this avoids leaking the Reactor Netty API. [#157001487] References #122
Namely channels, virtual hosts, users, permissions. [#157001487] References #122
Exchanges, bindings, shovel, queues. [#157001487] References #122
Exchanges & bindings. [#157001487] References #122
I am a bit confused why this project relies on Spring and, in particular, Spring WebFlux. This doesn't sound right for something that can be used as a client to rabbit.
Due to the current dependency structure, simply adding this jar will signal to Spring Boot that it has to start a web server. One might argue that the sole presence of
spring-webflux
is too weak but that ship has sailed unfortunately.What is the rationale for using Spring WebFlux?
The text was updated successfully, but these errors were encountered: