fivenines

Practice / target 80%

Command Table And Dispatch Practice

01

A command table entry has a handler but no flags. Which later systems lose information: AOF, replication, cluster routing, transactions, or ACLs?

intro

Scenario

A new command was registered in the command table with a working handler function but an empty flags field.

02

Predict how dispatch handles `GET a b`, `NOPE a`, and `SET a 1` while the client is inside `MULTI`.

intro

Scenario

A client in the middle of building a MULTI transaction sends three different commands to the dispatcher.

03

Why should arity be validated before a command reaches its handler?

applied

Scenario

You are deciding which checks belong in the dispatcher and which belong inside each command's handler.

04

A command touches keys at positions 1, 3, and 5. Why might cluster mode need that metadata before execution?

applied

Scenario

A command's table entry declares that its keys sit at argument positions 1, 3, and 5.

05

Distinguish command errors that should become RESP error replies from protocol errors that may close the connection.

advanced

Scenario

Your dispatcher must decide between answering with an error and dropping the connection for different kinds of bad input.

Ready to build

Design the system.

Put the learned theory into real-life practice and get architectural feedback.