Apache Thrift
Apache Thrift is a software framework for scalable cross-language services development. It provides an interface definition language (IDL) and code generation engine for building RPC services that work efficiently across C++, Java, Python, PHP, Ruby, Erlang, Go, JavaScript, Node.js, Haskell, C#, Cocoa, Delphi, and many more languages. Originally developed at Facebook, Thrift is now an Apache Software Foundation top-level project used for high-performance internal microservices and APIs.
APIs
Apache Thrift IDL
The Thrift Interface Definition Language (IDL) is used to define data types and service interfaces in a language-neutral format. A .thrift file defines structs, enums, exception...
Apache Thrift Server API
The Thrift Server API provides server implementations for hosting Thrift services including TSimpleServer (single-threaded), TThreadedServer, TThreadPoolServer, and TNonblocking...
Features
Generate client and server stubs for 20+ programming languages from a single IDL file.
Compact binary serialization (TCompactProtocol) for high-performance inter-service communication.
TSocket, TFramedTransport, TFileTransport, TZlibTransport, and TMemoryBuffer transports.
TBinaryProtocol, TCompactProtocol, TJSONProtocol, and TSimpleJSONProtocol serialization formats.
Non-blocking async server (TNonblockingServer) for high-throughput service deployments.
Optional and default fields enable backward-compatible schema evolution across service versions.
Use Cases
High-performance binary RPC between internal microservices in polyglot environments.
Type-safe APIs that work identically across Java, Python, C++, and other languages.
Service mesh and distributed system communication with efficient binary serialization.
Integrations
Cassandra uses Thrift (legacy) and CQL for client communication.
HBase Thrift gateway for non-Java clients to access HBase.
Hive Thrift server provides JDBC/ODBC access to Hive via Thrift protocol.