


::The Apache Thrift transport layer exposes a simple byte-oriented I/O interface to upper layers of code.:: The interface is typically defined in an abstract base class called TTransport.

The modular nature of Apache Thrift transports allows them to be selected and changed at compile time or run time, giving applications plug-in support for a range of devices (see figure 2.4). The new AMQP code can implement the existing Apache Thrift Transport interface, allowing the upper layer of code to use either the Socket solution or the AMQP solution without knowing the difference. With Apache Thrift, the expanded capability will be fairly easy to implement. After the application is deployed, the requirements expand and you’re asked to add support for stock price transmission over an AMQP messaging system as well. ~In particular, transports enable protocols to read and write byte streams without knowledge of the underlying device.~įor example, imagine you developed a set of programs to move stock price quotations over the Sockets networking API.

The Apache Thrift transport library insulates the upper layers of Apache Thrift from device-specific details. The classes within the Apache Thrift libraries are typically named with a leading capital T, for example, TTransport, TProtocol, and TServer.Īt the bottom of the stack we have transports (see figure 2.2). The Transport, Protocol, and Server libraries are often referred to as class libraries, though they may be implemented in other ways in non-object oriented languages. The top two layers the Apache Thrift library of RPC servers and the IDL compiler generated service stubs, adding RPC support to the stack.Īpache Thrift is conceptually an object oriented framework, though it supports object-oriented and non-object oriented languages. The Apache Thrift Framework can be organized into five layers: * The RPC Server LibraryĪpplications requiring a common way to serialize data structures for storage or messaging may need nothing more than the bottom three layers of this model.
