spot — owns state, processes in order

Requests and a timer converge on one queue; the Spot processes them in order

spot — owns state, processes in order Requests and a timer converge on one queue; the Spot processes them in order request · room-42 · Architecture component request room-42 request · room-42 · Architecture component request room-42 timer · Architecture component timer Spot queue · Architecture component Spot queue room-42 Spot · owns state directly · Architecture component room-42 Spot owns state directly

One line, one at a time

  • • Several requests for the same room-42 and a timer converge on one Spot queue, and the room-42 Spot processes them in order (serially).
  • • It owns state directly as one object alive in memory, so two requests never touch the same state at once — no lock is needed.