Context: each company receives many many reviews. In a similar scenario, we can say that too many user comments flood in during the soccer world cup.
Aha — the updates don’t need to show up on browser in strict order
Aha — commenting user only need to see her own comment on top, and need not see other users’ latest comments. The comments below her own could be browser-cached content. Ajax…
Interviewer: OK you said horizontal sharding by company id can address highly concurrent data store updates. Now what if one company, say, Amazon, by itself gets 20% of the updates so sharding can’t help this one company.
me: I guess the update requests would block and possibly time out. We can use a task queue.
This is similar to WordPress import/export requests.
- Each task takes a few seconds, so we don’t want user to wait.
- If high server load, the wait could be longer.
- More important — this task need not be immediate. It can be scheduled.
- We should probably optimize for server efficiency rather than latency or throughput
So similarly, all the review submissions on Amazon can be queued and scheduled.
In FIX protocol, an order sender can receive 150=A meaning PendingNew. I call it “queued for exchange”. The OMS Server sends the acknowledgement in two steps.
- Optional. Execution Report message on order placement in OMS Server’s Order Book. ExecType (150) = A (Pending New)
- Execution Report message on receiving acknowledgement from exchange. ExecType (150) = 0 (New). I guess this indicates placement in exchange order book