In the previous recipe, we were making a single service invocation per request, from the message service to the social service. This has the benefit of being incredibly simple to implement and, when using single-threaded languages, such as Python, Ruby, or JavaScript, is often the only choice. Performing a network call synchronously in this manner is acceptable when you're only doing it once per request–it doesn't matter that the call blocks the thread since you can't respond to the user until the invocation is complete anyway. When you're making multiple requests, however, blocking network calls will severely impact the performance and scalability of your application. What we need is an easy way to make use of Java's concurrency features.
If you're writing your microservices in Scala, you can take advantage of the Future...