Skip to content

Commit

Permalink
add github workflow (#6)
Browse files Browse the repository at this point in the history
* add github workflow

* add contact pics
  • Loading branch information
AlexStocks authored Oct 11, 2023
1 parent 7c9b671 commit b7c8b09
Show file tree
Hide file tree
Showing 12 changed files with 345 additions and 97 deletions.
50 changes: 50 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Compiled Object files
*.slo
*.lo
*.o
*.obj
*pb.cc
*pb.h

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# Log path
make_config.mk
log/
lib/
tools/
output/

# DB
db/
dump/

# third party
gdb.txt
tags

make_config.mk
src/*.d
src/build_version.cc

34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug Report
about: Report a bug
labels: kind/bug

---

### Environment

<!--
- Server: PikiwiDB, v1.0.0
- Client: redis-cli, v7.2.0
- Protocol: RESP v2
- Registry: Etcd, v3.4.0
-->

- Server:
- Client:
- Protocol:
- Registry:

### Issue description

<!-- Here is a brief description about the issue. -->

### Logs

<details><summary>Click me to check logs</summary>

```
Copy logs to here.
```

</details>
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Enhancement Request
about: Suggest an enhancement
labels: kind/feature

---
<!-- Please only use this template for submitting enhancement requests -->

**What would you like to be added**:

**Why is this needed**:

20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
target-branch: "3.0"

- package-ecosystem: "github-actions"
# Workflow files stored in the
# default location of `.github/workflows`
directory: "/"
schedule:
interval: "monthly"
target-branch: "3.0"
75 changes: 75 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# vim temp files
*.swp
# Compiled Object files
*.slo
*.lo
*.o
*.obj
*pb.cc
*pb.h
build
cmake-build-debug
cmake-build-release

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll


# Compiled Static libraries
*.lai *.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# Log path
make_config.mk
log/
lib/
output/

# DB
db/
dump/
src/dbsync/

# third party
gdb.txt
tags

# IDE
.vscode

# generate
make_config.mk
src/*.d
src/build_version.cc

#cache
.cache

.idea/


#build
build/
buildtrees
deps

#develop container
.devcontainer

# include codis fe javascript lib files
!codis/cmd/fe/assets/**

tests/tmp

3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "samples"]
path = samples
url = [email protected]:OpenAtomFoundation/pikiwidb.git
47 changes: 47 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

55 changes: 22 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,35 @@
# PikiwiDB

[Click me switch to English](README.en.md)
[中文](README_CN.md)

C++11实现的增强版Redis服务器,使用Leveldb作为持久化存储引擎。(集群支持尚正在计划中)
A C++11 implementation of Redis Server, use Leveldb for persist storage.(not including cluster yet)

## 环境需求
* C++11、CMake
* Linux 或 MAC OS
## Requirements
* C++11
* Linux or OS X

## 与Redis完全兼容
你可以用redis的各种工具来测试PikiwiDB,比如官方的redis-cli, redis-benchmark。
## Support module for write your own extensions
PikiwiDB supports module now, still in progress, much work to do.
I added three commands(ldel, skeys, hgets) for demonstration.

PikiwiDB可以和redis之间进行复制,可以读取redis的rdb文件或aof文件。当然,PikiwiDB生成的aof或rdb文件也可以被redis读取。
## Persistence: Not limited to memory
Leveldb can be configured as backend for PikiwiDB.

你还可以用redis-sentinel来实现PikiwiDB的高可用!
## Fully compatible with redis
You can test PikiwiDB with redis-cli, redis-benchmark, or use redis as master with PikiwiDB as slave or conversely, it also can work with redis sentinel.

总之,PikiwiDB与Redis完全兼容。
## High Performance
- PikiwiDB is approximately 20-25% faster than redis if run benchmark with pipeline requests(set -P = 50 or higher).
- Average 80K requests per seconds for write, and 90K requests per seconds for read.
- Before run test, please ensure that std::list::size() is O(1), obey the C++11 standards.

## 高性能
- PikiwiDB性能大约比Redis3.2高出20%(使用redis-benchmark测试pipeline请求,比如设置-P=50或更高)
- PikiwiDB的高性能有一部分得益于独立的网络线程处理IO,因此和redis比占了便宜。但PikiwiDB逻辑仍然是单线程的。
- 另一部分得益于C++ STL的高效率(CLANG的表现比GCC更好)。
- 在测试前,你要确保std::list的size()是O(1)复杂度,这才遵循C++11的标准。否则list相关命令不可测。

运行下面这个命令,试试和redis比一比~
Run this command, compare with redis use pipeline commands, try it.
```bash
./redis-benchmark -q -n 1000000 -P 50 -c 50
```

## 编写扩展模块
PikiwiDB支持动态库模块,可以在运行时添加新命令。
我添加了三个命令(ldel, skeys, hgets)作为演示。

## 支持冷数据淘汰
是的,在内存受限的情况下,你可以让PikiwiDB根据简单的LRU算法淘汰一些key以释放内存。

## 主从复制,事务,RDB/AOF持久化,慢日志,发布订阅
这些特性PikiwiDB都有:-)

## 持久化:内存不再是上限
Leveldb可以配置为PikiwiDB的持久化存储引擎,可以存储更多的数据。


## 命令列表
#### 展示PikiwiDB支持的所有命令
## Command List
#### show all supported commands list
- cmdlist

#### key commands
Expand Down Expand Up @@ -76,4 +62,7 @@ C++11实现的增强版Redis服务器,使用Leveldb作为持久化存储引擎
#### replication commands
- sync slaveof

## Contact Us

![](docs/images/pikiwidb-wechat.png)

Loading

0 comments on commit b7c8b09

Please sign in to comment.