As we saw in the previous chapter, when working on any large-scale enterprise application, we deal with a lot of data. This data is processed in a synchronous manner and the results are sent only after the data processing for a particular process is complete. This kind of model is absolutely fine when the data being processed in individual requests is not large. But consider a situation where a lot of data needs to be processed before a response is generated. What happens then? The answer is, slow application response times.
We need a better solution. A solution that will allow us to process data in parallel, resulting in faster application responses. But how do we achieve this? The answer to the question is concurrency.
This chapter will introduce techniques of employing concurrency in your applications and how it can be leveraged to reduce the response...