-
Notifications
You must be signed in to change notification settings - Fork 0
mini-redis outline proposal #17
Comments
Thanks for getting this started. I have taken time to think about this proposal and it definitely was helpful to get the ball going. My initial thought was to structure guides like you outlined. However, after sitting on it some, I think it would be better to structure it around tokio concept to teach. So, we would figure out the order in which we want to introduce Tokio concepts and pick the component from mini-redis that covers that concept. I started a little bit with this in the guides: Outline
Topics that should be in tutorial
|
Summary from discussion on discord, using #12 as base for ideas to maybe add. We should have a section about "When should you use async/await? (and when should you not?)" as one of the first things people read. That said, it should probably go in the Tokio overview document instead of the tutorial. Interfacing sync w/ async should probably go somewhere near the end. This fits quite nicely with building a client, as we can reproduce a The The We sprinkle "futures as objects" all over the tutorial. They should see this example. I'm not quite sure how much detail we should go in, but I want a paragraph like this somewhere:
And this could be related to |
Client
Along with the hello-world guide there should be a guide with the
pubsub
example, to give the user an idea on how the interaction with the server works on the client sideServer
TcpListener
, explainingaccept
andspawning
a new task for each connection.Connection
struct, describe theread_frame
process andFrame
conversion, introduceBytes
crateCommand
struct andfrom_frame
method explaining theFrame
toCommand
parsingGET
variant toCommand
and implementapply
method introducing the internalDb
and explaining the decisions behind it's implementation: why it's anArc<Mutex>
, theState
andEntry
struct'sGET
'swrite_frame
and describe the process of writing aCommand
back to aFrame
and writing it on the socketSET
variant toCommand
enum, the flow is similar toGET
, but has the key expiration logic. Guide through it's implementation with tokio'sDuration
andNotify
PUB
variant toCommand
and implement theDb
pubsub behavior bringing up tokio'sBroadcast
structSUB
variant toCommand
, and implement the graceful shutdown notification logic ofServer
Server
.tokio-tracing
and instrument the codeThe text was updated successfully, but these errors were encountered: