Live data from Hacker News

My free book "Rust Projects – Write a Redis Clone" is out

leanpub.com

21–30 of 41 posts

Re: My free book "Rust Projects – Write a Redis Clone" is out

#21

This reminds me of Tim McNamara's course Implement RougeDB, a Redis clone from outer space ( https://learning.accelerant.dev/view/courses/implement-rouge... ). I paid somewhere around $100 for this course (through some coupon code, I remember the original prices was $200-ish). It was supposed to be completed by Aug 2023, yet almost one year and a half later, it's still incomplete. I almost gave up at this point.

Never pay for future promises. Looking at Tesla, the games industry, RougeDB.

Every single time it ends in failure and disaster.

Re: My free book "Rust Projects – Write a Redis Clone" is out

#22
post #7

Haven't read the book. I feel like this is effectively "Rust: The Hard Parts" as a topic. Mostly in that from my admittedly limited understanding of rust, lifetimes and shared memory, Redis in rust semantics is almost an anti pattern. I intend to look into this book as I find the topic interesting. But do feel that it's tackling some of the more cumbersome areas of rust. I'm also curious if there will be an effort to…

Writing a Rust clone was one of the first projects I did when trying to learn Rust ~4-5 years ago. On top of that I opted for an async version with a database-per-core design.

Throughout the whole project I never once ran into lifetimes, and I gave up once I had to think about cross thread transactions, which had nothing to do with Rust the language.

Re: My free book "Rust Projects – Write a Redis Clone" is out

#23
post #16

Earlier quoted context omitted.

Have you reached out to Tim? I know him and I believe he wouldn't do that intentionally. Maybe he is busy with something else or just lost track of the schedule.

Of course I did. I DM'ed him on Twitter with no response. Then I commented under one of his tweets and he did respond. He mentioned it would be complete by Aug 2023 (this was before Aug 2023). Some time this year I commented under one of his linkedin posts asking for update - no response. There are multiple comments from other users on that web page I linked above - most of them had no replies. Of course he's been bu…

Did you ask for a refund? If you were refused, you can proceed with a chargeback procedure with your bank.

Re: My free book "Rust Projects – Write a Redis Clone" is out

#24

So, just out of interest how close does this get to the performance of redis? It’s interesting to see a highly optimised production product compared to a presumably more trivial implementation I can read in a book. Still this might be a great way to learn rust!

Thanks! So, I didn't consider performances at all, as it's not the goal of the project, but it would be interesting to have a look. Good idea!

Re: My free book "Rust Projects – Write a Redis Clone" is out

#25
post #7

Haven't read the book. I feel like this is effectively "Rust: The Hard Parts" as a topic. Mostly in that from my admittedly limited understanding of rust, lifetimes and shared memory, Redis in rust semantics is almost an anti pattern. I intend to look into this book as I find the topic interesting. But do feel that it's tackling some of the more cumbersome areas of rust. I'm also curious if there will be an effort to…

Writing a Rust clone was one of the first projects I did when trying to learn Rust ~4-5 years ago. On top of that I opted for an async version with a database-per-core design. Throughout the whole project I never once ran into lifetimes, and I gave up once I had to think about cross thread transactions, which had nothing to do with Rust the language.

Well, I don't exactly know your scope but I was doing stuff the other day with sqlite and using it on a single thread while having a multi-thread webserver. My solution was to have a wrapper that's "multithreaded" and it'd just accept a `FnMut(transaction) -> Result + Send + Sync + static` and queue them internally so they ran one at a time. Since all the lambdas are "hardcoded" (like the rest of my source code) the static requirement isn't a big deal.

My main problem with it is that I ended up de/serializing T across the FnMut boundary. But given that the FnMut knows what T is it seems like there should be some way to use unsafe and pointers to remove the serialization if it's ever a performance problem.

Re: My free book "Rust Projects – Write a Redis Clone" is out

#26

This reminds me of Tim McNamara's course Implement RougeDB, a Redis clone from outer space ( https://learning.accelerant.dev/view/courses/implement-rouge... ). I paid somewhere around $100 for this course (through some coupon code, I remember the original prices was $200-ish). It was supposed to be completed by Aug 2023, yet almost one year and a half later, it's still incomplete. I almost gave up at this point.

Wow, and their current "pre-sales" price is $280. No wonder they don't have any dates on that page, or link to the Github repo that hasn't been updated in over a year.

https://github.com/accelerant-dev/implement-rougedb

Re: My free book "Rust Projects – Write a Redis Clone" is out

#28
post #19

Anybody knows if there is a golang version of a write a redis clone ?

You can solve the CodeCrafters challenges in many languages, and Go is one of them, yes. Not sure if there are books or blog posts about it though. Through the CodeCrafters portal you can access the code of other people and the related repositories, however, so that can help.

Re: My free book "Rust Projects – Write a Redis Clone" is out

#29

So, just out of interest how close does this get to the performance of redis? It’s interesting to see a highly optimised production product compared to a presumably more trivial implementation I can read in a book. Still this might be a great way to learn rust!

Thanks! So, I didn't consider performances at all, as it's not the goal of the project, but it would be interesting to have a look. Good idea!

Yes it's definitely not about winning, if you can get say 75% of Redis performance with simpler and memory safe code I'd say that is a big win and great advertising for the book! And maybe some examples of how performance can be improved/optimisations made also improves the book!

Re: My free book "Rust Projects – Write a Redis Clone" is out

#30

This reminds me of Tim McNamara's course Implement RougeDB, a Redis clone from outer space ( https://learning.accelerant.dev/view/courses/implement-rouge... ). I paid somewhere around $100 for this course (through some coupon code, I remember the original prices was $200-ish). It was supposed to be completed by Aug 2023, yet almost one year and a half later, it's still incomplete. I almost gave up at this point.

Never pay for future promises. Looking at Tesla, the games industry, RougeDB. Every single time it ends in failure and disaster.

Learned that lesson in 2018 when I gave 500 EUR to Tesla (Spain) as a deposit for a Powerwall. Never heard another word from them. Been sending an email ~once a year to try to claim it back but not once I have got an reply. Never again.

Next step is to go to small claims court, but who has the time/energy to deal with bureaucracy... Future project :)

Post reply on HN