It's nothing sexy, but it sounds interesting enough, so I thought why not. I was missing a project to write Zig, and as much as I like reading the language spec I love writing code. I'm glad I read the spec though, learned a few things about the language that would have taken me months of programming to learn about.
Building a Db
I've built databases before, written a network protocol to communicate to the database too. But I never finished it. Also, it was just writing to a file with a simple data structure. I've always wanted to learn a new data structure, but I find it quite dull to learn it for the sake of it. I'm much more motivated when I can put it to use somewhere. So for the db project, I'm gonna be using B+ tree
. Funny thing is I don't even know what it is. But I've read about it somewhere sometime in an article about databases.
I'm also thinking of building a protocol to communicate to the db.
Hacker new delivers as always
I'm not very good at breaking down a complex problem to the point where I can build it's individual parts incrementally, yet! So I do depend on books that break it down for you, makes it easier for me to stay motivated too. Something to look forward too.
So as always, I found an article on building a database from scratch. At first I was skeptical because a lot of the times, it's too simplistic to get excited about. But this one is quite good, and looks somewhat similar to SQL
based databases.
Building a network protocol
I've built rudimentary network protocols before on top of TCP
, but I'm thinking maybe build one on top of UDP
, I know it's not an ideal network for a database as you do can't afford packet loss. It's all for fun anyways, I want to see what the challenges are.
I've just setup the project file today, finally realized how to remove the root.zig
file without causing havoc on the build system. Also realized why it was put there in the first place. But I sort of learned how to add external dependencies in Zig while adding Raylib in the browser project.