|
|
|
|
|
by fpotter
5857 days ago
|
|
Thrift solves the same problem as pretty much any other remote procedure call (RPC) system. Among RPC systems, I'd say it's notable because it works easily with over a dozen different languages and is fairly transport agnostic (you could use it over TCP, HTTP, or whatever else you like). Some care is also taken to be byte efficient, so it's not as heavy as something XML-based like SOAP or XML-RPC. But, is your question more why would you use something like Thrift over just plain REST with JSON? You could accomplish the same things with REST/JSON, but in a lot of languages, I think the REST route involves writing more code. Instead of just making a method call and having it all happen for you, you encode some structure to JSON, do some HTTP operation, decode. I like it when that's hidden from me. |
|
IMO Thrift/protobufs also add a lot of value having a single file to describe the shared protocol, compared to e.g. JSON, where it tends to be more ad-hoc or "look at example results for reference."