2019 iT 邦幫忙鐵人賽

Software Development

Let's build a DBMS: StellarSQL -- a minimal SQL DBMS written in Rust系列 第 5

StellarSQL 4: Client/Server Communication Implementation

4: Client/Server Communication Implementation(1)


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

Quick Link
1.StellarSQL Repository
2.Gitbook of this series

Liu, An-Chi (劉安齊). A software engineer, who loves writing code and promoting CS to people. Welcome to follow me at Facebook Page. More information on Personal Site and Github.

StellarSQL 3: Frontend/Backend Protocol
StellarSQL 5: Introduce to RDBMS and SQL
Let's build a DBMS: StellarSQL -- a minimal SQL DBMS written in Rust30