Live data from Hacker News

Buf raises $93M to deprecate REST/JSON

buf.build

51–60 of 91 posts

Re: Buf raises $93M to deprecate REST/JSON

#52
Wow, “Oh look, we’re going to re-invent the wheel for what is at least the third time.”

When I worked at Google I sat down one day across from one of the gRPC engineering leads who was talking about the things they were doing for the then current generation of gRPC. I asked if I could ask some questions about it and they agreed and then dissected their design in half a dozen ways that would fail in both non-important but irritating ways, and in critical ways at scale. They were amazed at I had thought about this topic so deeply as it was all “state of the art” and I was, nominally, “old.” I pointed out that I had been the ONC RPC architect at Sun in the ‘80s during the first RPC wars and while the implementations had change, fundamentally messaging as a form of procedure call has some fundamentally bad properties. These challenges manifest in all aspects of RPC, from marshaling data, to rendezvousing, to delivery reliability and guarantees. Andy Birrell at DEC SRC and Leslie Lamport had written dozens of papers looking at these challenges in small systems and large. There was literally decades of solid research that the engineer in front of me at the cafeteria that day was re-discovering from first principles.

RPC protocols from Sun, DEC, Microsoft, OSI, SOAP, the IETF, and the Open Group have run at this problem again and come up with different solutions that each have their own set of warts. Good for some things, not great for others. But at this point there are enough options at this point.

What is missing from Buf’s material is what I might call the “Chesterson’s fence” material that dives into why all of these previous versions were insufficient and how their new version of gRPC will solve all those problems without adding new wrinkles.

I think it is great that they are trying to improve the state of the art, I would feel better about it if they also demonstrated they understood what had come before.

Re: Buf raises $93M to deprecate REST/JSON

#53

Their PR really puts me off. Makes me think the authors are sneering at everyone who uses JSON. And who says they get to deprecate anything?

It reminds me a bit of academic papers whereby an author chooses a specific corner-case of a topic and then beats it up in a rather contrived manner.

Re: Buf raises $93M to deprecate REST/JSON

#54
post #49

Earlier quoted context omitted.

> FWIW, long ago I was the maintainer of Protobuf at Google, including putting together the first open source release. I like what buf is doing -- enough that, full disclosure, I made an angel investment in their seed round. I know this might not be the best way to ask but have they considered creating proto rules for Bazel? The existing proto + gRPC story is pretty unfortunate.

Huh. As the person who literally implemented the original proto_library rule in Blaze (which was later publicly released as "Bazel"), I'm a bit surprised to learn this doesn't work well today... but admittedly I haven't had the opportunity to try Bazel since the public release. What is the story today?

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

Re: Buf raises $93M to deprecate REST/JSON

#55

Earlier quoted context omitted.

Imagine this offering: "Why go through the hassle of generating clients for your service for each language when we can build ergonomic clients automatically" and "Why manually look for breaking changes in your API when we can detect them manually" or "We can give you $AMAZING_FEATURE for free by using a clearer language to describe your api" where your feature could be: 1. Reduced bandwidth ingress 2. Automatic traci…

> Why manually look for breaking changes in your API when we can detect them manually You can't detect all breaking changes automatically. A field can subtly shift semantics on an API level, yet that breaks a workflow for some downstream consumer somewhere. OpenAPI and other API description languages give a clear an unambiguous description of an API that can auto-generate clients just fine. Binary JSON/gzipped JSON i…

> You can't detect all breaking changes automatically. A field can subtly shift semantics on an API level, yet that breaks a workflow for some downstream consumer somewhere.

That is what aip.dev helps with. Following these style guides makes it hard to have ambiguous meaning of a field in an API. Linting APIs is something buff provides.

This isn't a "catch 100%" thing but this is more close to a "catch >XX% of mistakes" which is good enough if it cheap.

> OpenAPI and other API description languages give a clear an unambiguous description of an API that can auto-generate clients just fine.

The last time I used OpenAPI it was very verbose. It wasn't anything like writing code (something I am good at). It was more like writing a large config (something I'm bad at). Protos provide a code-like view on APIs. This is just preference though but I like it.

> Binary JSON/gzipped JSON is frequently very space efficient too.

My assumption is that parsing JSON will require more CPU than protos and much more than flatbuffers. More so when you factor in gzip.

> Using tracing and other advanced techniques require the right knowledge to use, and I don't think it's that common in smaller orgs.

Taking something that's complex and making it easy for people to use sounds like a business prop. Is tracing something people don't do because there's no value or because it's hard to use?

Basically: you don't want to use protos for any one reason. It's a whole ecosystem that makes many things magically better.

Re: Buf raises $93M to deprecate REST/JSON

#56

Yet another non-business grabbing $ from clueless investors. Surely there must be a word for the “we are grabbing $ from clueless investors” business model? WeWork is the poster child for that one.

I mean... I'm one of the investors... I'm also the former maintainer of Protobuf and former startup founder myself... but I could be clueless, yeah.

Re: Buf raises $93M to deprecate REST/JSON

#58

Wow, “Oh look, we’re going to re-invent the wheel for what is at least the third time.” When I worked at Google I sat down one day across from one of the gRPC engineering leads who was talking about the things they were doing for the then current generation of gRPC. I asked if I could ask some questions about it and they agreed and then dissected their design in half a dozen ways that would fail in both non-important…

Note that Buf is building tooling around Protobuf/gRPC, not replacing them.

Maybe I'm just another clueless millennial developer who doesn't understand the history of the 80's or whatever, but I've never been able to understand this claim that RPC is broken. There's a lot of assertions that everyone knows RPC was broken because smart people in the 80's said so but... no one has ever been able to give me a concrete reason why.

RPC, at least as I've always known it, really just boils down to request/response protocols. You send a request, you get a response. While this is admittedly not the only possible networking pattern, it is the dominant one across almost all distributed systems I've worked with. HTTP itself is request/response -- it's basically the same thing.

All gRPC and Protobuf are doing that is different from HTTP is they're using a binary protocol based on explicitly-defined schemas. The protobuf compiler will take your schemas and generate convenient framework code for you, so you don't have to waste your time on boilerplate HTTP and parsing. And the binary encoding is faster and more compact than text-based encoding like JSON or XML. But this is all convenience and optimization, not fundamentally different on a conceptual level.

Neither HTTP nor RPC protocols have ever pretended to solve higher-level distributed systems concerns of fault tolerance, network partitions, reliable delivery, etc. Those are things you build on top. You need a basic mechanism to send messages before you can do any of that.

What, exactly, is the magical non-RPC approach of the 80's that we're all missing? Can you explain the alternative?

EDIT: Also, like, the entirety of Google is built out of services that RPC to each other, but the 80's called and said that's wrong? How am I supposed to take this seriously?

Re: Buf raises $93M to deprecate REST/JSON

#59
post #47

Earlier quoted context omitted.

Maybe it's a lot more simple, like they have someone that's ridiculously good at raising venture capital, like the Posthog guys.

TBH not really. I've talked to the founder a few times. He doesn't want to put his name on things, as he's kind of a private person and really wants to direct the spotlight at his employees. But he's just an engineer who has spent a lot of time working with Protobufs, not a sales person at all. (Disclosure: I was the maintainer of Protobuf who put together the first open source release at Google, and I made a small i…

Ok now I'm pretty interested in this company:

1. Very technical founder at the bleeding edge of the field. 2. Many people against this idea

Usually a sign there's something really good here... or at least something that is super non-obvious to most people.

I'm curious to learn what I'm missing... mind if I reach out?

Post reply on HN