Book Image

Building a RESTful Web Service with Spring

By : Ludovic Dewailly
Book Image

Building a RESTful Web Service with Spring

By: Ludovic Dewailly

Overview of this book

Table of Contents (17 chapters)
Building a RESTful Web Service with Spring
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Asynchronous communication


Another method to help with scalability is using an asynchronous form of communication between the components of a system. Asynchronous communication is a form of communication where a measurable amount of time passes between a request being issued and the availability of the response. For instance, a photographer's portfolio system typically requires generating thumbnails of photos, as well as watermarking originals. These processes can be time consuming, and therefore a synchronous style of communication isn't suitable. The image-processing component of this system would benefit from providing a callback mechanism that notifies you of the tasks' completion.

In addition, by adding this level of abstraction between components, we enable service designers to deal with scalability concerns independently. In the preceding example, we might require computation-optimized servers to handle image-processing tasks, while other components might only require general-purpose...