Giter VIP home page Giter VIP logo

kagni's Introduction

kagni

Kagni is a Redis-like data store.

Kagni - Kağnı in Turkish is a form of tumbrel, pulled by bullocks used for carrying stuff in rural areas. It is slow as hell, but gets things done. Naming is due to its ability to store and load on / off stuff and also its sturdiness.

Performance will get better hopefully :)

Details

Asyncio / Trio

Kagni has two async implementations for now, based on Asyncio + Uvloop and Trio. For now Asyncio + Uvloop implementation gives the best performance, but personally I like the Trio implementation better, for not getting in the way much.

Sqlite db backend

All data lives in memory and an internal async job will be periodically dumping the memory into SQLite database. Already a battle tested and proven data storage technology, SQLite will be more than enough to handle the storage easing the backup process as well.

Roaring bitmaps

Bitmaps in Redis start to hog memory in time as the data grows. Roaring Bitmaps is a better solution for the same requirements. The implementation is compatible with utilities / libraries such as Bitmapist

Redis Compatibility

Kagni speaks RESP(REdis Serialization Protocol) fluently. I've implemented the following commands up to now:

  • Ping
  • Command
  • Get
  • Set
  • Getset
  • Mget
  • Mset
  • Del
  • Expire
  • Ttl
  • Keys
  • Incr
  • Incrby
  • Decr
  • Decrby
  • Getrange
  • Setrange
  • Strlen
  • Append
  • Setbit
  • Getbit
  • Bitop
  • Bitcount
  • Bitpos
  • Flushdb
  • Flushall
  • Hget
  • Hset
  • Hexists
  • Hdel
  • Hgetall
  • Sadd
  • Scard
  • Sdiff
  • Sdiffstore
  • Sinter
  • Sinterstore
  • Sismember
  • Smembers
  • Smove
  • Spop
  • Srandmember
  • Srem

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.