Asynchronous Servlet and Web

左心房为你撑大大i 提交于 2019-12-25 00:46:17

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.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!