What is Apache Thrift? Thrift is a framework. With this framework the programmers can create high-performance cross-language services.
With Thrift you can write the specifications of the contract between two or more microservices (client side and server side), and then you can generate the stub code for the right programming language.
The programming languages supported by Apache Thrift are:
The “contract”is written in IDL (Interface Definition Language). Into this file the developer specify the abstract data type. After this definition, the IDL can be compiled into source code. This step seems to be a wasting time, but is useful because the developer must consider the interface in isolation, without thoughts on code.
I think Apache Thrift is a very useful framework for this reasons:
- The design stage of the micorservice is independent from the implementation stage
- Is useful in heterogenic teams: all developers can work on a project and use the preferred programming language.
- In this way, the designer, create a contract between the services that is clear and documented.
Useful links about this argument are: