Skip to content
This repository was archived by the owner on Jul 27, 2020. It is now read-only.

mini-redis outline proposal #17

@jxs

Description

@jxs

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 side

Server

  • Start with TcpListener, explaining accept and spawning a new task for each connection.
  • Implement Connection struct, describe the read_frame process and Frame conversion, introduce Bytes crate
  • Implement Command struct and from_frame method explaining the Frame to Command parsing
  • Add GET variant to Command and implement apply method introducing the internal Db and explaining the decisions behind it's implementation: why it's an Arc<Mutex>, the State and Entry struct's
  • implement GET's write_frame and describe the process of writing a Command back to a Frame and writing it on the socket
  • Add SET variant to Command enum, the flow is similar to GET, but has the key expiration logic. Guide through it's implementation with tokio's Duration and Notify
  • Add PUB variant to Command and implement the Db pubsub behavior bringing up tokio's Broadcast struct
  • Add SUB variant to Command, and implement the graceful shutdown notification logic of Server
  • Implement the client connection limit handling on the Server.
  • Introduce tokio-tracing and instrument the code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions