DB2: Tokio Mini Redis — Client (Part 3)
Today we will be mostly covering mini-redis completely. The intention of this session was to understand a mini project in RUST. Let's dive in.
cli.rs
The content is pretty much self-explanatory. The cli
is a runnable, which uses the client
to interact with the server
. Each command is matched and passed on to the appropriate client functions.
Subscribe
waits for the clients to send a message in the channel.The rest of them pretty much terminates the
cli
after command execution.
Client.rs
client
uses connection
(the same one used by server
) to perform socket io
using buffering.
blocking_client.rs
buffer.rs
Usage:
Used in the client side. Similar to Connection Pool in Hibernate Driver.
Conclusion:
This session was mainly focused on the client-side of things. In the next session, we will wrap mini-redis by covering the commands. Then hopefully we will be able to cover jraft-rheakv
. That would be posted on my Database Engineering blog of mine.
Found it Interesting?
Please show your support by 👏