Chapter 10. Servers
This chapter covers
- Building RPC servers
- Understanding RPC server architecture
- Learning about server concurrency models
- Using factories to create per-connection handlers and custom I/O stacks
- Processing server events
- Using service multiplexing
This chapter is the culmination of part 2. At this point we’ve examined nearly all the moving parts within the Apache Thrift framework, from byte-level transport I/O all the way up to designing RPC Services. Our final framework topic is the Apache Thrift server (see figure 10.1).
Servers are the conductors of the Apache Thrift RPC symphony. Apache Thrift servers provide prebuilt and tested hosting for user-implemented services. Each Apache Thrift language provides a different set of servers based on the needs and capabilities of the language.
Using a server from the Apache Thrift server library can greatly reduce the effort associated with deploying cross-language services. Servers handle almost all the difficult issues involved in programming high performance RPC services, such as concurrency management, scalability, and cross-thread communications.