Chapter 16. Scripting Apache Thrift

 

This chapter covers

  • Building Ruby clients and servers
  • Building PHP clients
  • Building Perl clients and servers
  • Building Python clients and servers

Apache Thrift offers support for a wide range of dynamic programming languages. In this chapter, we’ll see how to set up and build Apache Thrift clients and servers in all of the popular LAMP stack scripting languages: PHP, Perl, Python, and Ruby.

While the microservice movement and cloud native systems have largely subsumed LAMP, the LAMP languages have found a permanent home in web tech, automated test, data science, and machine learning environments, just to name a few. Scripting languages can also be used to quickly prototype services and clients using Apache Thrift. These script-based services can later be replaced by more robust solutions without violating the interface contract depended on by other parts of the system. What’s more, interpreted languages that may not have been fast enough to offer complete solutions in the past can often participate in distributed solutions by offloading performance-intensive elements to other, more performant Apache Thrift-based services.

16.1. Apache Thrift and Ruby

16.2. Apache Thrift and PHP

16.3. Apache Thrift and Perl

16.4. Apache Thrift Perl clients

16.5. Apache Thrift Perl servers

16.6. Apache Thrift and Python

Summary