Earlier quoted context omitted.
A queue is the correct pattern for a queue. A tree, of any form, offers no advantage. The InfluxDB experience is definitely illuminating. Their problems with LMDB were mainly due to misuse of the API. https://disqus.com/home/discussion/influxdb/benchmarking_lev... For batched sequential writes, there is no other DB anywhere near as fast as LMDB http://symas.com/mdb/microbench/ (Section E, Batched Writes) But even so…
> In that case all you've got is an in-memory queue that evaporates on a system crash. https://www.cs.berkeley.edu/~brewer/cs262/Aries.pdf > Remember that merge operations are O(N). Then remember that there are N of them to do. O(N^2) is a horrible algorithmic complexity. No. Mountains of actual math refute this. LSM-tree merges are O(N log N). This is an Actual Fact. Read more, kids.
O(N log N) is still untenable in the long run, nobody has exponentially growing compute resources.