Managing Long Running Tasks easy
What is 'Polling'?
- A Voting for a candidate.
- B The server pushes data to the client.
- C Connecting via Bluetooth.
- D The client repeatedly asks the server 'Is the task done?' at regular intervals (e.g., every 5 seconds).
Answer: D. The client repeatedly asks the server 'Is the task done?' at regular intervals (e.g., every 5 seconds).
The simplest way to implement async progress. Inefficient if the task takes hours, but fine for seconds.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- What is the primary purpose of a Dead Letter Queue (DLQ)?
- The architectural pattern where one service creates tasks and another processes them is called:
- In a Priority Queue system (High vs Low), what is 'Starvation' and how do you fix it?
- How do you atomically update your local database AND publish a message to a queue without losing sync if the process crashes in between?
- What does 'Fire and Forget' mean?
- Why might you 'Throttle' (limit the speed of) your background workers?