twirp
drpc
Our great sponsors
twirp | drpc | |
---|---|---|
30 | 9 | |
6,778 | 1,423 | |
0.6% | 1.4% | |
3.0 | 4.9 | |
5 days ago | 15 days ago | |
Go | Go | |
Apache License 2.0 | MIT License |
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.
twirp
-
I Reviewed 1,000s of Opinions on gRPC
The next time I want to build an API, I will probably make use of https://github.com/twitchtv/twirp. I like working with Protobuf and having strongly-typed and well-defined messages, but gRPC is way, way too much. It's obviously a Google product, built for what Google needs.
Use Protobuf for messages, but just use HTTP for transport.
- How do I provide bot RPC and REST endpoints?
- Reasons to use gRPC/Protobuf?
-
A detailed comparison of REST and gRPC
- Twirp (Twitch light version of gRPC, with optional JSON encoding, HTTP1 support and without streaming) - https://github.com/twitchtv/twirp
-
goRPC or gRPC?
There is another: twirp
-
TypeScript type safety with GO
And addition to what was mentioned there are also webrpc and twirp.
-
GraphQL making its way into a Twitter discussion about latency is not what I expected
Twitch has a great framework for it https://twitchtv.github.io/twirp/docs/intro.html
-
swaggo/swag alternative, but should generate OpenAPI 3.0 spec file
We have better experience with https://goa.design/ than with https://github.com/twitchtv/twirp
-
Connect-Web: It's time for Protobuf/gRPC to be your first choice in the browser
Take a look at Twirp (https://github.com/twitchtv/twirp) open sourced by TwitchTv. It's a lot lighter weight than gRPC. It does use Protobufs but addresses some of the concerns you mentioned, such as being able to test with JSON payloads, works over HTTP 1.1 and HTTP/2, good client libraries, and doesn't require a proxy.
They address your concerns in more detail in the Twirp release announcement (2018) - https://blog.twitch.tv/en/2018/01/16/twirp-a-sweet-new-rpc-f...
-
Best SPA Typescript <-> Golang integration
Twirp is nice. You can code-gen the front end and the backend code and you get swagger for free if you want it
drpc
-
Experience report: Converting from Google gRPC to Buf's Connect RPC (with gRPC compatibility)
i had try drpc https://github.com/storj/drpc , it's good for my project, but , connect-go https://github.com/bufbuild/connect-go is better, for me, maybe is best one.
-
Cap'n Proto 0.9
> But I do long for a simpler alternative
If you're happy with protobuf but just not with gRPC, you can check out Twirp [1] and DRPC [2]. Both aim to be simpler alternatives while keeping protobuf for serialization. Their development is Go focused though.
-
Introducing DRPC: The Storj Replacement for gRPC
As long as you only need non-streaming RPCs, you don't need a gateway because the type you register your services with comes with a ServeHTTP method. Additionally, you can use the drpcmigrate package to serve both the built in wire format as well as that http server on the same port, as demonstrated in this example.
Here's an example of our HTTP+JSON gateway, if that sufficiently scratches that itch: https://github.com/storj/drpc/tree/main/examples/drpc_and_http
It does not. It has its own wire format designed to be simple to parse and implement (https://pkg.go.dev/storj.io/[email protected]/drpcwire). But, because it was designed to be extensible and open to introspection, there is a package that allows you to serve the same service over HTTP (https://github.com/storj/drpc/blob/main/drpcmux/serve_http.go) but that's not required at all.
Seems like it can also serve a http/json api. Neat!
Someone opened an issue talking about adding websocket support. Since it seems fairly easy to add, I'll probably write an external package to do it so that DRPC's dependencies don't grow.
That said, if you only care about unitary requests over http, there's an example that exposes a server that responds to both the wire format as well as http requests on the same port here: https://github.com/storj/drpc/tree/main/examples/drpc_and_http
We actually do use gogoproto internally. The code generator has a `protolib` option that knows about gogo, or lets you implement your own marshal/unmarshal calls: https://github.com/storj/drpc/blob/main/internal/integration/doc.go#L8
What are some alternatives?
grpc-go - The Go language implementation of gRPC. HTTP/2 based RPC
grpc-web - gRPC Web implementation for Golang and TypeScript
prisma-client-go - Prisma Client Go is an auto-generated and fully type-safe database client
swagger-petstore - swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
protobuf-ts - Protobuf and RPC for TypeScript
Protobuf - Protocol Buffers - Google's data interchange format
gRPC - The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)
chi - lightweight, idiomatic and composable router for building Go HTTP services
protoactor-go - Proto Actor - Ultra fast distributed actors for Go, C# and Java/Kotlin
client_golang - Prometheus instrumentation library for Go applications
capnproto-dotnetcore - A Cap'n Proto implementation for .NET Standard and .NET Core
otpauth - Google Authenticator migration decoder