All Projects → aviggiano → Redis Roaring

aviggiano / Redis Roaring

Licence: mit
Roaring Bitmaps for Redis

Programming Languages

c
50402 projects - #5 most used programming language

Labels

Projects that are alternatives of or similar to Redis Roaring

Weibospider
This is a sina weibo spider built by scrapy [微博爬虫/持续维护]
Stars: ✭ 2,408 (+1160.73%)
Mutual labels:  redis
Grbac
权限管理服务平台, 利用shiro权限管理设计思想, 支持单用户多角色,比RBAC的资源管理更细粒度化
Stars: ✭ 186 (-2.62%)
Mutual labels:  redis
Back End Interview
后端面试题汇总(Python、Redis、MySQL、PostgreSQL、Kafka、数据结构、算法、编程、网络)
Stars: ✭ 188 (-1.57%)
Mutual labels:  redis
Redisc
A Go redis cluster client built on top of redigo.
Stars: ✭ 183 (-4.19%)
Mutual labels:  redis
Ms
🔥MS 是一个前后分离的分布式 spring cloud 框架(全家桶),这里有统一认证,统一网关等等功能,是一个非常简洁的微服务脚手架
Stars: ✭ 186 (-2.62%)
Mutual labels:  redis
Springboot Learning
《Spring Boot基础教程》,2.x版本持续连载中!点击下方链接直达教程目录!
Stars: ✭ 13,916 (+7185.86%)
Mutual labels:  redis
Xbin Store
模仿国内知名B2C网站,实现的一个分布式B2C商城 使用Spring Boot 自动配置 Dubbox / MVC / MyBatis / Druid / Solr / Redis 等。使用Spring Cloud版本请查看
Stars: ✭ 2,140 (+1020.42%)
Mutual labels:  redis
Dailyreport
日报管理系统V1版本,适合小团队的每日汇报记录
Stars: ✭ 191 (+0%)
Mutual labels:  redis
Ebook Chat App Spring Websocket Cassandra Redis Rabbitmq
Pro Java Clustering and Scalability: Building Real-Time Apps with Spring, Cassandra, Redis, WebSocket and RabbitMQ
Stars: ✭ 186 (-2.62%)
Mutual labels:  redis
Nest
Generate nested namespaced keys for key-value databases.
Stars: ✭ 188 (-1.57%)
Mutual labels:  redis
Interview Comment
Stars: ✭ 182 (-4.71%)
Mutual labels:  redis
Hospital
医院预约挂号微信小程序(Spring Boot、Vue、Uni-app)
Stars: ✭ 182 (-4.71%)
Mutual labels:  redis
Springcloud Miaosha
一个基于spring cloud Greenwich的简单秒杀电子商城项目,适合新人阅读。A simple spring cloud based seckill shopping mall project, suitable for young people to read. It can be used as a paper material for academic defense.
Stars: ✭ 187 (-2.09%)
Mutual labels:  redis
Mage2vuestorefront
Magento to Vue-storefront datapump - synchronizes Products, Categories and Product-to-category links between your Magento2 API and NoSQL database of vue-storefront
Stars: ✭ 183 (-4.19%)
Mutual labels:  redis
Webredismanager
WebRedis Manager is a simple management to implement Redis using SAEA. RedisSocket, SAEA.MVC and running speed quickly.WebRedisManager是使用的SAEA.RedisSocket、SAEA.MVC等实现Redis的简便管理功能,轻松运行~
Stars: ✭ 189 (-1.05%)
Mutual labels:  redis
Phpfastcache
A high-performance backend cache system. It is intended for use in speeding up dynamic web applications by alleviating database load. Well implemented, it can drops the database load to almost nothing, yielding faster page load times for users, better resource utilization. It is simple yet powerful.
Stars: ✭ 2,171 (+1036.65%)
Mutual labels:  redis
Lua Resty Redis Connector
Connection utilities for lua-resty-redis
Stars: ✭ 186 (-2.62%)
Mutual labels:  redis
Zi5book
book.zi5.me全站kindle电子书籍爬取,按照作者书籍名分类,每本书有mobi和equb两种格式,采用分布式进行全站爬取
Stars: ✭ 191 (+0%)
Mutual labels:  redis
Redis4cats
🔖 Redis client built on top of Cats Effect, Fs2 and Lettuce
Stars: ✭ 189 (-1.05%)
Mutual labels:  redis
Blog Service
blog service @nestjs
Stars: ✭ 188 (-1.57%)
Mutual labels:  redis

