Apache Thrift allows us to have a more complicated structure of the documents than a single file. It is especially useful if you want to have a set of basic tools to include in different services.
In our simple example, let's say we want to have a basic service, which allows logging messages to file. Any other service that we build has to have this capability. We also want some basic exceptions defined that are universal and can be used in any service, regardless of its specifics.
Therefore, we will split our definition into two Apache Thrift documents:
mybase.thriftwill contain basic universal components
mytoolbox.thriftwill contain our specific service
You can type the files as we go or download them from ...