arana-db / arana-db/kiwi-cpp

网站建设需要:Kiwi 的分布式设计图是什么样的?同 Redis,Pika 等相比又是怎么样的?【重要,请优先处理】

Open
#92 0 comments 0 reactions 0 assignees View on GitHub
✏️ Feature
Dominant language
C++
Stars
49
Forks
8
PR merge metrics
No merged PRs in 30d

Description

### Which kiwi functionalities are relevant/related to the feature request?

_No response_

### Description

目前我阅读了 Pika 实现分布式的方法(看来它本质上还是一个单节点的 RocksDB 存储,但是套了一层 Redis 兼容指令的皮),发现它就是依托了 Ectd 存储元信息,然后借助 LVS (Proxy)实现的这一功能(换而言之,单独的 Pika 是不具备这种分布式能力的)。也看了一下 Redis 实现分布式的方法,有三种
![图片](https://github.com/user-attachments/assets/0baa8e37-d2d7-46cf-b968-940436c6ec98)
![图片](https://github.com/user-attachments/assets/f9e27be2-5d11-4c3c-9aeb-578808446ef5)
![图片](https://github.com/user-attachments/assets/451acbe4-a0cd-45fe-b9ec-ce28f86ae7b9)

简单来说,就是在一主多从的基础上进行了拓展(一个思路是加入监控节点,实时检测状态,然后快速故障转移;一个思路是一致性哈希环,实现数据的分散分布,结合备用节点实现高可用),不知道 Kiwi 是怎么思考的?

我在前面提出 Kiwi 借助的是 BRaft

![图片](https://github.com/user-attachments/assets/b29a3d91-030f-4e87-a8c4-863946a488b5)
![图片](https://github.com/user-attachments/assets/3859ef22-7635-4e3d-9d94-195979f666df)

(BRaft 的相关描述)

![图片](https://github.com/user-attachments/assets/b226307f-8e8d-4bf0-94e4-d207f2d7514a)

(Kiwi PRaft 应该是对 BRaft 套了个皮)

但是这种思路更加具体是什么?能不能提供更为详细的文档,不然阅读非常困难(不过现在我基本上已经是弄明白了,了解 Kiwi 一定要从 BRaft 入手,这是它实现分布式的框架,然后再在这个基础上了解 Redis 命令的实现,基本上就是大差不差)

谢谢!

### Proposed solution

_No response_

### Alternatives considered

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no files or tests. Start by tracing Kiwi's BRaft/PRaft distributed implementation and Redis-command layer, then document the architecture and compare it with Redis and Pika; done means a detailed explanation is available for newcomers.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, redis
Domain
distributed-systems, documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.