rediz icon indicating copy to clipboard operation
rediz copied to clipboard

A toy redis client implementation in Scala

trafficstars

rediz - a toy redis client


image

This is a redis client in Scala, implementing the redis protocol using FS2 sockets, scodec, ZIO (using zio-cats interop).

This is a tiny toy example and not ready for any production use! Improvements always welcomed!

Inspired by the excellent work by Rob Norris on Skunk - a Postgres data access library.

What's inside?

To have a better understanding at how this client works, I recommend watching Rob Norris' excellent talk Pure Functional Database Programming‚ without JDBC. It wonderfully explains how scodec is used together with FS2 sockets to parse raw TCP bytes in pure Scala.

This library builds on this effort, providing an implementation of the redis protocol, wrapped in a console app for sending and receiving redis commands.

Running

To run this, clone the project and run the Main app.