Skip to content

Commit

Permalink
Doc: remove useless info from docs.rs front page
Browse files Browse the repository at this point in the history
Add `lib_readme.md` as docs.rs front page.
Replace links in README.md with urls to docs.rs.
  • Loading branch information
drmingdrmer committed Nov 28, 2023
1 parent aad7876 commit 36d84f2
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 57 deletions.
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

[![Crates.io](https://img.shields.io/crates/v/openraft.svg)](https://crates.io/crates/openraft)
[![docs.rs](https://docs.rs/openraft/badge.svg)](https://docs.rs/openraft)
[![guides](https://img.shields.io/badge/guide-%E2%86%97-brightgreen)](https://datafuselabs.github.io/openraft)
[![guides](https://img.shields.io/badge/guide-%E2%86%97-brightgreen)](https://docs.rs/openraft/latest/openraft/docs/index.html)
<br/>
[![CI](https://github.com/datafuselabs/openraft/actions/workflows/ci.yaml/badge.svg)](https://github.com/datafuselabs/openraft/actions/workflows/ci.yaml)
![License](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue)
Expand All @@ -22,10 +22,10 @@ This project intends to improve raft as the next-generation consensus protocol f
Currently, openraft is the consensus engine of meta-service cluster in [databend](https://github.com/datafuselabs/databend).


- **Get started**: [The guide](https://datafuselabs.github.io/openraft) is the best place to get started,
followed by [the docs](https://docs.rs/openraft/latest/) for more in-depth details.
- **Get started**: [The guide](https://docs.rs/openraft/latest/openraft/docs/getting_started/index.html) is the best place to get started,
followed by [the docs](https://docs.rs/openraft/latest/openraft/docs/index.html) for more in-depth details.

- [Openraft FAQ](https://datafuselabs.github.io/openraft/faq) explains some common questions.
- [Openraft FAQ](https://docs.rs/openraft/latest/openraft/docs/faq/index.html) explains some common questions.

- 🙌 Questions? Join the [Discord channel](https://discord.gg/ZKw3WG7FQ9) or start a [discussion](https://github.com/datafuselabs/openraft/discussions/new).

Expand Down Expand Up @@ -56,12 +56,13 @@ Currently, openraft is the consensus engine of meta-service cluster in [databend
The main branch is for the [release-0.9](https://github.com/datafuselabs/openraft/tree/release-0.9).

- **Branch [release-0.8](https://github.com/datafuselabs/openraft/tree/release-0.8)**:
Latest published: [v0.8.3](https://github.com/datafuselabs/openraft/tree/v0.8.3) | [Change log v0.8.3](https://github.com/datafuselabs/openraft/blob/release-0.8/change-log.md#v083) |
⬆️ [0.7 to 0.8 upgrade guide](https://datafuselabs.github.io/openraft/upgrade-v07-v08) |
Latest published: [v0.8.6](https://github.com/datafuselabs/openraft/tree/v0.8.6) | [Change log v0.8.3](https://github.com/datafuselabs/openraft/blob/release-0.8/change-log.md#v086) |
⬆️ [0.7 to 0.8 upgrade guide](https://docs.rs/openraft/0.8.4/openraft/docs/upgrade_guide/upgrade_07_08/index.html) | ⬆️ [0.8.3 to 0.8.4 upgrade guide](https://docs.rs/openraft/0.8.4/openraft/docs/upgrade_guide/upgrade_083_084/index.html) |
`release-0.8` **Won't** accept new features but only bug fixes.

- **Branch [release-0.7](https://github.com/datafuselabs/openraft/tree/release-0.7)**:
Latest published: [v0.7.6](https://github.com/datafuselabs/openraft/tree/v0.7.6) | [Change log v0.7.6](https://github.com/datafuselabs/openraft/blob/release-0.7/change-log.md#v076) |
⬆️ [0.6 to 0.7 upgrade guide](https://datafuselabs.github.io/openraft/upgrade-v06-v07) |
⬆️ [0.6 to 0.7 upgrade guide](https://docs.rs/openraft/0.8.4/openraft/docs/upgrade_guide/upgrade_06_07/index.html) |
`release-0.7` **Won't** accept new features but only bug fixes.

- **Branch [release-0.6](https://github.com/datafuselabs/openraft/tree/release-0.6)**:
Expand All @@ -70,11 +71,11 @@ Currently, openraft is the consensus engine of meta-service cluster in [databend

# Roadmap

- [x] **2022-10-31** [Extended joint membership](https://datafuselabs.github.io/openraft/extended-membership)
- [x] **2022-10-31** [Extended joint membership](https://docs.rs/openraft/latest/openraft/docs/data/extended_membership/index.html)

- [x] **2023-02-14** Minimize confliction rate when electing;
See: [Openraft Vote design](https://datafuselabs.github.io/openraft/vote);
Or use standard raft mode with [feature flag `single-term-leader`](https://datafuselabs.github.io/openraft/feature-flags).
See: [Openraft Vote design](https://docs.rs/openraft/latest/openraft/docs/data/vote/index.html);
Or use standard raft mode with [feature flag `single-term-leader`](https://docs.rs/openraft/latest/openraft/docs/feature_flags/index.html).

- [x] **2023-04-26** Goal performance is 1,000,000 put/sec.

Expand Down Expand Up @@ -144,10 +145,10 @@ The benchmark is conducted with the following settings:

- It fully supports dynamic cluster membership changes with joint config.
The buggy single-step membership change algo is not considered.
See the [`dynamic membership`](https://datafuselabs.github.io/openraft/dynamic-membership) chapter in the guide.
See the [`dynamic membership`](https://docs.rs/openraft/latest/openraft/docs/cluster_control/dynamic_membership/index.html) chapter in the guide.

- Details on initial cluster formation, and how to effectively do so from an application's perspective,
are discussed in the [cluster formation](https://datafuselabs.github.io/openraft/cluster-formation) chapter in the guide.
are discussed in the [cluster formation](https://docs.rs/openraft/latest/openraft/docs/cluster_control/cluster_formation/index.html) chapter in the guide.

- Automatic log compaction with snapshots, as well as snapshot streaming from the leader node to follower nodes is fully supported and configurable.

Expand Down
50 changes: 25 additions & 25 deletions openraft/src/docs/docs.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
# Openraft Document

If you're starting to build an application with Openraft, check out
- [`getting_started`].
- [`faq`],
- [`getting_started`](crate::docs::getting_started).
- [`faq`](crate::docs::faq),

To maintain an Openraft cluster, e.g., add or remove nodes, refer to
- [`cluster_control`] :
- [`cluster_formation`](`cluster_control::cluster_formation`) describes how to form a cluster;
- [`dynamic membership`](`cluster_control::dynamic_membership`) describes how to add or remove nodes without downtime;
- [`node lifecycle`](`cluster_control::node_lifecycle`) describes the transition of a node's state;
- [`cluster_control`](crate::docs::cluster_control) :
- [`cluster_formation`](`crate::docs::cluster_control::cluster_formation`) describes how to form a cluster;
- [`dynamic membership`](`crate::docs::cluster_control::dynamic_membership`) describes how to add or remove nodes without downtime;
- [`node lifecycle`](`crate::docs::cluster_control::node_lifecycle`) describes the transition of a node's state;

When upgrading an Openraft application, consult:
- [`upgrade_guide`] :
- [`v0.6-to-v0.7`](`upgrade_guide::upgrade_06_07`);
- [`v0.7-to-v0.8`](`upgrade_guide::upgrade_07_08`);
- [`v0.8.3-to-v0.8.4`](`upgrade_guide::upgrade_083_084`);
- [`upgrade_guide`](crate::docs::upgrade_guide) :
- [`v0.6-to-v0.7`](`crate::docs::upgrade_guide::upgrade_06_07`);
- [`v0.7-to-v0.8`](`crate::docs::upgrade_guide::upgrade_07_08`);
- [`v0.8.3-to-v0.8.4`](`crate::docs::upgrade_guide::upgrade_083_084`);

To learn about the data structures used in Openraft and the commit protocol, see
- [`feature_flags`] ;
- [`data`] :
- [`Vote`](`data::vote`) is the core in a distributed system;
- [`Log pointers`](`data::log_pointers`) shows how Openraft tracks entries in the log;
- [`Extended membership`](`data::extended_membership`) explains how members are organized in Openraft;
- [`Effective membership`](`data::effective_membership`) explains when membership config takes effect;
- [`protocol`] :
- [`replication`](`protocol::replication`);
- [`leader_lease`](`protocol::replication::leader_lease`);
- [`log_replication`](`protocol::replication::log_replication`);
- [`snapshot_replication`](`protocol::replication::snapshot_replication`);
- [`feature_flags`](crate::docs::feature_flags);
- [`data`](crate::docs::data) :
- [`Vote`](`crate::docs::data::vote`) is the core in a distributed system;
- [`Log pointers`](`crate::docs::data::log_pointers`) shows how Openraft tracks entries in the log;
- [`Extended membership`](`crate::docs::data::extended_membership`) explains how members are organized in Openraft;
- [`Effective membership`](`crate::docs::data::effective_membership`) explains when membership config takes effect;
- [`protocol`](crate::docs::protocol) :
- [`replication`](`crate::docs::protocol::replication`);
- [`leader_lease`](`crate::docs::protocol::replication::leader_lease`);
- [`log_replication`](`crate::docs::protocol::replication::log_replication`);
- [`snapshot_replication`](`crate::docs::protocol::replication::snapshot_replication`);

Contributors who want to understand the internals of Openraft can find relevant information in
- [`internal`] :
- [`internal`](crate::docs::internal) :
- [Architecture](`crate::docs::internal::architecture`) shows the overall architecture of Openraft;
- [Threading](`crate::docs::internal::threading`) describes the threading model of Openraft;

Finally, the archived and discarded documents:
- [`obsolete`] describes obsolete design documents and why they are discarded;
- [`blank-log-heartbeeat`](`obsolete::heartbeat`);
- [`fast-commit`](`obsolete::fast_commit`);
- [`obsolete`](crate::docs::obsolete) describes obsolete design documents and why they are discarded;
- [`blank-log-heartbeeat`](`crate::docs::obsolete::heartbeat`);
- [`fast-commit`](`crate::docs::obsolete::fast_commit`);
8 changes: 7 additions & 1 deletion openraft/src/docs/feature_flags/feature-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@

By default openraft enables no features.

- `bench`: Enables benchmarks in unittest. Benchmark in openraft depends on the unstable feature
`test` thus it can not be used with stable rust. In order to run the benchmark with stable
toolchain, the unstable features have to be enabled explicitly with environment variable
`RUSTC_BOOTSTRAP=1`.
<br/><br/>

- `bt`:
attaches backtrace to generated errors. This feature works ONLY with nightly rust.
attaches backtrace to generated errors. This feature works ONLY with nightly rust, because it requires unstable feature `error_generic_member_access`.
<br/><br/>

- `loosen-follower-log-revert`:
Expand Down
6 changes: 3 additions & 3 deletions openraft/src/docs/internal/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,22 @@ The major components inside Openraft include:
! | "is_leader()" !
! | "change_membership()"!
! v !
! Raft ! .-----> Raft ----.
! Raft ! .-----> Raft o---.
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' | |
| | |
| enum RaftMes | |
| | |
.~~~~~~~|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~. | .~~~~~~|~~~~~~~~~~~~.
! v ! | ! v !
.----------------o RaftCore o--------------------------. | ! RaftCore !
.----------------o RaftCore ---------------------------. | ! RaftCore !
| ! o ! | | ! !
| ! | ! | | '~~~~~~~~~~~~~~~~~~~'
| ! .--+--------. ! | |
| ! v v ! | |
| ! ReplicationHandle ReplicationHandle ! | |
| ! | | ! | |
| '~~|~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~' | |
| | | | |
| | | | |
| .~~~~~~~~~~|~~~~~~~~~~. .~~|~~~~~~~~~~~~~~~~~~~. | | RPC:
| ! v ! ! v ! | | "vote()"
| ! ReplicationCore ! ! ReplicationCore ! | | "append_entries()"
Expand Down
6 changes: 6 additions & 0 deletions openraft/src/docs/upgrade_guide/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ A commit message starting with these keywords needs attention:

- Fix: bug fix. No modification is required.

## Upgrade from [v0.8.3](https://github.com/datafuselabs/openraft/tree/v0.8.3) to [v0.8.4](https://github.com/datafuselabs/openraft/tree/v0.8.4):

[Change log v0.8.4](https://github.com/datafuselabs/openraft/blob/release-0.8/change-log.md)

[Guide for upgrading v0.8.3 to v0.8.4](`crate::docs::upgrade_guide::upgrade_083_084`)

## Upgrade from [v0.7](https://github.com/datafuselabs/openraft/tree/v0.7.4) to [v0.8](https://github.com/datafuselabs/openraft/tree/release-0.8):

[Change log v0.8](https://github.com/datafuselabs/openraft/blob/release-0.8/change-log.md)
Expand Down
18 changes: 2 additions & 16 deletions openraft/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![doc = include_str!("../README.md")]
#![doc = include_str!("lib_readme.md")]
#![doc = include_str!("docs/docs.md")]
#![cfg_attr(feature = "bt", feature(error_generic_member_access))]
#![cfg_attr(feature = "bench", feature(test))]
// TODO: `clippy::result-large-err`: StorageError is 136 bytes, try to reduce the size.
Expand All @@ -7,21 +8,6 @@
// TODO: Enable this when doc is complete
// #![warn(missing_docs)]

//! # Feature flags
//!
//! - `bench`: Enables benchmarks in unittest. Benchmark in openraft depends on the unstable feature
//! `test` thus it can not be used with stable rust. In order to run the benchmark with stable
//! toolchain, the unstable features have to be enabled explicitly with environment variable
//! `RUSTC_BOOTSTRAP=1`.
//!
//! - `bt`: Enable backtrace: generate backtrace for errors. This requires unstable feature
//! `error_generic_member_access` thus it can not be used with stable rust.
//!
//! - `serde`: Add serde::Serialize and serde:Deserialize bound to data types. If you'd like to use
//! `serde` to serialize messages.
//!
//! - `singlethreaded`: Prevent `Raft` instances from being shared among multiple threads.
macro_rules! func_name {
() => {{
fn f() {}
Expand Down
20 changes: 20 additions & 0 deletions openraft/src/lib_readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- This page is rendered by docs.rs -->

<div align="center">
<h1>Openraft</h1>
</div>

## API status

**Openraft API is currently unstable**.
Incompatibilities may arise in upgrades prior to `1.0.0`.
Refer to our [Change-Log](https://github.com/datafuselabs/openraft/blob/main/change-log.md) for details.
[Upgrade Guides](crate::docs::upgrade_guide) explains how to upgrade.

Each commit message begins with a keyword indicating the type of change:

- `DataChange:` Changes to on-disk data types, possibly requiring manual upgrade.
- `Change:` Introduces incompatible API changes.
- `Feature:` Adds compatible, non-breaking new features.
- `Fix:` Addresses bug fixes.

0 comments on commit 36d84f2

Please sign in to comment.