fbthrift — Engineering Performance
75 engineers all time · Jan 2025 – Nov 2026 · built 2026-11-22 · GitHub
Performance snapshot
Today's rolling 90-day reading for fbthrift, compared with the start of the series. Pick a window to move that comparison point.
Avg. perf / dev / mo
+195.5%
0.65 → 1.93 ETV
Active engineers
+5.4%
37.0 → 39.0
Features
−0.7pp
29.8% → 29.1%
vs. Meta
0.56x
−44% below Meta
fbthrift vs. Meta
Per-engineer ETV for fbthrift against Meta as a whole. Both lines are 90-day rolling averages scaled to a 30-day month, so they share one axis and can be read against each other at any point. Pick a window to zoom the chart to it.
Performance Composition
Each month's output split by type of work: Features (new value), Maintenance (sustaining systems), Tests, Docs, and Fixes (rework). The yellow line is output per engineer, so when it rises each engineer is delivering more, whatever the team size did. Unit: Engineering Throughput Value (ETV).
Engineering capacity
Effective engineers behind fbthrift, against its pre-AI baseline. Each subject has its own: fbthrift's is 0.65 ETV / dev / mo, its first reading in Q1 2025. Per-engineer ETV divided by that gives a capacity multiple, and that multiple applied to the engineers active in the trailing 90 days turns it into engineer-equivalents. The line is the real headcount, so the gap between line and area is what the leverage is worth. Because each baseline is its own, every subject opens at 1.0x on its first day: multiples measure improvement and are not comparable between subjects.
Knowledge concentration
How dependent is this repo on a small number of engineers? Higher top-1 share = higher key-person risk.
Jack Chistyakov owns 12.0 % of commits.
Behind the numbers
Written summary of the work completed each month.
No monthly reports available yet.
Top engineers
Most impactful commits
Top 10 by ETV in the all-time window.
- 9.6ETVMove frame component for fast_thrift to thrift Summary: 1. Moves frame component for fast_thrift to thrift. 2. Fixes includes 3. Fixes depencies 4. Verifies tests run and pass 5. Verifies benchmarks Reviewed By: islamismailov Differential Revision: D99001071 fbshipit-source-id: 5a5036820db279b858554671f096513323a06327Ankit Kumar · 3c8bdd23 · 2026-04-02
- 9.3ETVMove rocket component for fast_thrift to thrift Summary: 1. Moves rocket component for fast_thrift to thrift. 2. Fixes includes 3. Fixes depencies 4. Verifies tests run and pass 5. Verifies benchmarks Reviewed By: robertroeser Differential Revision: D99004612 fbshipit-source-id: 3e293eefe76b3cf2fddf83d6501d7e2a11552dcaAnkit Kumar · f90956f7 · 2026-04-02
- 8.8ETVMove thrift component for fast_thrift to thrift Summary: 1. Moves thrift component for fast_thrift to thrift. 2. Fixes includes 3. Fixes depencies 4. Verifies tests run and pass 5. Verifies benchmarks Reviewed By: robertroeser Differential Revision: D99006406 fbshipit-source-id: 5b7a432a06264e5fd9bd4565eb964177c706b522Ankit Kumar · 92c6d9c1 · 2026-04-02
- 7.1ETVMove channel pipeline and common for fast_thrift to thrift Summary: 1. Moves channel pipeline and common for fast_thrift to thrift. 2. Fixes includes 3. Fixes depencies 4. Verifies tests run and pass 5. Verifies benchmarks Reviewed By: islamismailov Differential Revision: D98998128 fbshipit-source-id: 0445e2dba16957a294d87e3fd874ac237d111d90Ankit Kumar · d14cef3c · 2026-04-01
- 6.4ETVAdd synchronous Rust handler integration Summary: Build the synchronous Rust handler bridge on top of the native channel_pipeline readiness primitives. Add borrowed callback contexts, message adapters, lifecycle and backpressure handling, panic containment, tests, benchmarks, and design documentation while keeping Rust dependencies opt-in. Reviewed By: pranavtbhat Differential Revision: D113432296 fbshipit-source-id: d14a9b4489ea136c34890b8b84e94eabebf95593Robert Roeser · 999b40c6 · 2026-07-29
- 4.0ETVAdd shared-parser Thrift formatter binary Summary: Add the `thrift-fmt` binary and formatter library using the shared recursive-descent parser core for grammar validation and token collection from the first formatter diff. Formatter-specific trivia handling and layout remain in the formatter implementation; the semantic AST is not used as a formatting transport. Port the existing formatter snapshot coverage into C++ and add fixture round-trip/idempotence coverage plus the fbcode compatibility target. This implementation exactly preserves the behavior of the existing formatter, including all of its deficiencies, to facilitate deployment. The goal is to fix these issues individually and end up with a better formatter, using the flexibility of controlling the whole stack to make the behavior fully configurable while also eliminating divergence caused by parser duplication as the language evolves. Reviewed By: hchokshi, sadroeck Differential Revision: D108951643 fbshipit-source-id: d00e3ec3d0976ece612e7186c842257aa4ab0a2fShai Szulanski · 3751dd95 · 2026-06-29
- 3.9ETVMove `thrift/facebook/json5/*` to `thrift/lib/cpp2/protocol` Summary: This diff moved all files under `thrift/facebook/json5 to `thrift/lib/cpp2/protocol`: * `Json5Protocol.h` is moved to `thrift/lib/cpp2/protocol`. Other files are moved to `thrift/lib/cpp2/protocol/detail`. * `thrift/facebook/json5/test` is moved to `thrift/lib/cpp2/protocol/test` * `thrift/facebook/json5/test/example.thrift` is renamed to `json5_test.thrift` Reviewed By: aristidisp Differential Revision: D95818321 fbshipit-source-id: 19d443e93b3a5ea5965b2e62893407874c9634e2TJ Yin · aadfdb31 · 2026-03-10
- 3.7ETVImplement connection acceptance as a pipeline Summary: Adds a connection acceptor pipeline which ends with it's tail at the ConnectionHandler. All new connections flow through this pipeline. The head of the pipeline is a Listener and the tail is a connection installer. The pipeline is completely rpc agnostic and uses concepts for Connection/ConnectionFactory. Thrift plugs into this connection pipeline with it's own concrete connection and factory. Reviewed By: robertroeser Differential Revision: D106016109 fbshipit-source-id: 45c30f400b89c08df78b5f4d5d62001cfc5dcad3Ankit Kumar · 65e14c62 · 2026-05-26
- 3.4ETVAdd type-based channel pipeline events Summary: Remove the need for one central event enum: each handler declares the typed events it can publish, while other handlers subscribe and implement `on<Event>()`. Event contracts and dispatch thunks are resolved at compile time, with routes cached when the pipeline is built; the bound typed path is also 13.1% faster than legacy enum dispatch. Reviewed By: robertroeser Differential Revision: D119018784 fbshipit-source-id: 7aa2ebaa2a5b8843c1c30b901eaf59b7fdad81a0Ankit Kumar · 1e15d88d · 2026-09-08
- 3.3ETVReturn Mono<ResponseAndStream> for streams with a first response Summary: Change the Java API for a stream method that has a first response. The method now returns `Mono<ResponseAndStream<F, E>>` instead of `Flux<StreamResponse<F, E>>`. The change applies to the generated client, the service interface that a server implements, and interaction members. The new API keeps the first response and the stream elements separate. The first response has its own type, and errors have a clear scope. ## API change The IDL does not change: ``` service Feed { FeedHeader, stream<FeedItem throws (1: FeedError err)> subscribe(1: Request req) throws (1: AuthError err); } ``` The generated Java signature changes: ```java // Before: one Flux of a union type. Element 0 holds the first response. Flux<StreamResponse<FeedHeader, FeedItem>> subscribe(Request req); // After: a Mono that holds the first response and the stream. Mono<ResponseAndStream<FeedHeader, FeedItem>> subscribe(Request req); ``` The `Wrapper` variant keeps the headers of the first response and of each element: ```java Mono<ResponseWrapper<ResponseAndStream<FeedHeader, ResponseWrapper<FeedItem>>>> subscribeWrapper(Request req, RpcOptions options); ``` `ResponseAndStream<F, E>` (package `com.facebook.thrift.model`) has these members: ```java F getFirstResponse(); // never null Flux<E> getStream(); // subscribe one time only <E2> ResponseAndStream<F, E2> mapStream(Function<Flux<E>, Flux<E2>> mapper); void dispose(); // abandons the stream (see the rule below) static <F, E> ResponseAndStream<F, E> of(F firstResponse, Flux<E> stream); ``` ## Client usage Read the first response, then the stream: ```java client.subscribe(req) .flatMapMany(ras -> { onHeader(ras.getFirstResponse()); return ras.getStream(); }) .subscribe(this::onItem, this::onError); ``` Use the first response only, and drop the stream: ```java FeedHeader header = client.subscribe(req) .map(ras -> { ras.dispose(); return ras.getFirstResponse(); }) .block(); ``` Handle each error scope: ```java client.subscribe(req) .flatMapMany(ResponseAndStream::getStream) .onErrorResume(AuthError.class, e -> ...) // function error: the outer Mono failed .onErrorResume(FeedError.class, e -> ...); // stream error: the inner Flux failed ``` **Rule: subscribe or dispose.** When the outer `Mono` emits the holder, the transport stream is already open and holds credits. Do one of these: - Subscribe to `getStream()` one time. - Call `dispose()`. If you do neither, the transport stream and its credits stay in use until the connection closes. Do not call `dispose()` on a stream that you read: on an active stream, `dispose()` cancels it. After the stream ends, `dispose()` has no effect. The `ResponseAndStream` javadoc and the agent rules in `thrift/lib/java/.llms/rules/thrift_java.md` state the same rule, plus the leak-proof `Flux.usingWhen` consumption, the operator-placement table, and the `1 + 100` pre-subscribe window. ## Server usage A server implements the same signature: ```java Override public Mono<ResponseAndStream<FeedHeader, FeedItem>> subscribe(Request req) { return auth(req) // Mono<User> .map(user -> ResponseAndStream.of( new FeedHeader(user.id()), // the first response feed.items(user))); // Flux<FeedItem>, the stream } ``` The server sends errors as follows: ```java // Before the first response: initial error with function scope. return Mono.error(new AuthError("denied")); // An empty Mono is also an initial error: "the first response must not be null". // After the first response: stream error with stream scope. return Mono.just(ResponseAndStream.of(header, Flux.error(new FeedError("gone")))); ``` A handler can forward a call to a backend with no other code, because the client and the server use the same type: ```java return backendClient.subscribe(req); ``` The server subscribes to the stream after it sends the first response. If the client cancels first, the server disposes the holder, so the backend stream closes. A plain stream method (`stream<E>` with no first response) keeps its `Flux<E>` signature. ## Background A method declared as `First, stream<Elem>` sends two kinds of values on one `Flux`: the first response, then the elements. Each caller had to examine every item with `isSetFirstResponse()`. A method error and a stream error used the same `onError` signal. There was no event for "the first response arrived". The C++ server and client already keep the two parts separate (`ResponseAndServerStream`, `ResponseAndClientBufferedStream`). The Rust, Go, and Python generators use the same shape. ## Implementation Server: - Each server stream has two phases: the response phase, then the stream phase. A plain stream is a stream with an empty first response. - The generated code makes one `StreamMethod<F, E>` descriptor for each method. The descriptor holds the request readers, the typed `invoke`, the writers for the first response and the elements, and the tables of declared exceptions. - The shared helper `ServerStreams.handleStream` runs the phases. An error in the response phase is an initial error. An error in the stream phase is a stream error. ``` invoke(args) : Mono<ResponseAndStream<F, E>> ├─ throw / Mono.error / empty ──▶ initial-error frame (function exceptions) └─ holder ──▶ first-response frame ──▶ stream.map(element frame) └─ Flux error ──▶ stream-error frame (stream exceptions) ``` - This diff removes the old server path: `StreamResponseHandlerTemplate`, `StreamResponseHandler`, `StreamWithFirstResponseHandler`, `StreamHandler`, and the `SingleRequestStream*Delegate` adapters. The metadata and exception builders move to `RpcPayloadUtil`. Client: - The generated code sends the transport stream to `ResponseAndStreamBridge.toResponseAndStream`. - The bridge emits the holder when the first payload arrives. It decodes the remaining payloads as elements and keeps the headers of each element. - The holder has a lifecycle state machine (`StreamLifecycle`). It allows one subscription. It also makes sure that a dispose before, during, or after a subscription closes the transport stream exactly one time. - The first request asks for `1 + 100` credits, then adds credits as elements are consumed. This is the same as the C++ client. - Interaction methods use `toInteractionResponseAndStream`, which keeps the existing hop off the event loop. All callers that use a first response are changed: the iris worker client, jdKickStream, the rtgw stateful socket writer and its test, `SRDemo`, the Java examples, and the runtime, integration, and conformance tests. ## Result The first response has its own type. Errors have a scope: the outer `Mono` for function errors, the inner `Flux` for stream errors. The bytes on the wire do not change. Java-to-Java integration tests that decode each frame, and the conformance suites, verify this. The golden test files are removed. Reviewed By: echistyakov Differential Revision: D127765225 fbshipit-source-id: 2573342024355dae5e48b274d777544ec3d51ab4Jeff Bahr · fe2b2ffb · 2026-11-03