raft
grpc-go
Our great sponsors
raft | grpc-go | |
---|---|---|
7 | 29 | |
7,787 | 19,726 | |
1.5% | 1.4% | |
6.1 | 9.5 | |
3 days ago | about 8 hours ago | |
Go | Go | |
Mozilla Public License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
raft
-
Leader election library
Depending on your exact needs, you could try HashiCorp's Raft implementation: https://github.com/hashicorp/raft
-
Implementing a distributed key-value store on top of implementing Raft in Go
I have found the performance tests very tricky to get to pass without having any input from others. The assignment is really very unforgiving, I would wager the test suite is comparable to how commercial Raft implementations are tested (e.g. https://github.com/hashicorp/raft)
- Raft Is So Fetch: The Raft Consensus Algorithm Explained Through Mean Girls
-
Concurrency in Go is hard
While searching on GitHub, I found a pull request in the Raft implementation by Hashicorp (a distributed consensus algorithm), which we can use to demonstrate the following problem. Let’s start by showing the code (at api.go):
-
rqlite, the light distributed database built with Go and SQLite, v7.2 now with autoclustering via DNS and DNS SRV
Production-grade distributed consensus system.
-
Raft Consensus Protocol
In general Hashicorp's repos are high quality:
https://github.com/hashicorp/raft
Example application: https://github.com/Jille/raft-grpc-example
grpc-go
-
Reverse Engineering Protobuf Definitions from Compiled Binaries
The reflection service is open-sourced (at least for some sdks):
* https://github.com/grpc/grpc-go/blob/master/Documentation/se...
* https://chromium.googlesource.com/external/github.com/grpc/g...
-
gRPC Name Resolution & Load Balancing on Kubernetes: Everything you need to know (and probably a bit more)
We’re hoping to make this rate at least optional via this pull request but as the time of writing this blog, it’s nothing we can do to circle our way around it.
-
Full Stack Forays with Go and gRPC
First, I started with gRPC’s recommended starter repository for learning gRPC, their **helloworld **example, which is a part of the official gRPC repository.
-
Tools besides Go for a newbie
IDE: use whatever make you productive. I personally use vscode. VCS: git, as golang communities use github heavily as base for many libraries. AFAIK Linter: use staticcheck for linting as it looks like mostly used linting tool in go, supported by many also. In Vscode it will be recommended once you install go plugin. Libraries/Framework: actually the standard libraries already included many things you need, decent enough for your day-to-day development cycles(e.g. `net/http`). But here are things for extra: - Struct fields validator: validator - Http server lib: chi router , httprouter , fasthttp (for non standard http implementations, but fast) - Web Framework: echo , gin , fiber , beego , etc - Http client lib: most already covered by stdlib(net/http), so you rarely need extra lib for this, but if you really need some are: resty - CLI: cobra - Config: godotenv , viper - DB Drivers: sqlx , postgre , sqlite , mysql - nosql: redis , mongodb , elasticsearch - ORM: gorm , entgo , sqlc(codegen) - JS Transpiler: gopherjs - GUI: fyne - grpc: grpc - logging: zerolog - test: testify , gomock , dockertest - and many others you can find here
-
Curl 8.0.1 because I jinked it
If you read the first comment, you’ll see the API was documented as being experimental.
https://github.com/grpc/grpc-go/issues/3798#issuecomment-670...
-
When is go not a good choice?
The lack of this analysis still results in bugs and CVEs. See how many races are found and fixed in gRPC releases: https://github.com/grpc/grpc-go/releases (search "race"). It's a shame Google does not publish these as CVEs, because many of them qualify.
-
Rust for backend. Is it recommended?
I like to point people at this release to show that not even Google -- in its own language on its own library for its own RPC protocol -- can write thread-safe Go, so what chance does anyone else have. Maybe we have to stop thinking of Go as a language for mission critical parallel computing and think of it more like a Python 4 made for low-risk prototyping. Mature libraries help for that prototyping, you know how to put them together and get something working, that something just won't be scaleable, efficient, or thread-safe.
-
goRPC or gRPC?
I don't have any experience with goRPC (I'm assuming you're referring to https://github.com/valyala/gorpc), but just to note that that repo hasn't been updated in 7 years and has open issues that are that old, too. https://github.com/grpc/grpc-go has 17.5k stars and is actively maintained. That doesn't say anything about their relative performance - goRPC might be faster - but you probably won't have a fun time if you run into issues.
-
Golang is evil on shitty networks
Found the root cause from https://github.com/grpc/grpc-go/commit/383b1143 (original issue: https://github.com/grpc/grpc-go/issues/75):
// Note that ServeHTTP uses Go's HTTP/2 server implementation which is
-
a tool for quickly creating web and microservice code
RPC framework grpc
What are some alternatives?
serf - Service orchestration and management tool.
rpcx - Best microservices framework in Go, like alibaba Dubbo, but with more features, Scale easily. Try it. Test it. If you feel it's better, use it! 𝐉𝐚𝐯𝐚有𝐝𝐮𝐛𝐛𝐨, 𝐆𝐨𝐥𝐚𝐧𝐠有𝐫𝐩𝐜𝐱! build for cloud!
validator - :100:Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving
tendermint - ⟁ Tendermint Core (BFT Consensus) in Go
go-zero - A cloud-native Go microservices framework with cli tool for productivity.
torrent - Full-featured BitTorrent client package and utilities
go-micro - A Go microservices framework
Echo - High performance, minimalist Go web framework
KrakenD - Ultra performant API Gateway with middlewares. A project hosted at The Linux Foundation
dragonboat - A feature complete and high performance multi-group Raft library in Go.
etcd - Distributed reliable key-value store for the most critical data of a distributed system [Moved to: https://github.com/etcd-io/etcd]
hprose - Hprose is a cross-language RPC. This project is Hprose for Golang.