O'Reilly logo

RESTful Java Patterns and Best Practices by Bhakti Mehta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Asynchronous and long-running jobs in REST

A common pattern in developing RESTful API is to deal with asynchronous and long-running jobs. API developers need to create resources that might take a considerable amount of time. They cannot have the clients wait on the API to finish.

Consider placing an order for a coffee at a coffee shop. The order details are stored in a queue and when the barista is free, he processes your order. Till then you get a receipt acknowledging your order but the actual coffee arrives later.

Asynchronous resource processing works on the same principles. Asynchronous resources mean the resources cannot be created immediately. Maybe it will be placed inside a task/message queue that will handle the actual creation of the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required