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.
本文探讨了Servlet 3.0引入的异步支持如何在Spring框架中通过DeferredResult实现长时间运行任务的处理,从而提高应用在高负载下的可扩展性和效率,特别是在I/O密集型操作上。
278

被折叠的 条评论
为什么被折叠?



