Asynchronous Actions
Suppose that we are at a food court and place an order to eat something at a kiosk, we are given a token and a bill. Later, when the order is ready, the kiosk flashes the token number, and upon noticing it, we collect the order.
This is similar to a request with an asynchronous response cycle, where the kiosk acts like the server, the order acts similar to a request, and the token as a promise, which gets resolved when the order is ready.
Most operations are better handled asynchronously. This is also mostly preferred since it does not block server resources until the operation is completed.
Play Action is a helper object, which extends the ActionBuilder trait. The apply method of the ActionBuilder trait implements the Action ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access