rpcxio / Basalt
Licence: apache-2.0
高性能的分布式的专门空间优化的 Bitmap 服务, 高效检查数据是否存在,日活统计,签到,打点等等
Stars: ✭ 128
Programming Languages
go
31211 projects - #10 most used programming language
Projects that are alternatives of or similar to Basalt
Doramon
常见工具汇总:一键式生成整个前后端工具,单机高性能幂等工具,zookeeper客户端工具,分布式全局id生成器,一致性哈希工具,Bitmap工具,布隆过滤器参数生成器,Yaml和properties互转工具等等
Stars: ✭ 24 (-81.25%)
Mutual labels: bloom-filter, bitmap
Doramon
个人工具汇总:一致性哈希工具,Bitmap工具,布隆过滤器参数生成器,Yaml和properties互转工具,一键式生成整个前后端工具,单机高性能幂等工具,zookeeper客户端工具,分布式全局id生成器,时间转换工具,Http封装工具
Stars: ✭ 53 (-58.59%)
Mutual labels: bitmap, bloom-filter
Piggymetrics
Microservice Architecture with Spring Boot, Spring Cloud and Docker
Stars: ✭ 11,161 (+8619.53%)
Mutual labels: microservices
Nirum
Nirum: IDL compiler and RPC/distributed object framework for microservices
Stars: ✭ 119 (-7.03%)
Mutual labels: microservices
Gokit Examples
Examples for building microservices with Go kit (gokit.io)
Stars: ✭ 125 (-2.34%)
Mutual labels: microservices
Php Microservice Demo
Docker+Consul+Hyperf 搭建 PHP 微服务集群
Stars: ✭ 116 (-9.37%)
Mutual labels: microservices
Pyms
Library of utils to create REST Python Microservices
Stars: ✭ 120 (-6.25%)
Mutual labels: microservices
Jib
🏗 Build container images for your Java applications.
Stars: ✭ 11,370 (+8782.81%)
Mutual labels: microservices
Rebus
🚌 Simple and lean service bus implementation for .NET
Stars: ✭ 1,733 (+1253.91%)
Mutual labels: microservices
Fastbitset.js
Speed-optimized BitSet implementation for modern browsers and JavaScript engines
Stars: ✭ 118 (-7.81%)
Mutual labels: bitmap
Litmus
Litmus helps SREs and developers practice chaos engineering in a Cloud-native way. Chaos experiments are published at the ChaosHub (https://hub.litmuschaos.io). Community notes is at https://hackmd.io/a4Zu_sH4TZGeih-xCimi3Q
Stars: ✭ 2,377 (+1757.03%)
Mutual labels: microservices
Knotx
Knot.x is a highly-efficient and scalable integration framework designed to build backend APIs
Stars: ✭ 119 (-7.03%)
Mutual labels: microservices
Dubbo Go Pixiu
Based on the proxy gateway service of dubbo-go, it solves the problem that the external protocol calls the internal Dubbo cluster. At present, it supports HTTP and gRPC[developing].
Stars: ✭ 124 (-3.12%)
Mutual labels: microservices
Friboo
Utility library for writing microservices in Clojure, with support for Swagger and OAuth
Stars: ✭ 116 (-9.37%)
Mutual labels: microservices
Lora Serialization
LoraWAN serialization/deserialization library for The Things Network
Stars: ✭ 120 (-6.25%)
Mutual labels: bitmap
Framework
Repositório principal contendo o Core e Extensions: JPA, Security, WS
Stars: ✭ 124 (-3.12%)
Mutual labels: microservices
Phantoscope
Open Source, Cloud Native, RESTful Search Engine Powered by Neural Networks
Stars: ✭ 127 (-0.78%)
Mutual labels: microservices
基于Raft的数据一致性分布式的 bitmap 服务
bitmap
(位图)技术是数据库、大数据和互联网业务等场景下经常使用的一种技术。
- 存在性判断
- 爬虫url去重
- 垃圾邮件过滤
- 用户已阅读
- 用户已赞
- ...
- 去重
- 数据库
- 大数据计算
架构图
支持三种协议读写: HTTP
、redcis
和rpcx
。
写
操作可以发给任意节点,但最终是由raft leader节点进行操作。
读
操作可以选择任意的节点进行读取。
服务
进入cmd/server
, 运行go run server.go
启动一个bitmap服务。
它同时支持三种服务:
- rpcx: 你可以使用rpcx服务获取高性能的网络调用,
cmd/rpcx_client
是一个rpcx客户端的demo - redis: 你可以使用redis客户端访问Bitmap服务(如果你的redis client支持自定义命令), 方便兼容redis调用代码,
cmd/redis_client
是redis demo - http: 通过http服务调用,调用简单,支持各种编程语言和脚本,
cmd/http_client/curl.sh
是通过curl
调用服务
集群模式
支持raft集群模式: basalt集群
API接口
basalt位图服务支持三种接口模式:
- HTTP API: 通过http api的方式进行访问
- Redis模式: 扩展了redis命令,可以通过redis client进行访问
- rpcx模式: 可以通过rpcx框架进行访问
Redis命令
-
ping
: ping-pong消息 -
quit
: 退出连接 -
bmadd name value
: 在名为name
的bitmap增加一个uint32值value
-
bmaddmany name value1 value2 value3...
: 为名为name
的bitmap增加一批值 -
bmdel name value
: 在名为name
的bitmap删除一个uint32值value
-
bmdrop name
: 删除名为name
的bitmap -
bmclear name
: 清空名为name
的bitmap -
bmcard name
: 获取为name
的bitmap包含的元素数 -
bmexists name value
: 检查uint32值value
是否存在于名为name
的bitmap中,整数1
代表存在,0
代表不存在 -
bminter name1 name2 name3...
: 求几个bitmap的交集,返回交集的uint32整数列表 -
bminterstore dst name1 name2 name3...
: 求几个bitmap(name1
、name2
、name3
...)的交集,并将结果保存到dst
中 -
bmunion name1 name2 name3...
: 求几个bitmap的并集,返回并集的uint32整数列表 -
bmunionstore dst name1 name2 name3...
: 求几个bitmap(name1
、name2
、name3
...)的并集,并将结果保存到dst
中 -
bmxor name1 name2.
: 求两个bitmap的xor
集(双方不共有的集合,相当于并集减交集),返回xor
集的uint32整数列表 -
bmxorstore dst name1 name2
: 求两个bitmap的xor
集,并将结果保存到dst
中 -
bmdiff name1 name2
: 求name1
中和name2
没有交集的数据,返回结果的uint32整数列表 -
bmdiffstore dst name1 name2
: 求name1
中和name2
没有交集的数据,并将结果保存到dst
中 -
bmstats name
: 返回name
的bitmap的统计信息
rpcx 服务
查看 godoc以了解提供的rpcx服务
HTTP 服务
HTTP 服务提供和 redis、rpcx服务相同的功能,通过http调用就可以访问Bitmap服务。
所有的参数都是在路径中提供,路径格式为/action/param1/param2
。
复数形式values
、names
包含多个元素,元素以逗号,
分隔。
为了简化操作,所有的http服务都是通过GET
方法提供的。
返回的HTTP StatusCode
代表的含义如下:
-
200
代表OK
、存在
-
400
代表参数不对,比如应该是uint32格式,结果却是无法解析的字符串 -
404
代表不存在 -
500
代表内部处理错误
HTTP服务路径列表如下:
/add/:name/:value
/addmany/:name/:values
/remove/:name/:value
/drop/:name
/clear/:name
/exists/:name/:value
/card/:name
/inter/:names
/interstore/:dst/:names
/union/:names
/unionstore/:dst/:names
/xor/:name1/:name2
/xorstore/:dst/:name1/:name2
/diff/:name1/:name2
/diffstore/:dst/:name1/:name2
/stats/:name
例子
以微博关注关系数据集做例子,我们使用Bitmap服务来存储某人是否关注了某人,以及两人是否互相关注。
例子参看 weibo_follow
Roadmap
- [x] Multiple-key Bitmap
- [x] rpcx services for Bitmap
- [x] HTTP services for Bitmap
- [x] Redis services for Bitmap
- [x] Persistence
- [x] Cluster mode
Credits
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].