redis-roaring CI/CD

Roaring Bitmaps for Redis

Intro

This project uses the CRoaring library to implement roaring bitmap commands for Redis. These commands can have the same performance as redis' native bitmaps for O(1) operations and be up to 8x faster for O(N) calls, according to microbenchmarks, while consuming less memory than their uncompressed counterparts (benchmark pending).

Pull requests are welcome.

Dependencies

  • CRoaring (bitmap compression library used by this redis module)
  • cmake (build tools needed for compiling the source code)
  • redis (server needed for integration tests)
  • hiredis (redis client library needed for performance tests)
Known issues
  • This library only works with 32-bit integeres (e.g. counting numbers up to 4294967296)

Getting started

$ git clone https://github.com/aviggiano/redis-roaring.git
$ cd redis-roaring/
$ configure.sh
$ cd dist 
$ ./redis-server ./redis.conf  

then you can open another terminal and use ./redis-cli to connect to the redis server

Docker

It is also possible to run this project as a docker container.

docker run -p 6379:6379 aviggiano/redis-roaring:latest

Tests

Run the test.sh script for unit tests, integration tests and performance tests. The performance tests can take a while, since they run on a real dataset of integer values.

API

The following operations are supported

  • R.SETBIT (same as SETBIT)
  • R.GETBIT (same as GETBIT)
  • R.BITOP (same as BITOP)
  • R.BITCOUNT (same as BITCOUNT without start and end parameters)
  • R.BITPOS (same as BITPOS without start and end parameters)
  • R.SETINTARRAY (create a roaring bitmap from an integer array)
  • R.GETINTARRAY (get an integer array from a roaring bitmap)
  • R.SETBITARRAY (create a roaring bitmap from a bit array string)
  • R.GETBITARRAY (get a bit array string from a roaring bitmap)

Additional commands

  • R.APPENDINTARRAY (append integers to a roaring bitmap)
  • R.RANGEINTARRAY (get an integer array from a roaring bitmap with start and end, so can implements paging)
  • R.SETRANGE (set or append integer range to a roaring bitmap)
  • R.SETFULL (fill up a roaring bitmap in integer)
  • R.STAT (get statistical information of a roaring bitmap)
  • R.OPTIMIZE (optimize a roaring bitmap)
  • R.MIN (get minimal integer from a roaring bitmap, if key is not exists or bitmap is empty, return -1)
  • R.MAX (get maximal integer from a roaring bitmap, if key is not exists or bitmap is empty, return -1)
  • R.DIFF (get difference between two bitmaps)

Missing commands:

API Example

$ redis-cli
# create a roaring bitmap with numbers from 1 to 99
127.0.0.1:6379> R.SETRANGE test 1 100

# get all the numbers as an integer array
127.0.0.1:6379> R.GETINTARRAY test

# fill up the roaring bitmap 
# because you need 2^32*4 bytes memory and a very long time
127.0.0.1:6379> R.SETFULL full

# use `R.RANGEINTARRAY` to get numbers from 100 to 1000 
127.0.0.1:6379> R.RANGEINTARRAY full 100 1000

# append numbers to an existing roaring bitmap
127.0.0.1:6379> R.APPENDINTARRAY test 111 222 3333 456 999999999 9999990

Performance

Tested using CRoaring's census1881 dataset on the travis build 552223545:

OP TIME/OP (us) ST.DEV. (us)
R.SETBIT 31.83 71.85
SETBIT 30.52 74.83
R.GETBIT 30.29 46.99
GETBIT 29.30 38.39
R.BITCOUNT 30.38 0.04
BITCOUNT 169.46 0.95
R.BITPOS 30.62 0.08
BITPOS 55.06 0.77
R.BITOP NOT 103.90 1.71
BITOP NOT 328.14 5.81
R.BITOP AND 40.66 0.47
BITOP AND 433.52 7.98
R.BITOP OR 57.01 2.33
BITOP OR 425.10 7.68
R.BITOP XOR 60.50 2.77
BITOP XOR 415.21 7.51
R.MIN 27.16 0.08
MIN 24.57 0.18
R.MAX 24.62 0.04
MAX 25.85 0.03
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].