Live data from Hacker News

The “Build Your Own Redis” Book Is Completed

build-your-own.org

11–20 of 131 posts

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

#13
post #8

A good read for sure, thank you. '4. Protocol Parsing', hand-writing protocol parsers in C looks particularly thrilling.

The redis wire protocol is simple enough where it's not very difficult. It's instructive to write it in C because there's a lot of translatable knowledge to other languages: read in a buffer, cast that buffer to the protocol-specific struct, read the various fields from memory, etc. Basic operations for a systems-level project like this.

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

#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/client system.”

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

#15

I am very happy to see more content like this (attempting to teach how to create a real system) becoming available. Few month ago there was a launch announcement of YC backed startup that sell you walk-through labs guiding you to build Redis, Docker, Git and others. (Can't find link to it now.) What is still missing, in my opinion, and is badly needed, is content or even an idea on how to teach taking such projects f…

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.

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

#16
post #11
post #8

A good read for sure, thank you. '4. Protocol Parsing', hand-writing protocol parsers in C looks particularly thrilling.

What could go wrong? It's not like there are decades of paying the price of such decisions...

At a cursory glance, they assert((size_t)rv <= n), but if that's the assert.h assert(), it's just void when NDEBUG is defined, and cmake seems to define that when building a Release target. Also, gcc does not seem to define it by default. So that's a bit of an overflow there.

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

#17
post #8

A good read for sure, thank you. '4. Protocol Parsing', hand-writing protocol parsers in C looks particularly thrilling.

The redis wire protocol is simple enough where it's not very difficult. It's instructive to write it in C because there's a lot of translatable knowledge to other languages: read in a buffer, cast that buffer to the protocol-specific struct, read the various fields from memory, etc. Basic operations for a systems-level project like this.

It's simple enough, and yet:

https://nvd.nist.gov/vuln/detail/CVE-2021-32675 https://nvd.nist.gov/vuln/detail/CVE-2021-41099 https://nvd.nist.gov/vuln/detail/CVE-2021-32761

I agree it's instructive, but on the other hand, the time might be right to start teaching why not to do this stuff. Modeling a protocol parser in a high-level language that can spit up correct and highly-optimized C code would be just as instructive and perhaps even more fun.

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

#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.

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

#19
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 am absolutely with you. There’s a certain large company I work for who has public documentation full of stuff like this. It makes me insane when I find it so glaring. There’s an internal program to proofread and review, but quantity is incentivized, not quality. I’ve tried to shove that program in a better direction to no avail.

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

#20
post #15

I am very happy to see more content like this (attempting to teach how to create a real system) becoming available. Few month ago there was a launch announcement of YC backed startup that sell you walk-through labs guiding you to build Redis, Docker, Git and others. (Can't find link to it now.) What is still missing, in my opinion, and is badly needed, is content or even an idea on how to teach taking such projects f…

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.

Curious if anyone else has checked out their content yet? If so, hows the quality?
Post reply on HN