Protobuf VS buf

Compare Protobuf vs buf and see what are their differences.

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
Protobuf buf
174 39
63,657 8,232
0.5% 1.0%
10.0 9.5
6 days ago 6 days ago
C++ Go
GNU General Public License v3.0 or later 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.

Protobuf

Posts with mentions or reviews of Protobuf. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-29.
  • Hitting every branch on the way down
    4 projects | news.ycombinator.com | 29 Apr 2024
    It's because they changed the versioning format: https://github.com/protocolbuffers/protobuf/releases?page=5

    But I suppose old version still receive bugfixes.

  • Reverse Engineering Protobuf Definitions from Compiled Binaries
    5 projects | news.ycombinator.com | 9 Mar 2024
    For at least 4 years protobuf has had decent support for self-describing messages (very similar to avro) as well as reflection

    https://github.com/protocolbuffers/protobuf/blob/main/src/go...

    Xgooglers trying to make do on the cheap will just create a Union of all their messages and include the message def in a self-describing message pattern. Super-sensitive network I/O can elide the message def (empty buffer) and any for RecordIO clone well file compression takes care of the definition.

    Definitely useful to be able to dig out old defs but protobuf maintainers have surprisingly added useful features so you don’t have to.

    Bonus points tho for extracting the protobuf defs that e.g. Apple bakes into their binaries.

  • Show HN: AuthWin – Authenticator App for Windows
    6 projects | news.ycombinator.com | 3 Mar 2024
  • Create Production-Ready SDKs With gRPC Gateway
    5 projects | dev.to | 8 Dec 2023
    gRPC Gateway is a protoc plugin that reads gRPC service definitions and generates a reverse proxy server that translates a RESTful JSON API into gRPC.
  • Create Production-Ready SDKs with Goa
    9 projects | dev.to | 22 Nov 2023
    To use more recent versions of protoc in future applications, you can download them from the Protobuf repository.
  • Roll your own auth with Rust and Protobuf
    5 projects | dev.to | 28 Oct 2023
    Use the Protobuf CLI protoc and the plugin protoc-gen-tonic.
  • Add extra stuff to a “standard” encoding? Sure, why not
    11 projects | news.ycombinator.com | 19 Sep 2023
    > didn’t find any standard for separating protobuf messages

    The fact that protobufs are not self-delimiting is an endless source of frustration, but I know of 2 standards:

    - SerializeDelimited* is part of the protobuf library: https://github.com/protocolbuffers/protobuf/blob/main/src/go...

    - Riegeli is "a file format for storing a sequence of string records, typically serialized protocol buffers. It supports dense compression, fast decoding, seeking, detection and optional skipping of data corruption, filtering of proto message fields for even faster decoding, and parallel encoding": https://github.com/google/riegeli

  • Block YouTube Ads on AppleTV by Decrypting and Stripping Ads from Profobuf
    11 projects | news.ycombinator.com | 26 Aug 2023
    It looks like it is in fact universal. Just glancing at the code here, it looks like the tool searches any arbitrary file for bytes that look like encoded protobuf descriptors, specifically looking for bytes that are plausibly the beginning of a FileDescriptorProto message defined here:

    https://github.com/protocolbuffers/protobuf/blob/main/src/go...

    This takes advantage of the fact that such descriptors are commonly compiled into programs that use protobuf. The descriptors are usually embedded as constant byte arrays. That said, not all protobuf implementations embed the descriptors and those that do often have an option to inhibit such embedding (at the expense of losing some dynamic introspection features).

  • How to learn to use protoc in 21 easily infuriating steps
    1 project | news.ycombinator.com | 12 Aug 2023
  • What's involved in protobuf encoding?
    1 project | /r/grpc | 28 Jul 2023
    Not much. You can check the source code in https://github.com/protocolbuffers/protobuf. For example, for serializing a boolean in C#: https://github.com/protocolbuffers/protobuf/blob/main/csharp/src/Google.Protobuf/WritingPrimitives.cs#L165. Strings and objects are a bit more complicated, but it is all about turning the data into its byte representation.

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.
  • Resources for getting into cloud computing?
    1 project | /r/golang | 19 Feb 2023
    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
    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.

What are some alternatives?

When comparing Protobuf and buf you can also consider the following projects:

FlatBuffers - FlatBuffers: Memory Efficient Serialization Library

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

SBE - Simple Binary Encoding (SBE) - High Performance Message Codec

prototool - Your Swiss Army Knife for Protocol Buffers

MessagePack - MessagePack implementation for C and C++ / msgpack.org[C/C++]

grpc-web - gRPC for Web Clients

cereal - A C++11 library for serialization

goprotobuf - Go support for Google's protocol buffers

Apache Parquet - Apache Parquet

gRPC - The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)

Bond - Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services.

oapi-codegen - Generate Go client and server boilerplate from OpenAPI 3 specifications