logoalt Hacker News

mankydtoday at 2:34 AM1 replyview on HN

Use a stack? LIFO.

As long as you have capacity to keep it mostly empty, it's fine. When requests backup, at least some people will still get quick responses, instead of making everyone suffer.


Replies

thaumasiotestoday at 3:04 AM

For a queue, a backup means that every request (from "now" on, until the end of time) is delayed.

For a stack, a backup means that some requests are informally forgotten, and although they still appear to be open, they will not complete until the end of time.

That's worse. It's a better match to the behavior you want, except for the part where the old requests still appear to be open. You need to actually close them.

You might also want to consider how requesting behavior will change when requests are stacked instead of queued. As soon as people have learned that you keep requests in a stack, the correct way to make a request is to make it, wait for a very small amount of time, and then, if your request hasn't already succeeded, repeat it.

Guess what will happen then?

show 1 reply