You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently in controllers we return CompletableFutures, but code is not executed concurrently (Tomcat's connection accepting threads are blocked by our code [authentication and services]). I don't think running services code (JWT generation etc.) is expensive-enough to have it concurrent though.
Feature
Decide whether to remove CompletableFuture (simplifies code), or try to do things concurrently (which is nontrivial as in Spring WebMVC it is impossible to perform authentication in another thread and something like Spring WebFlux would be needed).
I personally would prefer to not go with concurrency approach for this project and just remove CompletableFutures.
The text was updated successfully, but these errors were encountered:
I don't think running services code (JWT generation etc.) is expensive-enough to have it concurrent though.
I agree with that. However, Wrapping with with a (Completable)Future gives you the ability to base your code on services with scala futures more easily, for-comprehend there/map etc - so I actually found it easier to integrate should that need arise.
If we are reasonably sure that we will mostly not need Futures in other layers, we can remove the futures in the controllers, too.
Background
Currently in controllers we return
CompletableFuture
s, but code is not executed concurrently (Tomcat's connection accepting threads are blocked by our code [authentication and services]). I don't think running services code (JWT generation etc.) is expensive-enough to have it concurrent though.Feature
Decide whether to remove
CompletableFuture
(simplifies code), or try to do things concurrently (which is nontrivial as in Spring WebMVC it is impossible to perform authentication in another thread and something like Spring WebFlux would be needed).I personally would prefer to not go with concurrency approach for this project and just remove CompletableFutures.
The text was updated successfully, but these errors were encountered: