O'Reilly logo

Learning Apache Thrift by Krzysztof Rakowski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Analyzing the code

Before we go further, let's have a quick look and explain the most important parts of the code that we used in this chapter. We will dig deeper into the technical details and deal with many useful Apache Thrift options in Chapter 4, Understanding How Apache Thrift Works.

The service description – IDL

The most important part of the service description begins with the following line:

service MyFirstService {

In this block, there are descriptions of methods exposed by this service. Let's have a look at the first two:

oneway void log(1:string filename),
int multiply(1:int number1, 2:int number2),

The syntax bears a strong resemblance to C++'s (and other popular languages') method definitions. The oneway keyword means that the client only ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required