Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Continuing the sentence from the title, "but they allow you to deal with it better".

The question is what is the business requirement and guarantee regarding the message delivery. In my experience with logging systems is that losing a very small percentage of your data in case there is an outage in the storage layer is tolerable.

That allows us writing code that sends or receives messages using a channel (Go, Clojure) and have sane timeouts to gracefully deal with overload, saving 200 (or so) messages in a local buffer and going back to reading the queue after a read timeout.

With this concurrency model queues are very powerful tool of separating concerns in your code. Having thread safe parts that can be executed as a thread or as a gorutine lets you use 1:1 mapping to OS threads or N:M.

Back to the original point, queues don't fix overload, but I still prefer deal with overload using queues over other solutions (locking or whatever).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: