TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Why are all new Open Source DB's being written in Golang?

4 点作者 distsysdude将近 5 年前
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.

2 条评论

challenge441将近 5 年前
Rust is definitive the best systems programming <i></i>language<i></i> out there.<p>But other things than the language iteself matter even more. Matureness, ecosystem and efficiency in writing correct code.<p>I was a big Rust fan, but must admit I&#x27;m now tired of the overpromotion and hype. Ok, deep inside I&#x27;m waiting and wanting Rust to be ready for prime time. I mean real prime time, not Hackernews or Reddit anecdotes(&quot;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&#x27;t manage a JVM on our server&quot;).<p>The problem of Rust is that it keeps inventing instead of stabilizing. Incredible smart people write great libs ... version 0.12 ...<p>This is really frustrating.<p>Rust is from and for language enthusiats. If this doesn&#x27;t change, Rust will always be the most wanted, most loved but least used language, as in the Stackoverflow survey.<p>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.<p>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.<p>Coming from Java, Kotlin, C#, Python I first thouhgt Go was a bad joke (language feature wise). How wrong I was. Generics don&#x27;t matter. Algebraic types don&#x27;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.<p>Let&#x27;s be honest with ourselves, when fixing an urgend bug in some code we&#x27;ve written 4 month ago: Do we want to read a simple loop or a reduce function?<p>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.
评论 #23935572 未加载
wmf将近 5 年前
The databases you mention started development years ago when Rust wasn&#x27;t as mature as it is now. We&#x27;re starting to see Rust databases and I think we&#x27;ll see more in the future: <a href="https:&#x2F;&#x2F;materialize.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;materialize.io&#x2F;</a>
评论 #23935509 未加载