Skip to content

Commit

Permalink
update bradis post
Browse files Browse the repository at this point in the history
  • Loading branch information
braddunbar committed Feb 14, 2025
1 parent fdad433 commit 9acc7ca
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 20 deletions.
40 changes: 25 additions & 15 deletions _posts/2023-12-17-bradis.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,28 @@ Yes. I know. There is already a Redis. It works much better than the one I
could write. It's more stable and has more support. So this won't be something
to *use* per se, but rather a tool to focus my efforts. That's ok!

So my Redis probably wouldn't be complete, but I was determined to make a
serious attempt at it. I wanted to write something with production in mind,
So my Redis probably wouldn't be good or complete, but I was determined to make
a serious attempt at it. I wanted to write something with production in mind,
even if it never lives in production.

Anyways. I started to write Redis with Rust, and several years later I have
something that is decidedly not a Redis. It's a small piece of a Redis, which
is not particularly valuable given the existence of a full, free Redis.
is not particularly valuable given the existence of a full,
free<sup>[*](#free-ish)</sup> Redis.

However!
*However!*

It also happens to contain all the things I've learned in the meantime. It
contains my reintroduction to the stack and the heap after many years of
dynamic languages. It has my struggles with the borrow checker and my favorite
ways to work with it rather than against it. It's an outline of how Redis
works. It's an illustration of how to do zero-copy networking. It's my
conception of atomic operations and concurrency. It's all the fun I had putting
it together.
dynamic languages. It represents my struggles with the borrow checker and my
best attempts at writing <code>unsafe</code> code. It's everything I know about
async Rust. It's an outline of how Redis works. It's an illustration of how to
do zero-copy networking. It's my conception of atomic operations and
concurrency. More importanly, it's all the fun I had putting it together!

And that's pretty valuable, at least to me. And hopefully someone else.
And that's pretty valuable - at least to me. And maybe someone else.

I've gone a long way on my own, but I think I need more now. I'd like to share
I've gone a long way on my own but I think I want more now. I'd like to share
it with someone. Get some feedback. Ask for help. Compare it to other people's
understanding. Multiply the fun. Divide the despair.

Expand All @@ -50,9 +51,18 @@ href="https://hachyderm.io/@braddunbar" target="_blank">let me know</a>!
I've been calling it Bradis, because it sounds like Redis. And I like the way
it declares my existence. Brad is. (I am.)

### What is it?
### What is it then?

Ok. If it's not an entire Redis, what is it? Here are some things I did.
Ok. If it's not an entire Redis, what is it? Here are some things:

You can start a server that listens on port 3333 and accepts connections
over TCP.
* A server that listens on a port and accepts connections over TCP.
* 126 Redis commands (at the time of writing). Most of them are in pretty good
shape!
* Pubsub. You can sub and you can pub.
* An [implementation](http://github.com/braddunbar/respite) of the RESP protocol.

<hr>

<a id="free-ish">*</a> [License changes][license] notwithstanding.

[license]: https://redis.io/blog/redis-adopts-dual-source-available-licensing/
17 changes: 12 additions & 5 deletions css/screen.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ dl,
dt,
dd,
ol,
ul,
li,
em,
h1,
h2,
Expand All @@ -29,8 +27,6 @@ h6,
tt,
nav,
var,
sub,
sup,
big,
div,
pre,
Expand Down Expand Up @@ -114,7 +110,6 @@ body
}

ol,
ul
{
list-style: none;
}
Expand Down Expand Up @@ -248,6 +243,14 @@ p
font-size: 1.25em;
}

ul {
font-size: 1.25em;
}

ul > li {
margin-bottom: 0.5em;
}

p code
{
padding: 0 .25em 0 .25em;
Expand Down Expand Up @@ -558,3 +561,7 @@ button
{
cursor: pointer;
}

sup a {
text-decoration: none;
}

0 comments on commit 9acc7ca

Please sign in to comment.