Asynchronous Servlet and Web

https://www.baeldung.com/spring-deferred-result

https://docs.spring.io/spring/docs/current/spring-framework-reference/web.html#mvc-ann-async

https://spring.io/blog/2012/05/07/spring-mvc-3-2-preview-introducing-servlet-3-async-support

https://www.reactiveprogramming.be/spring-webflux-servlet-api/

https://www.javaworld.com/article/2077995/java-concurrency-asynchronous-processing-support-in-servlet-3-0.html

Asynchronous support was introduced in Servlet 3.0 and, simply put, it allows processing an HTTP request in another thread than the request receiver thread.

DeferredResult, available from Spring 3.2 onwards, assists in offloading a long-running computation from an http-worker thread to a separate thread.
Although the other thread will take some resources for computation, the worker threads are not blocked in the meantime and can handle incoming client requests.
The async request processing model is very useful as it helps scale an application well during high loads, especially for IO intensive operations.

发布了83 篇原创文章 · 获赞 0 · 访问量 838

猜你喜欢

转载自blog.csdn.net/michaelforgood/article/details/103681157
今日推荐