
Ask HN: Why are all new Open Source DB's being written in Golang? - distsysdude
Rust seems like a better option as you can eke out more performance and ensure that there are no weird bugs influenced by Data Races &amp; Memory issues.<p>I work on the Oracle RDBMS which is written in C and these always seem to be difficult issues to solve on a Database product, not to mention the potential for data corruption.<p>Rust just seems like the best Systems programming language out there.
But most of the new Trending Open Source DB&#x27;s seem to be built using Go : Cockroach DB, InfluxDB, TiDB, etc.<p>Is this just because of the shorter development time that Go offers.?<p>I haven&#x27;t used the Go race detector, but can it really ensure that you ship code without any data races?<p>I do know that TiKV is built entirely in Rust, but there doesn&#x27;t appear to be any other popular DB&#x2F;Storage system being written in Rust though.<p>Personally, the FFI overhead of Golang and the lack of intrinsic support are a deal breaker for choosing it to write something as complicated as a DB.
======
challenge441
Rust is definitive the best systems programming __language __out there.

But other things than the language iteself matter even more. Matureness,
ecosystem and efficiency in writing correct code.

I was a big Rust fan, but must admit I'm now tired of the overpromotion and
hype. Ok, deep inside I'm waiting and wanting Rust to be ready for prime time.
I mean real prime time, not Hackernews or Reddit anecdotes("Hey, we migrated
this 1000 LOC webservice from Node to Rust and now it runs faster with less
memory ... and Java was not an option because we can't manage a JVM on our
server").

The problem of Rust is that it keeps inventing instead of stabilizing.
Incredible smart people write great libs ... version 0.12 ...

This is really frustrating.

Rust is from and for language enthusiats. If this doesn't change, Rust will
always be the most wanted, most loved but least used language, as in the
Stackoverflow survey.

I was forced to learn Go at the beginning of the year and must say: The Go
folks understood productivity needs. Go is for getting stuff done. It starts
with the standard lib. For example, you want to build a product, and in Rust
land the de facto http lib (hyper) is at version v0.13.7? In Go you just use
the standard lib. And for so many, many other things the standard lib is good
enough.

Apart from that, Go allows quite some control over memory allocation. You can
make critical paths of your app very efficient and free of garbage collection.

Coming from Java, Kotlin, C#, Python I first thouhgt Go was a bad joke
(language feature wise). How wrong I was. Generics don't matter. Algebraic
types don't matter. If you need to understand your code down to the memory
layout level and get the stuff done, Go has more than enough to offer.

Let's be honest with ourselves, when fixing an urgend bug in some code we've
written 4 month ago: Do we want to read a simple loop or a reduce function?

If I was to chose a language for a DB, my heart and enthusiasm would choose
Rust, but my head and experience would choose Go.

~~~
distsysdude
>The problem of Rust is that it keeps inventing instead of stabilizing.
Incredible smart people write great libs ... version 0.12 ...

Thanks for sharing this, Stability of Rust never crossed my mind and I think
you make a valid point.

I would love to hear what other Rust dev's think about this. The main motto
behind the nightly builds seems to be "Stability Without Stagnation".

But is stability actually taking a hit because of this model.?

------
wmf
The databases you mention started development years ago when Rust wasn't as
mature as it is now. We're starting to see Rust databases and I think we'll
see more in the future: [https://materialize.io/](https://materialize.io/)

~~~
distsysdude
Thanks for sharing this, I took a look and Materialize seems to be really
good.!

