What is actual purpose of .thrift file in an Apache Thrift based application?

我的未来我决定 提交于 2019-12-13 07:19:50

问题


Does the .thrift file reside in the Server side or the client side of the application?

What is actual purpose of .thrift file in an Apache Thrift based application?

Is it only used for generating minimal source codes for the application, or, does it have any other use?

Can't I just write client-server codes myself without taking the help of .thrift file?


回答1:


The *.thrift file is an IDL file, where IDL stands for Interface description language. The main purpose of this file is to generate the service-specific code for the desired target language(s). The like any other IDL file, the *.thrift IDL file is not required to be copied onto server or client end to have a working solution.

Aside from that, making the IDL file publicly available can be useful for documentation purposes for developers that want to use the service.



来源:https://stackoverflow.com/questions/36732446/what-is-actual-purpose-of-thrift-file-in-an-apache-thrift-based-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!