Live data from Hacker News

The “Build Your Own Redis” Book Is Completed

build-your-own.org

41–50 of 131 posts

Re: The “Build Your Own Redis” Book Is Completed

#41
post #18
post #14

While I applaud the initiative and effort, I want to urge the author to consult a good proofreader. I’m only in chapter 2 yet I’ve already encountered enough friction in the form of poor English to put me off. I think the substance looks great, so it’s a bit wasteful to not walk the last mile and make it genuinely enjoyable to read by eliminating blatant errors like this one: “The Redis is an example of the server/cl…

I would ask chatgpt to refactor his text rather than waiting him to do so... I think poor english as an excuse will be a thing of past.

Instead of saying “the singer sounds so autotuned” we’ll soon be whining

“the text reads too autogpt”

(I propose a pronunciation of “auto-jipped”).

Re: The “Build Your Own Redis” Book Is Completed

#42
post #18
post #14

While I applaud the initiative and effort, I want to urge the author to consult a good proofreader. I’m only in chapter 2 yet I’ve already encountered enough friction in the form of poor English to put me off. I think the substance looks great, so it’s a bit wasteful to not walk the last mile and make it genuinely enjoyable to read by eliminating blatant errors like this one: “The Redis is an example of the server/cl…

I would ask chatgpt to refactor his text rather than waiting him to do so... I think poor english as an excuse will be a thing of past.

I would rather poor English than confidently completely factually incorrect.

Re: The “Build Your Own Redis” Book Is Completed

#43
post #2

> Here are some examples that meet my criteria of the “building block”: NGINX, SQLite, PostgreSQL, Kafka, Linux kernel, etc. Kafka?

kafka is a good fit when you design modern system. As your system grows larger, necessity of message queue becomes obvious. And kafka is probably the most widely used general-purpose high performance distributed q

Re: The “Build Your Own Redis” Book Is Completed

#44
post #26

I actually build minimal Redis clones in every new language or runtime, or when I want to explore threading models. It all started with https://github.com/rcarmo/miniredis (which I forked to add and experiment with pub/sub), and I just found myself doing it again and again because Redis is the quintessential network service: By implementing it, you learn about socket handling, event loop for a specific runtime, threa…

I once built one in Swift 4, in part to see how multithreading via SwiftNIO and using copy-on-write datastructures would compare. It held up well against the C implementation, would be worth trying again against Swift 5.x. https://github.com/NozeIO/redi-s

Re: The “Build Your Own Redis” Book Is Completed

#45

One of my pet peeves when I was learning programming is that I couldn't find any books that would teach how to write tests in real world. There was that chicken and egg problem then, when potential employers would skip my CV because I didn't have any TDD experience and I couldn't find anywhere how to learn this. Before I even learned that something like testing exist, I was so confident like "oh I could write somethi…

I remember how tdd (together with scrum) was basically a religion in 'large corporations'. How a lot of people talked about 'the right way to do things'. Your comment made me smile nostalgically...

But back to the topic. I'm pretty sure there are enough books about how to write tests. And more or less all engineers understand the value of testability and coverage (not necessary tdd!). At leas I wouldn't need a book for this. But books about building something closer to complex real world systems - that's a good stuff engineers would enjoy.

Re: The “Build Your Own Redis” Book Is Completed

#46
post #24
post #22

Earlier quoted context omitted.

Yes, "read in a buffer, cast that buffer to the protocol-specific struct, read the various fields from memory, etc" are all operations one should generally NOT do. This was instructive maybe three decades ago, when the internet was relatively safe. Knowing how to do this RIGHT is important. The place this is still helpful is low-level programming, and embedded is a far better place to learn. If one part of your micro…

Yeah, and I said the above being myself a big fan of C. I write C in my hobby projects. Yet if I were doing anything non-trivial that talks over the network, that protocol parsing would for sure not be hand-written.

I really enjoyed writing low-level C code, maybe three decades ago. I grew out of it, eventually, but I remember the joy. Similar for assembly, actually.

(And rereading, I don't mean "growing out" in a derogatory way -- I grow into and out of a lot of things -- and low-level programming is something anyone can enjoy for a few years)

Re: The “Build Your Own Redis” Book Is Completed

#47
Redis is great, but sometimes it isn't always the best solution.

We almost configured it, but instead implemented our own Cache web service and used the built in memory/cache management of that. Yes, it's only accessible via http but it's given us a lot of flexibility. We are primarily using it for caching of large datasets (hundreds of MBs). When service has to be restarted, it makes a call to get all the items it needs.

Re: The “Build Your Own Redis” Book Is Completed

#48
post #15

Earlier quoted context omitted.

You're probably thinking of https://codecrafters.io/ . I've been meaning to check them out with my education stipend from work, just haven't had the time to devote to it.

So expensive IMO, only reason I'm avoiding it.

We now have a free tier, so you should be able to try it out :-)

Re: The “Build Your Own Redis” Book Is Completed

#49
post #18
post #14

While I applaud the initiative and effort, I want to urge the author to consult a good proofreader. I’m only in chapter 2 yet I’ve already encountered enough friction in the form of poor English to put me off. I think the substance looks great, so it’s a bit wasteful to not walk the last mile and make it genuinely enjoyable to read by eliminating blatant errors like this one: “The Redis is an example of the server/cl…

I would ask chatgpt to refactor his text rather than waiting him to do so... I think poor english as an excuse will be a thing of past.

When I see poorly written prose, it makes me distrust the technology imparted. If you can't take time to get the grammar right, why should I believe that you got the code right?

Re: The “Build Your Own Redis” Book Is Completed

#50

Sorry for being a little off topic, but the Mini Redis tutorial [1] was really fun when I did it a few years ago. It has you implement a server and client in Rust using the Tokio library. I think Redis is a great server to “build yourself” as you don’t need to start with much to get it going. [1] https://tokio.rs/tokio/tutorial/setup

If anyone is looking at this stuff and thinking it’s intimidating then think again: Redis is mostly a lot of fuss around a hash map. There are cool features sure but the idea is mainly “what if a hash map were accessible from two or more servers”. If you only have one or two servers, you only want a cache, and you don’t anticipate scaling up soon (be honest) you can just use a hash map with expiry checking and not have to learn how to deploy another piece of software.
Post reply on HN