• Stars
    star
    2,176
  • Rank 21,195 (Top 0.5 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created over 2 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Rust RPC framework with high-performance and strong-extensibility for building micro-services.

Volo

Crates.io Documentation Website License Build Status

English | 中文

Volo is a high-performance and strong-extensibility Rust RPC framework that helps developers build microservices.

Volo uses Motore as its middleware abstraction, which is powered by GAT.

Overview

Crates

Volo mainly consists of six crates:

  1. The volo crate, which contains the common components of the framework.
  2. The volo-thrift crate, which provides the Thrift RPC implementation.
  3. The volo-grpc crate, which provides the gRPC implementation.
  4. The volo-build crate, which generates thrift and protobuf code.
  5. The volo-cli crate, which provides the CLI interface to bootstrap a new project and manages the idl files.
  6. The volo-macros crate, which provides the macros for the framework.

Features

Powered by GAT

Volo uses Motore as its middleware abstraction, which is powered by GAT.

Through GAT, we can avoid many unnecessary Box memory allocations, improve ease of use, and provide users with a more friendly programming interface and a more ergonomic programming paradigm.

High Performance

Rust is known for its high performance and safety. We always take high performance as our goal in the design and implementation process, reduce the overhead of each place as much as possible, and improve the performance of each implementation.

First of all, it is very unfair to compare the performance with the Go framework, so we will not focus on comparing the performance of Volo and Kitex, and the data we give can only be used as a reference, I hope everyone can view it objectively; at the same time, due to the open source community has not found another mature Rust async version Thrift RPC framework, and performance comparison is always easy to lead to war, so we hope to weaken the comparison of performance data as much as possible, and we'll only publish our own QPS data.

Under the same test conditions as Kitex (limited to 4C), the Volo QPS is 350k; at the same time, we are internally verifying the version based on Monoio (CloudWeGo's open source Rust async runtime), and the QPS can reach 440k.

From the flame graph of our online business, thanks to Rust's static distribution and excellent compilation optimization, the overhead of the framework part is basically negligible (excluding syscall overhead).

Easy to Use

Rust is known for being hard to learn and hard to use, and we want to make it as easy as possible for users to use the Volo framework and write microservices in the Rust language, providing the most ergonomic and intuitive coding experience possible. Therefore, we make ease of use one of our most important goals.

For example, we provide the volo command line tool for bootstraping projects and managing idl files; at the same time, we split thrift and gRPC into two independent(but share some components) frameworks to provide programming paradigms that best conform to different protocol semantics and interface.

We also provide the #[service] macro (which can be understood as the async_trait that does not require Box) to enable users to write service middleware using async rust without psychological burden.

Strong Extensibility

Benefiting from Rust's powerful expression and abstraction capabilities, through the flexible middleware Service abstraction, developers can process RPC meta-information, requests and responses in a very unified form.

For example, service governance functions such as service discovery and load balancing can be implemented in the form of services without the need to implement Trait independently.

We have also created an organization Volo-rs, any contributions are welcome.

For more information, you may refer to our guide.

Tutorial

Volo-Thrift: https://www.cloudwego.io/zh/docs/volo/volo-thrift/getting-started/

Volo-gRPC: https://www.cloudwego.io/zh/docs/volo/volo-grpc/getting-started/

Examples

See Examples.

Related Projects

  • Volo-rs: The volo ecosystem which contains a lot of useful components.
  • Motore: Middleware abstraction layer powered by GAT.
  • Pilota: A thrift and protobuf implementation in pure rust with high performance and extensibility.
  • Metainfo: Transmissing metainfo across components.

RoadMap

See ROADMAP.md for more information.

Contributing

See CONTRIBUTING.md for more information.

License

Volo is dual-licensed under the MIT license and the Apache License (Version 2.0).

See LICENSE-MIT and LICENSE-APACHE for details.

Credits

We have used some third party components, and we thank them for their work.

For the full list, you may refer to the CREDITS.md file.

Community

More Repositories

1

kitex

Go RPC framework with high-performance and strong-extensibility for building micro-services.
Go
6,844
star
2

netpoll

A high-performance non-blocking I/O networking framework, which focused on RPC scenarios, developed by ByteDance.
Go
2,325
star
3

hertz

A high-performance and strong-extensibility Go HTTP framework that helps developers build microservices.
Go
1,161
star
4

goref

Go heap object reference analysis tool
Go
541
star
5

sonic-rs

A fast Rust JSON library based on SIMD.
Rust
379
star
6

shmipc-go

A high performance inter-process communication golang library developed by CloudWeGo
Go
348
star
7

biz-demo

Business Demo for CloudWeGo
Go
146
star
8

dynamicgo

Dynamically and efficiently operate RPC data for Go
Go
141
star
9

pilota

A thrift and protobuf implementation in pure rust with high performance and extensibility.
Rust
120
star
10

frugal

A very fast dynamic Thrift serializer & deserializer.
Go
112
star
11

cwgo

An all-in-one code generation tool for CloudWeGo
Go
102
star
12

thriftgo

An implementation of thrift compiler in go language.
Go
99
star
13

cloudwego.github.io

Website for CloudWeGo
JavaScript
59
star
14

kitex-examples

Go
50
star
15

netpoll-http2

Go
43
star
16

kitex-benchmark

Go
31
star
17

netpoll-benchmark

Go
18
star
18

hertz-examples

Examples for Hertz.
Go
18
star
19

localsession

transparently transmit context within or between goroutines
Go
18
star
20

configmanager

Go
10
star
21

kitex-tests

Tests for cloudwego/kitex
Go
2
star
22

netpoll-examples

Go
2
star
23

thrift-gen-validator

thrift-gen-validator is a thriftgo plugin to generate struct validators.
Go
2
star
24

.github

1
star
25

community

Governance and community material for CloudWeGo and its open source sub-projects
1
star
26

gopkg

Go
1
star