Skip to content

Make it more obvious that the user intends to build a full reactive app #22692

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

Open
snicoll opened this issue Jul 31, 2020 · 1 comment
Open
Labels
status: pending-design-work Needs design work before any code can be developed type: enhancement A general enhancement
Milestone

Comments

@snicoll
Copy link
Member

snicoll commented Jul 31, 2020

A recent PR made me wonder if, rather than allowing users to switch off the creation of Spring Data repositories, we should allow them to switch off the whole infrastructure, (including repositories).

I don't remember why we've introduced a boolean flag to disable repositories specifically but it moved to a type enum where users can define if they want to work with imperative or reactive. It turns out that more and more drivers are offering both mode so auto actually means both.

This also means that if you don't do anything, you get both a template and a reactive template. This can be what you want if you want to use the imperative style on startup but it would be nice if we offered a way to easily back-off.

Concretely we'd have a spring.data.<xxx>.type and selecting imperative means that the whole reactive infra would not be configured.

@snicoll snicoll added for: team-attention An issue we'd like other members of the team to review status: waiting-for-triage An issue we've not yet triaged labels Jul 31, 2020
@philwebb philwebb added type: enhancement A general enhancement and removed for: team-attention An issue we'd like other members of the team to review status: waiting-for-triage An issue we've not yet triaged labels Aug 3, 2020
@philwebb philwebb added this to the 2.4.x milestone Aug 3, 2020
@snicoll snicoll added the for: team-attention An issue we'd like other members of the team to review label Aug 25, 2020
@snicoll
Copy link
Member Author

snicoll commented Aug 25, 2020

Reviewing this a bit more, such a flag could help but that may be only one part of the story. The problem has become much more apparent now that Neo4j has imperative and reactive support in the same driver and support for transaction management.

Using Flux as a classpath check to determine if we need to configure the reactive variant of a Spring Data store (or anything that's reactive in general) is too limited, especially considering the WebClient use case where one might want to use it while being on a fully imperative app.

Users developing a reactive app are also keen to use the imperative variant on startup (to initialize or query the store in @PostConstruct or ApplicationRunner). They won't use declarative transaction management there probably.

@snicoll snicoll added for: team-meeting An issue we'd like to discuss as a team to make progress and removed for: team-attention An issue we'd like other members of the team to review labels Aug 25, 2020
@snicoll snicoll modified the milestones: 2.4.x, 2.x Aug 25, 2020
@snicoll snicoll changed the title Generalize spring.data.<xxx>.repositories.type to the Spring Data infrastructure Make it more obvious that the user intends to build a full reactive app Aug 25, 2020
@wilkinsona wilkinsona added status: pending-design-work Needs design work before any code can be developed and removed for: team-meeting An issue we'd like to discuss as a team to make progress labels Nov 20, 2020
@philwebb philwebb modified the milestones: 2.x, 3.x Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: pending-design-work Needs design work before any code can be developed type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants