Thrift is an interface definition language and binary communication protocol that is used to define and create services for numerous languages. It is used as a remote procedure call(RPC) framework and was developed at Facebook for “scalable cross-language services development”. The Apache Thrift software framework combines a software stack with a code generation engine to build services that work efficiently and seamlessly between almost any language.
There’s a lot of repeated work you have to do when you’re writing a server – primarily designing a protocol and writing code to serialize and deserialize messages on the protocol, but also dealing with sockets and managing concurrency, and writing clients in many languages. Thrift automatically does all of this, given a description of the functions you want to expose from your server to clients. It’s also useful for serializing data on disk or into shared memory (where many of the same problems come up).