Build Your Own Redis with C/C++ | Build Your Own Redis with C/C++

Build Your Own Redis with C/C++ | Learn network programming and data structures

build-your-own.org

Got a TCP server up and running! 🚀

Dodged a bullet by not having to use Java sockets - Ktor already wraps java.nio in a coroutines-friendly API   

https://ktor.io/docs/server-sockets.html

TIL: The TCP protocol handles a continuous stream of bytes, with no internal boundaries. It's up the application layer to split up those bytes and make sense of them.

Tangentially, it was incredibly easy to set up the project by using @cachix's devenv.

Haven't got the Kotlin toolchain installed on my machine, but with one line of config, I had the JVM, the Kotlin compiler & Gradle fired up and ready to go.

languages.kotlin.enable = true;

The Redis protocol uses CRLF (\r\n) as a terminator.

Using netcat, I can easily send LF (\n) by pressing enter, but how do I send CRLF? Its manual page mentions no such thing 

@abdelrahman ctrl+m?
@funes Didn't work for me unfortunately  But thanks for the assist!