5 ms·
Maybe REST was the best protocol for the great public API explosion of the past decade, where startups wanted to expose a public API to anyone on the internet.
by lfischer 9y ago
Maybe REST was the best protocol for the great public API explosion of the past decade, where startups wanted to expose a public API to anyone on the internet. The most important requisite was that the most developers could access the API with a minimum of technical knowledge and tools, and the APIs were simple. I am less and less sure that REST is the best solution for communicating between internal services, which know a lot about each other and where you can spend time onboarding developers on a specific techniques and stack.
- cm2187 9y agoWhat do you think is a better solution?
- lfischer 9y agoI don’t know yet because I haven’t had as much experience with other solutions as with REST. I am curious about Thrift and Protocol Buffers. I have worked once on a project migrating from REST to Protocol Buffers for an internal API and it noticeably improved performance, but code complexity remained more or less the same.
- sloxy 9y ago> Protocol Buffers Well, REST is architecture. Protocol Buffers are (de/)serialization. I've tried it before (& although it has the properties I like[language agnostic schema definition..]), it was finicky to get working with of one the biggest IDEs out there(IntelliJ IDEA) Also, it doesn't support Kotlin yet.(Java interop only option) The only place I can see Protocol Buffers being useful is inside Google..cos it was a pretty crappy dev experience. And I would be pretty confident in saying that not many Googlers/ex-Googlers outside Google use it. Cos if they did, somebody would make the dev experience much much better.
- elmalto 9y agoI use protobuf at work all the time (not google) and prefer them over almost all other serialization formats. To be fair, I mainly work in Scala, C# and JavaScript where great implementations exist. In the case of Scala, IntelliJ just needs to know that the generated source files are just that and then it „just works“ for me
- eadmund 9y ago> I have worked once on a project migrating from REST to Protocol Buffers What does that mean? REST is a style while protobufs are a serialisation format: a REST architecture can use JSON, protobufs, Thrift, whatever.
- ZenoArrow 9y agoGraphQL. http://graphql.org/ http://graphql.org/
- rurounijones 9y agohttps://grpc.io/ https://grpc.io/ is Google's internal solution I believe