googleapis
twirp
googleapis | twirp | |
---|---|---|
13 | 30 | |
6,522 | 6,836 | |
1.0% | 0.5% | |
9.6 | 3.5 | |
4 days ago | about 1 month ago | |
Starlark | Go | |
Apache 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.
googleapis
-
REST vs gRPC
Rich Error Model: This model enables servers to return and clients to consume additional error details expressed as one or more protobuf messages. It further specifies a standard set of error message types to cover the most common error (QuotaFailure, PreconditionFailure, BadRequest, etc). When an error occurs, the server returns the appropriate status code along with an optional error message.
-
Mullvad Leta
They list search in their public api
https://github.com/googleapis/googleapis/blob/288aa7fb71c9b6...
-
Reasons to use gRPC/Protobuf?
We structure the repo according to proto packages. It's quite similar to how the googleapis repository is structured.
-
Problem Details for HTTP APIs
It's unfortunate that the spec doesn't contain custom fields to a sub-object like other RPC specs, like proto Status [1]. They should have had the message go into a field named "message" and not "detail". And have a field like "details" where the opaque type is serialized, which should be named by the "type" field. The problem is that systems with existing error types may have field name conflicts with type, title, status, detail, or instance, so we'd just dump the actual error into a custom "extension member" which by definition, isn't standard.
[1] https://github.com/googleapis/googleapis/blob/1c8a25ab153eef...
-
[Media] Dear Google, When Rust? Sincerely, Internet
Protobuf (https://github.com/googleapis/googleapis)
-
gRPC vs REST: Comparing API Styles in Practice
All the required changes can be viewed in our last demo, the grpc-rest-app implementation. First, we need to update our proto service interface to help the proxy service make our gRPC service methods available at the right URLs and for the correct HTTP operations. To do this, the Google API HTTP library provides annotations we can add to our proto to describe the correct mappings. The buf tool allows us to include the googleapis dependency as a plugin in our buf.yaml file).
-
Code Design Decision – Always throw custom exceptions
I think this only makes sense if the 3rd party is also throwing custom exceptions.
If you want to reduce coupling you should avoid throwing custom exceptions at all. Semantic information can go in the error message and log. The error type should be used to indicate to your program whether an error is recoverable, retriable or some other action needs to be taken. For example google on has 16 canonical error codes for all APIs.
https://github.com/googleapis/googleapis/blob/master/google/...
-
Microservice Communication
OpenAPI and possibly developing reusable, versioned client libraries could help, but it's a major undertaking that gRPC makes redundant. I'd be tempted to use grpc-gateway even if I had to implement a REST API. Try looking into buf and monorepo structures for proto management, e.g. something like GoogleCloudPlatform/microservices-demo. For more thorough proto and grpc-gateway definition examples, see googleapis/googleapis.
-
Convex vs. Firebase
Firestone does provide global consistency, so the following quote is incorrect:
> In Cloud Firestore, the data on the client are loaded from the database at different points in time. Even if you listen for realtime updates, results from separate queries will not remain in sync. This creates consistency anomalies and bugs in your app.
Here is a link to the protocol documentation that the clients use to support it: https://github.com/googleapis/googleapis/blob/d0b394f188e8c3...
I'd link to the client implementation but it's quite involved.
-
Useful Old Technologies: ASN.1 (2013)
Well there is Timestamp defined as a well known type which is available to all implementations despite not being a primitive type [1]. Plus one is obviously able to define any other custom types if necessary- eg as seen in [2].
[1] https://developers.google.com/protocol-buffers/docs/referenc...
[2] https://github.com/googleapis/googleapis/blob/master/google/...
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.
-
Any good open source python projects that have used GRPC?
If you find one, you maybe also interested in 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...
What are some alternatives?
supabase - The open source Firebase alternative.
drpc - drpc is a lightweight, drop-in replacement for gRPC
powerproto - 🎉 An awesome version control tool for protoc and its related plugins.
grpc-web - gRPC Web implementation for Golang and TypeScript
readyset - Readyset is a MySQL and Postgres wire-compatible caching layer that sits in front of existing databases to speed up queries and horizontally scale read throughput. Under the hood, ReadySet caches the results of cached select statements and incrementally updates these results over time as the underlying data changes.
prisma-client-go - Prisma Client Go is an auto-generated and fully type-safe database client
grpc-gateway - gRPC to JSON proxy generator following the gRPC HTTP spec
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.
gogoprotobuf - [Deprecated] Protocol Buffers for Go with Gadgets
protobuf-ts - Protobuf and RPC for TypeScript
parthenon - The Symfony SaaS boilerplate
Protobuf - Protocol Buffers - Google's data interchange format