Chapter 4. Moving bytes with transports

 

This chapter covers

  • Understanding the role transports play in the Apache Thrift Framework
  • Coding endpoint-independent read and write operations using transports
  • Using memory, disk, and network transports
  • Using server transports in network servers
  • Building a transport stack with layered transports

This chapter explores the Apache Thrift transport layer (see figure 4.1). Transports are the bottom layer of the Apache Thrift framework, and they are foundational to everything else you’ll do with Apache Thrift. Transports aren’t typically used in a standalone setting, rather they’re the final link in the chain for Apache Thrift serialization and RPC applications. However, by building simple “transport only” programs, we can learn much about one of the most important parts of the Apache Thrift platform.

Figure 4.1. The Apache Thrift transport layer

Keep in mind that Apache Thrift protocols and transports are designed to work together as a layered stack. In the first few examples of this chapter you’ll see that each of our demonstration languages generates different bits for the same object. As we’ll see in chapter 5, Apache Thrift protocols normalize the bits transported by all of the supported languages.

4.1. Endpoint transports, part 1: Memory & disk

4.2. The transport interface

4.3. Endpoint transports, part 2: Networks

4.4. Server transports

4.5. Layered transports

sitemap