TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Why did we choose Rust to develop TiKV?

159 pointsby cyber1over 7 years ago

13 comments

eikenberryover 7 years ago
TLDR; the author likes rust and wanted to use it. The article reads like some dev's rationalizing what they want to do to the management. These types of things are fine, but as a dev to a dev it is obvious that they just want to use this cool tech. Good for them.
评论 #15345886 未加载
评论 #15348816 未加载
评论 #15349240 未加载
评论 #15345828 未加载
pornelover 7 years ago
I can&#x27;t wait until Rust is no longer be perceived as hipster trendy choice.<p>It&#x27;s a very solid language in the no-GC niche and shouldn&#x27;t need a blog post from every project that uses it.<p>Does it have to be 30 years old before it&#x27;s not &quot;new&quot; and weird?
评论 #15347371 未加载
评论 #15348105 未加载
评论 #15347913 未加载
评论 #15346047 未加载
评论 #15346058 未加载
cyber1over 7 years ago
I think TiKV is a good example where team chose Rust over Modern C++. Rust gives the same performance and is close to metal like C when it is necessary. All possible memory management mistakes it catches at compile time if it&#x27;s not &quot;unsafe&quot; and this is a really great!<p>With Rust I can hack without fear! I shouldn&#x27;t remember tons of C++ rules which are described in <a href="http:&#x2F;&#x2F;isocpp.github.io&#x2F;CppCoreGuidelines&#x2F;CppCoreGuidelines" rel="nofollow">http:&#x2F;&#x2F;isocpp.github.io&#x2F;CppCoreGuidelines&#x2F;CppCoreGuidelines</a>, &quot;C++ programming language&quot; book, also here <a href="https:&#x2F;&#x2F;herbsutter.com&#x2F;gotw&#x2F;" rel="nofollow">https:&#x2F;&#x2F;herbsutter.com&#x2F;gotw&#x2F;</a>, etc and I can focus on algorithms and implementation.<p>C++ combines a lot of different paradigms m.b. more correct I would like to say &quot;C++ paradigms hell&quot;! Which of C++ subsets is the right way, no one understands. Even Bjarne Stroustrup said, &quot;Within C++, there is a much smaller and cleaner language struggling to get out.&quot; - and where is this &quot;smaller and cleaner language&quot;?. What is the idiomatic style in C++? Is it Google guidelines, CoreCpp guidelines or other enormous guides?<p>I look inside a lot of C++ projects and each of them has different styles, use different paradigms, sometimes look like different languages!<p>Rust, Go, C, Java code bases look the same, they have their own idiomatic style, their own way.<p>I think Rust is the next step in the evolution of system programming language.
评论 #15346151 未加载
jcelerierover 7 years ago
&gt; After years of usage of GC, it is very hard to go back time for manually managing the memory.<p>... are you guys sure of your &quot;experienced C++ developers&quot; ? There&#x27;s as much memory management in modern C++ than in GC&#x27;ed language: none. Create your objects with `make_unique` or `make_shared` according to what makes sense (or just enforce `make_shared` if you&#x27;re really dubious of the coding abilities of your team but at this point you&#x27;ll have problems whatever you do).
评论 #15345847 未加载
评论 #15345802 未加载
评论 #15346921 未加载
评论 #15346098 未加载
评论 #15345929 未加载
评论 #15345821 未加载
评论 #15346606 未加载
评论 #15345801 未加载
评论 #15345917 未加载
sriram_malharover 7 years ago
Considering that their team likes Go, it seems strange to me that they would consider Rust over Go for the storage layer. A storage layer should be IO-bound, and should hardly trouble the CPU; the choice of language really should not be a determining factor. The big wins in that space are architectural, not language specific.
评论 #15347869 未加载
评论 #15348678 未加载
评论 #15347715 未加载
Shorelover 7 years ago
And lack of experience with D.<p>Just kidding, great job!
bpicoloover 7 years ago
Anybody have experience with TiDB? How does it stack up against CockroachDB? Seems hard to find comparison. Probably hear less about it mostly because it&#x27;s developed in China? Looks like it&#x27;s an impressive piece of tech, though.
评论 #15349395 未加载
评论 #15347398 未加载
baldfatover 7 years ago
&gt; its innovation in the type system and syntax gives it a unique edge in developing Domain-Specific Libraries (DSL).<p>I think Racket still has the edge for producing DSL?
noncomlover 7 years ago
The one reason I would give is Algebraic Data Types.
baqover 7 years ago
it&#x27;d be enough for me to say &#x27;rust is kinda like c++ in terms of performance and complexity but without the 0 pointer&#x27;
评论 #15345915 未加载
评论 #15346246 未加载
ameliusover 7 years ago
If you had lots of circularly referencing data structures, would it make more sense to choose a garbage-collected language like Go?
评论 #15346032 未加载
StreamBrightover 7 years ago
It is kind of funny how software engineers can engage in lengthy discussion about tooling. Imagine the same for architects. Instead of looking at the building they would talk about the type of hammer they used while building it.
评论 #15347138 未加载
评论 #15348609 未加载
评论 #15347921 未加载
评论 #15347622 未加载
klakierover 7 years ago
When I see posts like &quot;Why did we choose something over something other&quot;, I&#x27;m like &quot;Nobody cares&quot;
评论 #15346116 未加载
评论 #15346456 未加载
评论 #15346273 未加载