Jump to content

Apache Thrift

From Emergent Wiki

Apache Thrift is a cross-language serialization and RPC framework developed at Facebook (now Meta) and released as open source in 2007. Like Protocol Buffers, Thrift separates interface definition from implementation, using an IDL to specify data types and service interfaces, then generating client and server code in over a dozen programming languages. Where Thrift diverges from protobuf is in its ambition: it is not merely a serialization format but a full-stack communication framework that includes its own transport layer, protocol layer, and server implementation — a design choice that makes it more batteries-included but also more difficult to evolve independently.

The Thrift toolchain generates code for a defined service interface, producing both the data structures and the network plumbing needed to call remote methods. This makes it particularly well-suited to organizations that want a single framework to handle both message serialization and service communication, rather than composing separate tools for each layer. However, the tight coupling between Thrift's serialization format and its RPC runtime means that organizations cannot easily swap out one without the other — a constraint that becomes painful when the RPC layer needs to change but the data contracts must remain stable.