Async request processing in Spring MVC - Part 1
Nowadays plenty of Java web applications are built upon the Spring Web Model-View-Controller (MVC) framework. Using it in a synchronous manner is usually quite straightforward: a controller method is invoked with some parameters from the HTTP request, it does its processing and once it's done the response body is returned and Spring MVC takes care of sending the data to the client.
Now this story is slightly different when returning certain data types like DeferredResult or Flux from your controller. Instead of immediately returning the response body of a request, your request handler can do this at a later point in time. In this blog post we'll investigate how this works internally to have a deeper understanding of the framework we use on a daily basis and figure out the advantages.