Gitbook: https://tigercosmos.github.io/lets-build-dbms/

Before today’s article, let’s recall what I wrote in these days.

First, you should know DBMS is based on servers. A well designed DBMS such as MySQL or PostgreSQL, would implement very underlying layers by themselves for high quality and well performance. As I said before, I will focus on database and SQL, so I just use Tokio.rs for handling server tasks, including task scheduler, thread, I/O, etc. Of course, it would be great if I have time implement these modules in my own way in the future.

Then, I talked about client/server protocol yesterday, and I will implement the remaining part today.

A message would probably includes header, metadata, and payload. A header is about information of connection. A metadata is the description of payload. A payload is the part of transmitted data that is the actual intended message.

A message will be encoded according to the protocol. The protocol is the format of message. I will just implement message transmission in raw bytes first, and leave the part of the protocol, because the definition of protocol is much more complicated.

about the implementation, please see day 6 article.