Published first releases of the project Redka, aimed at providing a RESP protocol and API compatible with the Redis DBMS, but implemented on top of the SQLite library. Using SQLite additionally allows you to access data using the SQL language, for example, to generate reports or analyze data. The use of ACID transactions is supported. Redka can be run as a server that accepts requests over the network, or used as a Go module. The project code is written in Go and distributed by under BSD license.
Currently, Redka has added support for types for working with strings and hashes, as well as commands for manipulating string data, keys, transactions and hashes. For example, commands are available for setting and getting one or more string values associated with a key, setting the lifetime of keys, incrementing/decrementing values, searching for keys by template, renaming keys, executing a series of commands within a transaction, canceling a transaction, working with fields in hashes .
In the near future we plan to add support for lists, collections (sets) and sorted collections. In the distant future, the implementation of the algorithm is expected HyperLogLog, capabilities for manipulating geographic coordinates and commands for interaction using the publish/subscribe model. There are no plans yet to add support for scripts in the Lua language, authentication, ACL, watch/unwatch, and the ability to work in one server with several databases. Support for clusters (Redis Cluster) and monitoring (Redis Sentinel) will definitely not be implemented.
Performance testing using
tools from the Redis project, showed that Redka is 2-6 times behind Redis due to the lack of specific optimizations for storing data in key/value format. In particular, in the created test environment, Redis demonstrated performance of 133 thousand SET operations per second and 139 thousand GET operations per second, while the performance of Redka was 30 thousand SET per second and 63 thousand GET per second in a situation where the database was located in random access memory. When storing the database on disk, Redka's performance was 22 thousand SET operations per second and 56 thousand GET operations per second.
Thanks for reading: