JinHai-CN / matrixcube

Fundamental Building Block for Elastic Storage With Strong Consistency and Reliability

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Matrixcube

Matrixcube是一个用于构建Multi-Raft的强一致系统的类库。应用程序完全不需要关心分布式的问题,只需要编写自己的数据存储的单机代码即可。

特性

  • Strong consistent persistence storage
  • High availability
  • Horizontal scalability
  • Auto Rebalance

Quick start

一个基于Redis协议的存储服务

例子代码在 这里

make example-redis
docker-compose up

启动完毕后,启动了一个4个节点的集群,4个节点都可以对外提供Redis的服务,任何一个节点对于客户端都是等价的。4个节点监听6371~6374四个端口。 利用redis-cli来连接任意一个节点来试试吧。

一个基于http协议的自定义存储服务

例子代码在 这里

make example-http
docker-compose -f ./docker-compose-http up

启动完毕后,启动了一个4个节点的集群,4个节点都可以对外提供http的服务,任何一个节点对于客户端都是等价的。4个节点监听6371~6374四个端口。

curl "http://127.0.0.1:6371/set?key=k&value=v"

curl "http://127.0.0.1:6371/get?key=k"

curl "http://127.0.0.1:6371/delete?key=k"

About

Fundamental Building Block for Elastic Storage With Strong Consistency and Reliability

License:Apache License 2.0


Languages

Language:Go 99.9%Language:Shell 0.1%Language:Makefile 0.1%