- It was just uncommenting some code that was already there.
- Opened a TCP connection server that listens to a PING message
- Learned about Redis serialization protocol RESP
- Implemented a TCP connection that waits for two requests and responds with the message "PONG"
- Handled 2 concurrent requests and responded with resp(+PONG/r/n)
- Implemented with the help of go-routines 🙃
- Handled concurrent requests and responded with custom message
- Implemented GET / SET in RDB
- Implemented GET / SET with px timeout command
🚀 Done with all the basic implementation of RDB
- Run the redis server on custom port specified using the --port flag
- Added support for INFO REPLICATION COMMAND
- Added support to return the Master Node ID and Offset
- Pinged the Master node :)
- I'm yet to Refactor the code
- Received and pinged master twice again :)
- Relayed the PSYNC to master node
🚀 SEND Handshake done
- Relayed back message acting as a master node. (for REPLCONF)
- Relayed back message for PSYNC. Relayed FULLSYNC which tells the worker node that master is unable to perform incremental synchronization so it will perform full synchronization with the worker.
🚀 Receive Handshake done
- Responded with a RDB state file for full synchronization to take place on the worker node
- After sending the RDB to the worker node, we need replicate the commands that the master receives.
- Single node replication implemented
- Implemented multi-node replication
- Forgot to close the connection object in the previous stage, fixed it here.
Go is actually so cool, became a bigger fan of go routines
- Pushed the commands from the master node to the worker nodes
- Took me 4 days
- Replied for REPLCONF GETACK command from the worker node to the master node
- Code Refactoring
- Use RW.mutex on global slice storing the worker node's connection object