Giter Site home page Giter Site logo

jsredis's Introduction

JSRedis

Redis is great, I've been a huge fan of it for years, it provides a ton of really great was to interact with data. In many cases it can even provide concurrency primitives in places where they can otherwise be hard to implement (and running redis is usually way easier than ZeroMQ or RabbitMQ).

So why clone it in Javascript? Well, I often find that as an application grows, keeping track of the data you have gets more difficult, wouldn't it be nice if we could use the primitives provided to us by Redis in the browser?

I like Redis, I like the commands, I thinks it's pretty easy to map large amounts of data and more complex data flow onto the features it provides, and that's exactly what JSRedis is built to do.

Internally it will likely change over time, and won't be nearly as optimized ( http://redis.io/topics/memory-optimization ) but it should provide you with the functionality.

Task list, only completed if there is a test that passes :)

Simple stuff for any KVS:

  • get
  • set
  • reset db
  • exists
  • keys
  • batch commands
  • del
  • transactions
  • db lock (for multiple tabs).

Plugins:

  • localStorge / sessionStorage
  • IndexedDB

Redis Commands:

All Keys:

  • expire
  • presist
  • rename
  • renamenx
  • type

Lists:

  • blpop
  • brpop
  • brpoplpush
  • lindex
  • linsert
  • llen
  • lpop
  • lpush
  • lpushx
  • lrange
  • lrem
  • lset
  • ltrim
  • rpop
  • rpoplpush
  • rpush
  • rpushx

Strings:

  • append
  • decr
  • decrby
  • get
  • getrange
  • getset
  • incr
  • incrby
  • incrbyfloat
  • mget
  • mset
  • msetnx
  • psetex
  • set
  • setex
  • setnx
  • setrange
  • strlen

Bit Ops (harder to do in js):

  • bitcount
  • bitop
  • bitpos
  • getbit
  • setbit

Sets:

  • sadd
  • scard
  • sdiff
  • sdiffstore
  • sinter
  • sinterstore
  • sismember
  • smembers
  • smove
  • spop
  • srandmember
  • srem
  • sunion
  • sunionstore
  • sscan

Hashes:

  • hdel
  • hexists
  • hget
  • hgetall
  • hincrby
  • hincrbyfloat
  • hkeys
  • hlen
  • hmget
  • hmset
  • hset
  • hsetnx
  • hvals
  • hscan

Sorted Sets:

  • zadd
  • zcard
  • zcount
  • zincrby
  • zinterstore
  • zlexcount
  • zrange
  • zrangebylex
  • zrevrangebylex
  • zrangebyscore
  • zrank
  • zrem
  • zremrangebylex
  • zremrangebyrank
  • zremrangebyscore
  • zrevrange
  • zrevrangebyscore
  • zrevrank
  • zscore
  • zunionstore
  • zscan

HyperLogLog, Pub/Sub, Transactions, and Scripting will be implemented once I implement more of the things above.

jsredis's People

Contributors

graham avatar

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.