50 points · by _448 · 4y ago · 58 comments
Clickhouse - https://github.com/ClickHouse/ClickHouse
https://dbdb.io/browse?programming=c&programming=cplusplus&s...
(note that this doesn't filter on license -- I couldn't see a way to add a negative-filter on proprietary licensing -- so you may have to inspect a few of the results to confirm)
Not affiliated, just saw the Jepsen report posted here a few weeks ago.
Wish people would just move on if they see a question that they don't know the answer to.
I work there (300+ ppl). It's primarily open source. It makes money through support contracts and cloud hosting, but all core development is done in the open.
I have a lot of experience with Cassandra though.
While distributed could mean a lot of different things, I'm guessing the OP wants either horizontal scalability, or bidirectional replication between multiple regions/datacenters. And while it's technically possible to do those with mysql or PostgreSQL, they definitely don't work out of the box, and require a lot of careful architecting, and it isn't really how they were originally designed to be used.
(Which is better for a server, Java does not crash and it can do atomic shared parallelism between cores with OO code something you would need to use arrays to achieve in C/C++ without VM + GC.)
Here is the 2000 lines of code of the entire database: http://root.rupy.se/code?path=/Root.java&space
Darkmode: http://edit.rupy.se/?path=/Root.java&space
And here you can try it out: http://root.rupy.se
There is no universe where any of this is true. It doesn't even make sense in any coherent way.
"While I'm on the topic of concurrency I should mention my far too brief chat with Doug Lea. He commented that multi-threaded Java these days far outperforms C, due to the memory management and a garbage collector. If I recall correctly he said "only 12 times faster than C means you haven't started optimizing"." - Martin Fowler https://martinfowler.com/bliki/OOPSLA2005.html
"Many lock-free structures offer atomic-free read paths, notably concurrent containers in garbage collected languages, such as ConcurrentHashMap in Java. Languages without garbage collection have fewer straightforward options, mostly because safe memory reclamation is a hard problem..." - Travis Downs https://travisdowns.github.io/blog/2020/07/06/concurrency-co...
"Inspired by the apparent success of Java's new memory model, many of the same people set out to define a similar memory model for C++, eventually adopted in C++11." - https://research.swtch.com/plmm
You said C++ can't do atomics which is like starring at paint and saying it can't paint in the color that it is. What is it that you think the atomic C++ functions do?
This is all before even talking about whatever you were saying about "needing arrays in C++" or needing VMs, which is so bizarre I barely even know where to start.
Why do you say things like this if you can't actually explain them?