Redis is written in C, but its test cases are

Arpit Bhayani

Arpit Bhayani

Jun 26, 2024 • 1 min read


Redis is written in C, but its test cases are written in TCL 🤯

While going through Redis internals, I looked at test cases to understand the flow, I was surprised to see that the test cases were not written in C, but in TCL, making the entire suite highly readable and extremely simple.

Digging deeper I found out that TCL is pretty popular as a language to test network applications, even SQLite uses it in its test suite. Pretty interesting usecase for a language created way back in 1988 :)

I am porting Redis’s test suite for DiceDB, seemed overwhelming but getting a hang of it now :)

If you are interested in learning more about Redis Internals, I have a hands-on course where we reimplement the core features, like event loop, serialization protocol, persistence, pipelining, eviction, and transactions, in Golang.

details - arpitbhayani.me/redis

Arpit Bhayani

Principal Engineer II at Razorpay - building Agent Studio, Ex-staff engg at GCP Memorystore & Dataproc, Creator of DiceDB, ex-Amazon Fast Data, ex-Director of Engg. SRE and Data Engineering at Unacademy. I spark engineering curiosity through my no-fluff engineering videos on YouTube and my courses