Never got to use it. But I'm curious. It's a web framework for services right? What's it like programming a service? Do you use a lot of async code like Futures chained together? Or RxJava everywhere, at least before Java 21?
It's actually an application framework that is very good for building web application but its not restricted to the "web". That being said, probably 90%+ of the time it is used for that purpose.
What's it like programming a service? Do you use a lot of async code like Futures chained together? Or RxJava everywhere, at least before Java 21?
Spring predates the reactive style trend. The architecture is mostly done thread-per-request, so Service Oriented Architecture (SOA) or Model-View-Controller (MVC) are maybe somewhat describing keywords. Though there is Spring Reactor if you want to go reactive.
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?
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.
Spring is an amazing framework that allows you to simply do anything you need by preventing you from seeing or learning all the complicated stuff that you need to know in order to do it the Spring way.
3
u/DelayLucky Mar 24 '24
Never got to use it. But I'm curious. It's a web framework for services right? What's it like programming a service? Do you use a lot of async code like Futures chained together? Or RxJava everywhere, at least before Java 21?