Home / Figures / Chapter 20

Figure 20.2: Two shapes for serving a long-running task

Two shapes for serving a long-running task.
Figure 20.2 Two shapes for serving a long-running task. Synchronously, the client holds one open connection and waits—until the request times out. Asynchronously, the server accepts the task and returns a task id immediately (in accent), moving the work to a background worker; the client then polls that id, the source of truth, or receives a webhook, and collects the result when it is ready.