Finagle is an extensible RPC system for the JVM, used to construct high-concurrency servers. Finagle implements uniform client and server APIs for several protocols, and is designed for high performance and concurrency. Most of Finagle’s code is protocol agnostic, simplifying the implementation of new protocols.
Finagle uses a clean, simple, and safe concurrent programming model, based on Futures. This leads to safe and modular programs that are also simple to reason about.
Finagle clients and servers expose statistics for monitoring and diagnostics. They are also traceable through a mechanism similar to Dapper‘s (another Twitter open source project, Zipkin, provides trace aggregation and visualization).
The quickstart has an overview of the most important concepts, walking you through the setup of a simple HTTP server and client.
A section on Futures follows, motivating and explaining the important ideas behind the concurrent programming model used in Finagle. The next section documents Services & Filters which are the core abstractions used to represent clients and servers and modify their behavior.
Other useful resources include:
- “Your Server as a Function” a paper motivating the core abstractions behind finagle (PLOS’13).
- Twitter engineering blog entry introducing Finagle
- ScalaDays 2011 presentation on Finagle
- Twitter’s Scala School has a section introducing Finagle and another constructing a distributed search engine using Finagle