Apache Thrift

Standard

Apache Thrift website define Thrift as a software framework for scalable cross-language services development. It combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml, Delphi,and other languages.

In simple word, Thrift allow programming language in client side to communicate directly to server side (usually called RPC or Remote Procedure Call) although in different languages. Almost all step handled by Thrift, we just implement the function in server side, using any programming language (which is supported by Thrift) and use that function in client side by calling  that directly, even with another programming language.

Take a look to this presentation for more information:

 

To use Thrift, write the Thrift definition file which contains interface and variable definition, and then build it. Thrift will generate code for both client and server, and we just input code for implement the function. As you can see in slide 3 (Thrift architecture), we just do the top part in architecture and let Thrift handle the rest.

Leave a Reply