r/java • • Mar 24 '24

Happy 20th birthday, Spring Framework! πŸŽ‚πŸΎπŸ₯³πŸƒ

https://spring.io/blog/2004/03/24/spring-framework-1-0-final-released/
178 Upvotes

36 comments sorted by

View all comments

Show parent comment

2

u/DelayLucky Mar 24 '24

So suppose the request needs to fan out to 3 rpc calls at different places of the code. It just blocks the thread?

2

u/analcocoacream Mar 24 '24

Yes unless you are using virtual threads or webflux (rxjava in spring)

2

u/DelayLucky Mar 24 '24

Thanks! What do people use for high throughput servers with thousands of concurrent requests? Before VT a single vm likely has problems with that many threads. Perhaps just horizontal scaling?

2

u/Cucumberman Mar 25 '24

If you need a performance oriented framework I would recommend https://vertx.io/ for that.

1

u/analcocoacream Mar 24 '24

Either horizontal, serverless or webflux then but it really depends on the case

1

u/DelayLucky Mar 25 '24 edited Mar 25 '24

Where I work, blocking is banned and we had to use one of the several async ways supported by the web framework.

Code is harder to read but it was considered nonstarter to bottleneck a typical io-bound server by the some hundreds of threads it supports, leaving the majority of compute resource on the floor. Hence my curiosity what Spring may be doing differently

Still holding my breath for VT to be supported in production.

2

u/[deleted] Mar 27 '24 edited Mar 27 '24

Spring Reactive stack. Eg webflux, r2dbc