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

Support for Spring WebFlux [DATAREST-933] #1299

Closed
spring-projects-issues opened this issue Nov 3, 2016 · 6 comments
Closed

Support for Spring WebFlux [DATAREST-933] #1299

spring-projects-issues opened this issue Nov 3, 2016 · 6 comments
Assignees
Labels
has: votes-jira in: repository status: declined type: enhancement

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Nov 3, 2016

Abhijit Sarkar opened DATAREST-933 and commented

Support Spring Data REST in Boot using Spring Web Reactive.

Original ticket:
https://jira.spring.io/browse/SPR-14878?focusedCommentId=133196&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-133196


Affects: 2.4.6 (Gosling SR6)

14 votes, 23 watchers

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Jan 8, 2018

Oliver Drotbohm commented

There are no immediate plans to build a Spring Data REST based on Spring WebFlux. Here are a couple of reasons for that:

  • The support would imply a complete rewrite which would bind a significant amount of time we have as a team. We're making very heavy use of Jackson customizations and it's not clear whether all of them can be used in a non-blocking way in the first place.
  • Spring Data REST is used by slightly less than ten percent of all Spring Data users.
  • A crucial aspect of Spring Data REST is that it's supposed to work on all repository modules. However, only the MongoDB, Couchbase, Redis and Cassandra modules currently support true reactive data access. I.e. for everyone using Spring Data JPA (a huge majority of Spring Data users) the effect would be close to zero as JPA is a blocking API.
  • The kinds of APIs (true hypermedia-based REST APIs build on a domain model backed by a datastore) build on top of Spring Data REST are usually not the first candidates to benefit from reactive programming in the first place as the latter is optimizing for resource usage in pass-through scenarios (gateway style applications etc.)

With all these constraints given, it's currently very unlikely that a WebFlux based Spring Data REST would actually have the effect that people assume it would have. That, combined with the rather huge amount of work such an implementation would imply, we decided to currently not pursue this road.

Still, we're of course open to reconsider should these constraints change fundamentally

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Jan 8, 2018

Phil Webb commented

One quick thing it might be worth doing is throwing a different exception if Flux types are found. Something with a message explaining that support isn't currently available

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Apr 9, 2019

Martin Morcate commented

One year later, still no appetite to go after this?

@alsaghir
Copy link

@alsaghir alsaghir commented Mar 18, 2021

Is there any update on this ?. I'm facing the decision to move to the reactive stack but spring data rest really does great work of productivity so I'd like not to start using webflux while it's still not supported.

@mp911de
Copy link
Member

@mp911de mp911de commented Mar 18, 2021

The points of #1299 (comment) are still valid. The entire team would be basically busy with rewriting Spring Data REST for one to two years. So from that point of view, we do not plan to go after this change.

@mp911de mp911de closed this as completed Mar 18, 2021
@mp911de mp911de added the status: declined label Mar 18, 2021
@odrotbohm
Copy link
Member

@odrotbohm odrotbohm commented Mar 18, 2021

What Mark said. I'd still be interested to hear what the use case of Spring Data REST is in a reactive scenario. The functionality Spring Data REST provides doesn't necessarily play into the strengths of a reactive programming model (streaming, large data sets, backpressure) etc. It's much more focussing on stateful resources and making it easy to implement state transitions on them.

Would love to learn about your particular motivation. 🙃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has: votes-jira in: repository status: declined type: enhancement
Projects
None yet
Development

No branches or pull requests

4 participants