buf VS grpc-web

Compare buf vs grpc-web and see what are their differences.

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
buf grpc-web
39 33
8,183 8,285
1.8% 0.8%
9.6 6.5
5 days ago 14 days ago
Go JavaScript
Apache License 2.0 Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.

buf

Posts with mentions or reviews of buf. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-15.
  • 5 Open Source tools written in Golang that you should know about
    5 projects | dev.to | 15 Dec 2023
    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
    5 projects | dev.to | 8 Dec 2023
    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
    4 projects | /r/golang | 29 May 2023
    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?
    4 projects | /r/FlutterDev | 29 May 2023
    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
    15 projects | dev.to | 20 Apr 2023
    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
    2 projects | /r/golang | 17 Apr 2023
    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
    6 projects | dev.to | 21 Feb 2023
    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
    4 projects | news.ycombinator.com | 20 Feb 2023
    Our team has been using Buf (https://buf.build) recently, and they have a nice solution for schema dependency management.
  • Issues with proxying gRPC services to web, and a potential prototype
    4 projects | /r/golang | 12 Feb 2023
    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.
  • Connect-Swift: You’ll actually want to use Protobuf on iOS!
    2 projects | /r/grpc | 18 Jan 2023
    Today, Buf announced Connect-Swift - an open-source library that generates lightweight, modern, idiomatic Swift client APIs and mocks using Protobuf schemas. I was the author of this library, and would love to hear feedback from the community!

grpc-web

Posts with mentions or reviews of grpc-web. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-08-14.
  • Ask HN: WebSocket server transforming channel subscriptions to gRPC streams
    2 projects | news.ycombinator.com | 14 Aug 2023
    * Additionally, client can stream data to the backend server (if bidirectional GRPC streams are used). I.e. client sends WebSocket messages, those will be transformed to GRPC messages by WebSocket server and delivered to the application backend.

    As a result we have a system which allows to quickly create individual streams by using strict GRPC contract but terminating connections over WebSocket transport. So it works well in web browsers. After that no need to write WebSocket protocol, client implementation, handle WebSocket connection. This all will be solved by a suggested WebSocket server and its client SDKs.

    The mechanics is similar to Websocketd (https://github.com/joewalnes/websocketd), but instead of creating OS processes we create GRPC streams. The difference from grpc-web (https://github.com/grpc/grpc-web) is that we provide streaming capabilities but not exposing GRPC contract to the client - just allowing to stream any data as payload (both binary and text) with some wrappers from our client SDKs side for managing subscriptions. I.e. it's not native GRPC streams on the client side - we expose just Connection/Subscription object to stream in both directions. GRPC streams used only for communication between WebSocket server and backend. To mention - grpc-web does not support all kinds of streaming now (https://github.com/grpc/grpc-web#streaming-support) while proposed solution can. This all should provide a cross-platform way to quickly write streaming apps due to client SDKs and language-agnostic nature of GRPC.

    I personally see both pros and cons in this scheme (without concentrating on both too much here to keep the question short). I spent some time thinking about this myself, already have some working prototypes – but turned out need more opinions before moving forward with the idea and releasing this, kinda lost in doubts.

    My main question - whether this seems interesting for someone here? Do you find this useful and see practical value?

  • Build and Deploy a gRPC-Web App Using Rust Tonic and React
    7 projects | dev.to | 19 Jul 2023
    By default, web browsers do not support gRPC, but we will use gRPC-web to make it possible.
  • Lemmy v0.18.0 Release - A reddit alternative written in Rust.
    2 projects | /r/rust | 23 Jun 2023
    You just have to use a library implementation for JavaScript https://github.com/grpc/grpc-web
  • Full Stack Forays with Go and gRPC
    5 projects | dev.to | 5 Jun 2023
    TypeScript support remains an experimental feature of gRPC.
  • Introducing Tempo: low latency, cross-platform, end-to-end typesafe APIs
    12 projects | /r/programming | 2 May 2023
    The gRPC-Web protocol supports HTTP/1 and can be used from a browser.
  • gRPC on the client side
    9 projects | dev.to | 16 Mar 2023
    -- grpc-web
  • gRPC vs REST: Comparing API Styles in Practice
    6 projects | dev.to | 21 Feb 2023
    Since we're using Envoy, there's one more neat trick that we can employ. It turns out that Envoy also support gRPC-Web out of the box, a JavaScript client designed to support gRPC communication from the browser! That means that we can send gRPC messages over HTTP/1.1 as base64 encoded strings or as binary protobufs. Messages will be sent through our proxy and on to our backend service. The advantage of this is smaller and more efficient wire communication which should lead to better performance.
  • Understanding gRPC Concepts, Use Cases & Best Practices
    9 projects | dev.to | 15 Jan 2023
    protoc-gen-grpc-web — a plugin that allows our front end to communicate with the backend using gRPC calls. A separate blog post on this coming up in the future.
  • Ask HN: Why isn't JSON-RPC more widely adopted?
    11 projects | news.ycombinator.com | 2 Jan 2023
    Personally, find gRPC-Web very attractive but the current state of TypeScript/JS code-gen is very confusing and lacking.

    I would love something like https://orval.dev for gRPC-web. Have I missed something or is it just early to expect it?

    I tried a few libraries but couldn't get them to work or would generate unappealing results. I believe I'm hitting this issue with my local experiments. https://github.com/grpc/grpc-web/issues/535

  • You worked on it? Why is it slow then?
    2 projects | /r/ProgrammerHumor | 13 Nov 2022
    Seeing this I went right into the code and found the gem, grpc-web is responsible for browser support. Official Docs

What are some alternatives?

When comparing buf and grpc-web you can also consider the following projects:

protoc-gen-validate - Protocol Buffer Validation - Being replaced by github.com/bufbuild/protovalidate

prototool - Your Swiss Army Knife for Protocol Buffers

ngx-grpc - Angular gRPC framework

grpc-over-webrtc - gRPC over WebRTC

grpcurl - Like cURL, but for gRPC: Command-line tool for interacting with gRPC servers

webrpc - webrpc is a schema-driven approach to writing backend services for modern Web apps and networks

evans - Evans: more expressive universal gRPC client

ts-proto - An idiomatic protobuf generator for TypeScript

goprotobuf - Go support for Google's protocol buffers

pub-dev - The pub.dev website

wombat - Cross platform gRPC client

Centrifugo - Scalable real-time messaging server in a language-agnostic way. Self-hosted alternative to Pubnub, Pusher, Ably. Set up once and forever.