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.

Redis re-implemented in Rust

400 pointsby wmwraggalmost 10 years ago

15 comments

undefined0almost 10 years ago
For me, Redis was the first software written in C which I could easily customize with additional features (as I have low C knowledge). It was written beautifully. I've been learning Rust, I certainly find learning Rust easier than C and I like the fact that I can dive into software written in Rust without worrying about GC. You've done the best of both worlds for me by writing Redis in Rust. With that said, I'm still having an easier time reading Redis in C over your code as you are lacking comments and well named function/variable names. I admire your work nonetheless.
评论 #9741937 未加载
theduferalmost 10 years ago
Before anyone starts using this as a Redis replacement on Windows as the readme suggests, take a look at the TODO file. Notable missing features include:<p>- maxmemory key eviction<p>- hash values<p>- ~2&#x2F;3 of the set operators<p>- multi&#x2F;exec<p>- lua scripting<p>This is an interesting and potentially useful effort, but a replacement for Redis it is not.
评论 #9742312 未加载
评论 #9741798 未加载
评论 #9742368 未加载
kibwenalmost 10 years ago
Since this seems to be just a learning project, note as well that there exist Rust bindings to Redis itself, from Armin Ronacher (though I&#x27;m not sure if they&#x27;ve yet been updated to work on 1.0): <a href="https:&#x2F;&#x2F;github.com&#x2F;mitsuhiko&#x2F;redis-rs" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mitsuhiko&#x2F;redis-rs</a>
评论 #9742090 未加载
wyaeldalmost 10 years ago
The readme says its a learning project.<p>Its a very interesting piece of work though.<p>I&#x27;ll be interested to see Antirez&#x27;s view on the trade-offs between C and Rust for this.
评论 #9741805 未加载
unfamiliaralmost 10 years ago
Could somebody give me a tl;dr on Redis? I keep hearing about it but from the summary I can&#x27;t tell what kind of applications it is being used for.
评论 #9746251 未加载
评论 #9743684 未加载
评论 #9743653 未加载
评论 #9743650 未加载
shmerlalmost 10 years ago
I was just thinking, that Rust is a great candidate for big data processing tools. So much more than Java (which is annoyingly used a lot there). Something like Spark and HDFS should be implemented in Rust.
评论 #9742035 未加载
评论 #9743029 未加载
评论 #9741832 未加载
r0naaalmost 10 years ago
Impressive!<p>Could someone (or OP) elaborate on the value that re-implementing a whole software to a new language provide comparatively to just building an interface &quot;bridging&quot; both worlds?<p>To clarify, my metric for &quot;value&quot; is usefulness to other people. That is, without considering the (interesting) learning opportunity that it represent for the author.<p>For example, someone developed a Python interface to the Stanford Core-NLP library (written in Java). Would re-writing the Core NLP library to Python be useful to the community? How to figure what are people needs?<p>I am asking because while I think it would be ton of fun and allow me to learn a lot, I also value building useful software and re-writing a whole system sounds like an overkill except for a few very niche cases..<p>And if I am not mistaken you would need a team at least as large as the parent project to implement new features, fix bugs and keep pace with it. Looking forward to hear what HNers think!<p>edit: clarified ambiguities
评论 #9741895 未加载
评论 #9741848 未加载
评论 #9742051 未加载
评论 #9742095 未加载
评论 #9741873 未加载
评论 #9741853 未加载
resca79almost 10 years ago
I like this kind of project. But the use case of redis it&#x27;s a little bit exstream, I mean that the main feature of redis is the speed and the way how the memory consuption is handled. If this requirements are not satisfied, it is only a very good way to learn Rust( as the author goal) and the redis internal.
GeertVLalmost 10 years ago
So how do you re-implement something like Redis in another language? Is it more of a translation job or do you start with splitting the concepts and try to implement it. Or take the idea and go your own way with implementing it?
sudhirjalmost 10 years ago
I&#x27;m try the same thing for similar reasons in Go, but I&#x27;m wondering if at some point a Go version would perform better than C. On a machine with a large number of cores, perhaps?<p>GitHub.com&#x2F;sudhirj&#x2F;restis<p>Also wondering if some rethinking is possible - would a HTTP interface a la DynamoDB be more useful? Can complexity and performance be increased by using a purely memory backend with no disk persistence? If there were pluggable back ends would a Postgres or DynamoDB back end be more useful for terabytes &#x2F; petabytes of data? Is the beauty of Redis the API or the implementation?
评论 #9743856 未加载
评论 #9743098 未加载
评论 #9743996 未加载
评论 #9743365 未加载
clu3almost 10 years ago
Man you should have named it Rudis
beyondcomputealmost 10 years ago
Spectacular! Could you add synchronous replication though? And coalescing queries (so that entire system processes queries in batches, say 300 times per second)?
vicparaalmost 10 years ago
Why would someone do that? To what end? Why isn&#x27;t anyone re-writing Redis in assembler to have it kick ass like pros? Can you write Windows in rust?
评论 #9745407 未加载
评论 #9746317 未加载
评论 #9746687 未加载
vamitroualmost 10 years ago
Is it compatible with the .rdb redis dumps?
ahmetmsftalmost 10 years ago
Care to post details about this? Is this actually fast? Does it implement all features and guarantees of redis? Should anybody actually use this in production (maybe because it works on Windows)? Is it well tested?<p>Looks like a really cool effort but authors of open source projects often think people would read the code and figure out all, the truth is people usually look at what&#x27;s in the readme and that&#x27;s all the attention span most people are going to have. My 2c: improve your README.md.
评论 #9743252 未加载