connect-es
buf
Our great sponsors
connect-es | buf | |
---|---|---|
13 | 39 | |
1,202 | 8,232 | |
3.4% | 2.4% | |
9.2 | 9.5 | |
6 days ago | 2 days ago | |
TypeScript | 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.
connect-es
-
I Reviewed 1,000s of Opinions on gRPC
> However, it's important to note that browser support wasn't a primary focus in gRPC's design. This oversight necessitates an additional component, grpc-web, for browser accessibility. Furthermore, external services often have specific needs like caching and load balancing, which are not directly catered to by gRPC. Adopting gRPC for external services might require bespoke solutions to support these features.
The article should mention the Connect protocol for web-based Protobuf messaging:
https://connectrpc.com/
-
Creating the Local First Stack
We can solve this with a service! Now there are many ways I could have started, but I decided to test out gRPC along the way. This was a mistake. I hoped for the best, but gRPC ended up not being a good choice for the web client. Why? you ask. The gRPC protocol works with all the bells and whistles of http when used server to server, but web clients are not as great. The Javascript client is dependent on http 2.0, and it requires a proxy like Envoy to work with a browser. What's more, I didn't love the structure of the generated web client. So through the process of working on this 'local first stack' I actually got sucked in to a big rabbit hole in making the rpc system work. I ended up going with Connect which is a tool that can create a service from a protobuf service definition, that also talks a simple http 1.1 protocol. What ultimately sold me on this solution as the best is that it also came with a very nice to use web client generation, and even plugs in to my favorite react http helper useQuery.
-
Leveraging Temporal for resilient remote procedure calls (RPC)
Our stack at Escape is written in multiple languages because each team has specific needs. We use TypeScript for its vibrant ecosystem, Python for cybersecurity research and Go for performance-sensitive tasks. To orchestrate cross-language task orchestration, we first developed a simple request-response protocol over HTTP, but it wasn't sustainable as the Escape codebase grew rapidly. We evaluated several technologies to replace our homegrown protocol, and two emerged as the most promising options: Connect and Temporal. The title gives it away, but the reason is far from obvious
- Connect RPC – A Better gRPC
-
Building a modern gRPC-powered microservice using Node.js, Typescript, and Connect
protobuf messages we’ll configure (@bufbuild/connect-es)
-
TypeScript type safety with GO
try https://github.com/bufbuild/connect-web
-
Ask HN: Why isn't JSON-RPC more widely adopted?
As for better gRPC-web, you might want to look into connect-web https://github.com/bufbuild/connect-web
- When to use gRPC vs GraphQL
-
Protobuf-ES: The Protocol Buffers TypeScript/JavaScript runtime we all deserve
They already have! Connect (https://github.com/bufbuild/connect-web) is what you're looking for, as it's grpc-web compatible.
-
Connect-Web: It's time for Protobuf/gRPC to be your first choice in the browser
Ye, fwiw there is an example code size comparison here:
https://github.com/bufbuild/connect-web/blob/main/packages/c...
I'm sure someone will chime in on the implementation details, but hopefully others can give it a try with their projects!
buf
-
5 Open Source tools written in Golang that you should know about
The Buf CLI is a versatile tool designed for handling Protocol Buffers (Protobuf), a method of serializing structured data. It offers several key features, including managing Protobuf assets through the Buf Schema Registry (BSR), providing a linter to enforce optimal API design and structure, and a breaking change detector to maintain compatibility either in source code or at the wire level. Additionally, the Buf CLI includes a generator that activates plugins based on user-defined templates and a formatter to standardize the formatting of Protobuf files according to industry norms. It also integrates seamlessly with the Buf Schema Registry, supporting comprehensive dependency management.
-
Create Production-Ready SDKs With gRPC Gateway
We'll use the Buf CLI as an alternative to protoc so that we can save our generation configuration as YAML. Buf is compatible with protoc plugins.
-
gut: convert golang structs to typescript interfaces
Not so much anymore! Take a look at buf.build, it makes the whole thing notoriously easy :)
-
Flutter + gRPC for Desktop and Mobile App Development - Good choice?
In my opinion it's a good idea, it's the architecture we use at work, and it works well for us. The main limitation to be aware of is that many PaaS don't support gRPC traffic (because of the proxies used). For example, DigitalOcean App Platform or Heroku if I remember correctly. If the way you want to host your backend is OK with HTTP/2 and gRPC traffic, then it's not a limitation. One way around this limitation is to use the gRPC-Web protocol, or the Connect protocol (https://connect.build/). Unfortunately, Dart's gRPC client does not support the gRPC-Web protocol outside the web platform. So for a mobile application, it's not usable at the moment. (If this PR were accepted, it would solve the issue: https://github.com/grpc/grpc-dart/pull/557.) As for Connect, no client is currently offered by Buf for Dart. Don't hesitate if you want to know more. That said, I'd advise you to use the Connect implementation for Go to implement your backend. Connect will enable your server to speak all three protocols (gRPC, gRPC-Web and Connect), which is very useful in the long term. What's more, the code is cleaner, and you benefit from official support for observability with OpenTelemetry. If you don't know Buf (the creators of Connect),I suggest you visit their website: https://buf.build/. :-) Good luck!
-
Building a modern gRPC-powered microservice using Node.js, Typescript, and Connect
As mentioned in the intro, we are going to use Buf and Connect as our tools. We’ll start by installing the dependencies.
-
Building High-Performance Web Services with Golang gRPC
gRPC itself is quite nice, especially with buf which makes generating Go code much easier. The rest of the code was in a bad state. Unmaintained router packages, repository pattern without any actual benefit or a repository pattern.
-
gRPC vs REST: Comparing API Styles in Practice
The second big difference is that we now have auto-generated client and server stubs. For this task, I chose to use buf and the protobuf-ts plugin in order to generate idiomatic Typescript classes and objects. Not only do these classes describe the types we'll use in the server and client, but also includes the actual gRPC implementations used to serialize and send messages back and forth across the wire.
-
Show HN: ProtoCURL, a Curl for Protobuf
Our team has been using Buf (https://buf.build) recently, and they have a nice solution for schema dependency management.
-
Resources for getting into cloud computing?
I've found that https://buf.build/ is easier to use than protoc directly.
-
Issues with proxying gRPC services to web, and a potential prototype
Consider checking out https://connect.build from https://buf.build. Supports a simpler protocol than grpc-web. Includes a js/ts client for frontend. Then you don’t necessarily need a rest layer, but could leverage the proxy your building.
What are some alternatives?
protobuf-es - Protocol Buffers for ECMAScript. The only JavaScript Protobuf library that is fully-compliant with Protobuf conformance tests.
protoc-gen-validate - Protocol Buffer Validation - Being replaced by github.com/bufbuild/protovalidate
grpc-web - gRPC for Web Clients
prototool - Your Swiss Army Knife for Protocol Buffers
ts-proto - An idiomatic protobuf generator for TypeScript
fastify-autoroutes - fastest way to map directories to URLs in fastify
goprotobuf - Go support for Google's protocol buffers
gRPC - The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)
connect-go - Moved to https://github.com/connectrpc/connect-go
oapi-codegen - Generate Go client and server boilerplate from OpenAPI 3 specifications