Chapter 12. Building clients and servers with Java

 

This chapter covers

  • Configuring Apache Thrift for Java and other JVM-based development environments
  • Building Java RPC clients and servers with Apache Thrift
  • Understanding the features of the Apache Thrift Java library
  • Creating synchronous and asynchronous Java RPC clients and servers

Java as a language is a pillar of the open source world. Perhaps even more important than Java is the platform the Java language is based upon, the Java Virtual Machine (JVM). The JVM is the enabler of the marquee “write once run everywhere” feature promoted by the original Java developers. The JVM also provides a base for innovative new languages such as Scala, Groovy, and Clojure to build upon. Even languages popular as standalone interpreters, such as Python, Node.js, and Ruby, have been ported to the JVM to leverage its inherent interoperability and portability.

A language that can be compiled into JVM byte code can interact with byte code generated by any other JVM language. This makes it possible for any JVM language to take advantage of the vast array of JVM-based libraries, including Apache Thrift.

12.1. Setting up Apache Thrift for Java development

12.2. A simple client and server

12.3. Using Apache Thrift in other JVM languages

12.4. Java transports, protocols, and servers

12.5. Asynchronous Java RPC

Summary