Exactly-Once Delivery May Not Be What You Want
brooker.co.za
brooker.co.za
This is a wisdom whispered 3 decades ago. The end-to-end argument haunts us again [1]!
[1] END-TO-END ARGUMENTS IN SYSTEM DESIGN http://web.mit.edu/Saltzer/www/publications/endtoend/endtoen...
Edit: "Safety is a characteristic of systems and not of their components" -- http://www.ctlab.org/documents/How%20Complex%20Systems%20Fai...
For example, if you generate hundreds of message a second, you quickly end up having to track millions of unique ids. Then you have to manage the storage of these IDs somehow, so you end up implementing a system to wipe out any ID older than a certain time, and so now you not only have track the IDs you've seen, but when you've seen them.
That said, this is probably better than making an incredibly complex message queue system just to support exactly once delivery.
It really vexes me to see how a lot of distributed systems projects claim to support "exactly once", and it makes me happy to see a grounded, intelligent summary like this one.
These assertions that I tend to follow most of the time. I keep warning my team members to never assume that a request for payment/fulfillment/some-business-function is going to arrive exactly once. If they build systems assuming that underlying scaffolding is going to behave in certain way then they won't be designing for failure. In any distributed system it's very important to define correctness from the end user's perspective. And then design for failure ensuring that the correctness guarantees are not violated.
Of course, you can't always get what you want, and in a distributed system exactly-once delivery is not possible in general. But in the cases where it is possible, it's often worthwhile: it's just a whole lot easier to reason about than a system where messages can be arbitrarily re-delivered.
Some people might also say that creativity is a side effect of brainstorming and idea selection. But it's more complex than that - over time our brains work out heuristics and figure out patterns that work well, and use that as a language to construct other things. That's why people who have been doing something for years can do it on a much higher level.