Buf raises $93M to deprecate REST/JSON

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • pronto

    Protobuf ORM (by CaperAi)

  • 5. Message streaming (gRPC streams are amazing)

    I can think of a whole host of features that can be built off of protos (I've even built ORMs off of protobuffs for simple things [0]). The value prop is there IMO. HTTP + json APIs are a local minima. The biggest concerns "I want to be able to view the data that is being sent back and forth" is a tooling consideration (curl ... isn't showing you the voltages from the physical layer, it is decoded). Buff is building that tooling.

    [0] - https://github.com/CaperAi/pronto

  • gRPC

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

  • `proto_library` for building the `.bin` file from protos works great. Generating stubs/messages for "all" languages does not. Each language does not want to implement gRPC rules, the gRPC team does not want to implement rules for each language. Sort of a deadlock situation. For example:

    - C++: https://github.com/grpc/grpc/blob/master/bazel/cc_grpc_libra...

    - Python: https://github.com/grpc/grpc/blob/master/bazel/python_rules....

    - ObjC: https://github.com/grpc/grpc/blob/master/bazel/objc_grpc_lib...

    - Java: https://github.com/grpc/grpc-java/blob/master/java_grpc_libr...

    - Go (different semantics than all of the other): https://github.com/bazelbuild/rules_go/blob/master/proto/def...

    But there's also no real cohesion within the community. The biggest effort to date has been in https://github.com/stackb/rules_proto which integrates with gazelle.

    tl;dr: Low alignment results in diverging implementations that are complicated to understand for newcomers. Buff's approach is much more appealing as it's a "this is the one way to do the right thing" and having it just work by detecting `proto_library` and doing all of the linting/registry stuff automagically in CI would be fantastic.

  • 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.

    InfluxDB logo
  • gRPC

    The Java gRPC implementation. HTTP/2 based RPC

  • `proto_library` for building the `.bin` file from protos works great. Generating stubs/messages for "all" languages does not. Each language does not want to implement gRPC rules, the gRPC team does not want to implement rules for each language. Sort of a deadlock situation. For example:

    - C++: https://github.com/grpc/grpc/blob/master/bazel/cc_grpc_libra...

    - Python: https://github.com/grpc/grpc/blob/master/bazel/python_rules....

    - ObjC: https://github.com/grpc/grpc/blob/master/bazel/objc_grpc_lib...

    - Java: https://github.com/grpc/grpc-java/blob/master/java_grpc_libr...

    - Go (different semantics than all of the other): https://github.com/bazelbuild/rules_go/blob/master/proto/def...

    But there's also no real cohesion within the community. The biggest effort to date has been in https://github.com/stackb/rules_proto which integrates with gazelle.

    tl;dr: Low alignment results in diverging implementations that are complicated to understand for newcomers. Buff's approach is much more appealing as it's a "this is the one way to do the right thing" and having it just work by detecting `proto_library` and doing all of the linting/registry stuff automagically in CI would be fantastic.

  • rules_go

    Go rules for Bazel

  • `proto_library` for building the `.bin` file from protos works great. Generating stubs/messages for "all" languages does not. Each language does not want to implement gRPC rules, the gRPC team does not want to implement rules for each language. Sort of a deadlock situation. For example:

    - C++: https://github.com/grpc/grpc/blob/master/bazel/cc_grpc_libra...

    - Python: https://github.com/grpc/grpc/blob/master/bazel/python_rules....

    - ObjC: https://github.com/grpc/grpc/blob/master/bazel/objc_grpc_lib...

    - Java: https://github.com/grpc/grpc-java/blob/master/java_grpc_libr...

    - Go (different semantics than all of the other): https://github.com/bazelbuild/rules_go/blob/master/proto/def...

    But there's also no real cohesion within the community. The biggest effort to date has been in https://github.com/stackb/rules_proto which integrates with gazelle.

    tl;dr: Low alignment results in diverging implementations that are complicated to understand for newcomers. Buff's approach is much more appealing as it's a "this is the one way to do the right thing" and having it just work by detecting `proto_library` and doing all of the linting/registry stuff automagically in CI would be fantastic.

  • rules_proto

    Bazel build rules for protobuf / gRPC (now with gazelle)

  • `proto_library` for building the `.bin` file from protos works great. Generating stubs/messages for "all" languages does not. Each language does not want to implement gRPC rules, the gRPC team does not want to implement rules for each language. Sort of a deadlock situation. For example:

    - C++: https://github.com/grpc/grpc/blob/master/bazel/cc_grpc_libra...

    - Python: https://github.com/grpc/grpc/blob/master/bazel/python_rules....

    - ObjC: https://github.com/grpc/grpc/blob/master/bazel/objc_grpc_lib...

    - Java: https://github.com/grpc/grpc-java/blob/master/java_grpc_libr...

    - Go (different semantics than all of the other): https://github.com/bazelbuild/rules_go/blob/master/proto/def...

    But there's also no real cohesion within the community. The biggest effort to date has been in https://github.com/stackb/rules_proto which integrates with gazelle.

    tl;dr: Low alignment results in diverging implementations that are complicated to understand for newcomers. Buff's approach is much more appealing as it's a "this is the one way to do the right thing" and having it just work by detecting `proto_library` and doing all of the linting/registry stuff automagically in CI would be fantastic.

  • schematic

    type-safe JSON spec and validation tool

  • Thanks for Cap'n Proto. I think the article is clearly indicating the issues that a wider community of conventional type systems in their mainstream languages is not fully aware of. And I disagree with your comments. Firstly, I don't like that you are labelling the author of the article as a "PL design theorist who doesn't have a clue":

    > his article appears to be written by a programming language design theorist who, unfortunately, does not understand (or, perhaps, does not value) practical software engineering.

    I'm not the author, but they mention their prior industrial experience at Google with protobufs.

    I'm not a PL theorist either, and I see that you don't fully understand the problems of composability, compatibility, and versioning and are too eager to dismiss them based on your prior experience with inferior type suystems. And here's why I think it is:

    > > This is especially true when it comes to protocols, because in a distributed system, you cannot update both sides of a protocol simultaneously. I have found that type theorists tend to promote "version negotiation" schemes where the two sides agree on one rigid protocol to follow, but this is extremely painful in practice: you end up needing to maintain parallel code paths, leading to ugly and hard-to-test code. Inevitably, developers are pushed towards hacks in order to avoid protocol changes, which makes things worse.

    You are conflating your experience with particular conventional tooling with the general availability of superior type systems and toolings out there. There's a high demand in utilising their properties in protocol design today.

    Version negotiation is not the only option available to a protocol designer. It is possible to implicitly migrate and up/down-cast schemas in semi-automated way. Example [1]

    > This seems to miss the point of optional fields. Optional fields are not primarily about nullability but about compatibility. Protobuf's single most important feature is the ability to add new fields over time while maintaining compatibility.

    There are at least two ways to achieve compatibility, and the optional fields that expand a domain type to the least common denominator of all encompassing possibilities is the wrong solution to this. Schema evolition via unions and versioning is the proper approach that allows for automatic resolution of compatibility issues.

    > Real-world practice has also shown that quite often, fields that originally seemed to be "required" turn out to be optional over time, hence the "required considered harmful" manifesto. In practice, you want to declare all fields optional to give yourself maximum flexibility for change.

    This is false. In practice I want a schema versioning and deprecation policies, and not ever-growing domain expansion to the blob of all-optional data.

    > It's that way because the "oneof" pattern long-predates the "oneof" language construct. A "oneof" is actually syntax sugar for a bunch of "optional" fields where exactly one is expected to be filled in.

    this is not true either, and it doesn't matter what pattern predates which other pattern. Tagged unions are neither a language construct nor a syntax sugar, it's a property of Type Algebra where you have union- and product-compositions. Languages that implement Type Algebra don't do it to just add another fancy construct, they do it to benefit from mathematical foundations of these concepts.

    > How do you make this change without breaking compatibility?

    you version it, and migrate over time at your own pace without bothering your clients too often [1]

    [1] https://github.com/typeable/schematic#migrations

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts