Preparing the Apache Thrift document

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.thrift will contain basic universal components
  • mytoolbox.thrift will contain our specific service

Note

You can type the files as we go or download them from ...

Get Learning Apache Thrift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.