Hi! I am pleased to introduce a small key-counter db that solves the problem of storing counters. In simple terms, Karma is a partitioned hash tables for fast counter lookup wrapped in TCP Server.
In one of my projects there was a need to count the number of artifacts created by users (pages, articles, comments and similar things). Since the task is quite simple and Redis is absent in the project infrastructure, I decided to implement this functionality myself and named it Karma.
The project is in alpha version (although already in production) and can do the following things:
- Quickly create a tree (analog of a table) and increment/decrement values, summarize, get a slice of values between dates and reset values.
- Save its state to the file system and automatically load it into memory on reboot.
- Save/load tree dumps by signal or by command from the client.
I will be glad if Karma will help someone else to solve the problem.
Link: GitHub - creadone/karma: Key-counter database
P.S. Thanks to Marcelo Boeira for the inspiring article: Why you should build your own NoSQL database | by Marcelo Boeira | Medium