Enjoy Newsletter #28.

How Airbnb Measures Listing Lifetime Value

Airbnb’s Data Science team introduces their framework for measuring Listing Lifetime Value (LTV) on a two-sided marketplace where many hosts and guests interact simultaneously. The framework builds on three metrics. Baseline LTV is the total booking value a listing is expected to generate over the next 365 days, predicted via machine learning from features like calendar availability, nightly price, location, and host tenure, then discounted to present value. Incremental LTV subtracts marketplace cannibalization from Baseline LTV—accounting for bookings that would have gone to another Airbnb listing if the new listing didn’t exist. Finally, Marketing Incremental LTV isolates the additional value genuinely driven by Airbnb’s own host-acquisition campaigns.

Putting this into production required solving three tough challenges. First, ground-truth labels take a full 365 days to mature, making models vulnerable to sudden market shifts like COVID-19; the team shortened training windows, added fine-grained geospatial features, and migrated to LightGBM. Second, true marketplace incrementality is never directly observable, so they estimate an economic production function modeling how total supply and demand in each local market segment combine to produce bookings—in high-demand, supply-constrained markets, adding a new listing generates far more incremental value. Third, to reduce early prediction uncertainty, the model dynamically updates LTV estimates daily as real booking signals roll in.

Six JDK 24 Features You Should Know About

Simon Ritter (Azul) highlights six standout features in JDK 24, released on March 18, 2025 with 24 JEPs—the largest feature count of any release since Java switched to its six-month release cadence. JEP 483, from Project Leyden, pre-loads and links application classes at build time on top of Application Class Data Sharing so they are ready immediately on JVM startup, cutting warmup time. JEP 485 (Stream Gatherers) finalizes the Gatherer interface so developers can build custom intermediate Stream operations, much like Collector enables custom terminal operations. JEP 491 removes a major virtual-thread footgun: previously, blocking inside a synchronized block “pinned” the underlying platform carrier thread because monitors were owned by carrier threads; now, monitors are associated directly with virtual threads.

The other three JEPs focus on platform cleanup and security modernization. JEP 486 permanently disables the SecurityManager, which was deprecated in JDK 17 and is rarely used to protect modern server-side code; any legacy applications still relying on it will need architectural changes before upgrading. JEP 498 causes the JVM to emit a runtime warning the first time any memory-access method in sun.misc.Unsafe is called, nudging libraries toward VarHandle and the Foreign Function & Memory API. Finally, JEP 501 deprecates the 32-bit x86 port for removal (Linux was the last remaining 32-bit x86 port after Windows 32-bit was removed in JDK 21). It’s a handy checklist as teams prepare for JDK 25, the next LTS release.

JavaOne 2025: Function and Memory Access in Pure Java

This InfoQ report covers Per-Åke Minborg’s (Oracle) JavaOne 2025 presentation on the Foreign Function & Memory API (FFM, JEP 454), finalized in JDK 22 under Project Panama as a modern replacement for JNI. As Minborg explained, JNI forces developers to stitch Java and C together in a brittle, high-maintenance workflow with clunky data marshaling, support limited to primitives and Java objects, no deterministic off-heap memory deallocation, and a ~2 GB addressing limit on ByteBuffer. Community alternatives like JNA, JNR, and JavaCPP tried to bridge the gap over the years, but none became a universal standard.

On the memory side, MemorySegment models a contiguous region of 64-bit addressable memory with spatial bounds checks, temporal checks against use-after-free, and thread-confinement enforcement. Memory lifecycles are managed deterministically via Arena across four flavors: Global, Auto, Confined, and Shared. ValueLayout and MemoryLayout describe structured off-heap data so you can derive strongly typed VarHandle accessors instead of calculating raw byte offsets by hand—and declaring those VarHandle instances static final is critical for JIT inlining and peak performance. On the function side, the jextract tool automatically generates Java bindings directly from native C header files, letting Java code call C functions like qsort directly. In short, FFM delivers safe, high-performance off-heap memory access and native function calls in pure Java without writing or maintaining a single line of C glue code.

Ultimate Guide to Project Reactor, Thread-Locals and Context Propagation

Grzegorz Piwowarek explains why context propagation is notoriously tricky in Project Reactor. A ThreadLocal<X> is conceptually a Map<Thread, X>, whereas a reactive pipeline can hop across threads at any publishOn() or subscribeOn() boundary, leaving thread-local values behind. Reactor’s native solution is its immutable Context: you write values downstream-to-upstream via contextWrite() and read them inside the pipeline by replacing map() with flatMap() + Mono.deferContextual(). Piwowarek also points out a simple rule of thumb: if you already have the value before assembling the reactive pipeline, just capture it in a normal lexical variable instead of overcomplicating things with Context.

The harder challenge is integrating with third-party libraries that expect classic ThreadLocal state, such as SLF4J’s MDC for structured logging: you have to restore the value into MDC right before each operator lambda executes and clear it afterward, which can be wrapped cleanly using the execute-around pattern in a helper like withMDC(). For side-effect operators like doOnNext() that don’t expose Context directly, you can switch to doOnEach(), filter for onNext signals, and read the context from the Signal object. Finally, Reactor supports automatic context propagation: by adding io.micrometer:context-propagation, calling Hooks.enableAutomaticContextPropagation(), and registering a ThreadLocalAccessor, Reactor automatically snapshots and restores thread-local values across operator boundaries. While convenient, this global JVM hook adds runtime overhead to every reactive pipeline in the process, so weigh the trade-off carefully.

JDK 24 G1/Parallel/Serial GC Changes

Thomas Schatzl (Oracle) rounds up the improvements to HotSpot’s stop-the-world garbage collectors—G1, Parallel, and Serial—in JDK 24. In Parallel GC, redundant synchronization operations inside the object evacuation loop were removed (JDK-8269870), while Serial GC received ongoing code cleanup and refactoring. The most impactful changes landed in G1: to meet pause-time targets, G1 predicts internal operation costs like object copying and reference updating, but its initial default estimates had been calibrated years ago on an old SPARC machine and were overly conservative, causing G1 to take around 30 GC cycles to adapt to modern hardware. With JDK-8343189, the very first real runtime measurement immediately overrides the static default, allowing G1 to adapt dramatically faster at the slight risk of exceeding pause targets during the first couple of collections. Additionally, G1 now manages the remembered set for the entire young generation as a single unified structure (JDK-8336086), reducing duplication and saving native memory.

Schatzl also previews the JDK 25 roadmap: merging remembered sets across old-generation regions (JDK-8343782) is already integrated, and G1’s write barrier has been redesigned from the ground up, promising up to 10% higher throughput, shorter pauses, and cleaner JIT-compiled code in exchange for a static memory overhead of roughly 0.2% of the heap size. Ongoing discussions also include bringing ZGC-style Automatic Heap Sizing to G1/Parallel/Serial with contributions from Microsoft and Google, as well as making G1 the true default collector even on small-memory containers where HotSpot currently falls back to Serial GC.

Making Makefiles for fun and profit

Darko Mesaroš (AWS) revisits make, the 48-year-old build automation tool created by Stuart Feldman so programmers wouldn’t keep debugging stale binaries after forgetting to recompile a modified file. Unlike a naive build.sh script that recompiles everything from scratch, make tracks file modification timestamps and rebuilds only what changed. Mesaroš dissects a classic C Makefile: variables (which make calls macros), the default all target, link rules using automatic variables like $@ and $^, pattern rules like %.o: %.c for compiling individual source files, a clean target, and .PHONY declarations so targets still run even if a file of the same name exists in the directory.

The second half shows how make shines far beyond C projects: wrapping Terraform workflows with OS detection and interactive confirmation prompts before running terraform destroy, spinning up local Docker development environments with Postgres and Redis for a Rust service, orchestrating a polyglot TypeScript + Rust AWS CDK project with targets for installing, building, deploying individual stacks, and testing locally against DynamoDB Local, and deploying a Hugo static site to S3 and AWS Amplify. To get past make’s famously arcane syntax, Mesaroš uses the Amazon Q Developer CLI to generate Makefile rules—even dynamically querying the Amplify App ID via the AWS CLI. It’s a fun reminder that battle-tested Unix tools are still worth learning, especially when AI assistants remove the initial syntax friction.

Improving Pinterest Search Relevance Using Large Language Models

Pinterest’s engineering team shares how they used large language models (LLMs) to improve search relevance—measuring how well a Pin actually satisfies a user’s search query rather than relying purely on historical click engagement. Their “teacher” model is a cross-encoder that takes the search query alongside a rich text representation of a Pin, fine-tuned on human-labeled relevance ratings as a multi-class classification task. Because Pins are primarily visual, the team enriches each Pin’s text from multiple sources: title and description, synthetic image captions generated by a BLIP vision-language model, top historically engaged search queries, user board titles where the Pin was saved, and linked web page titles. Offline evaluations showed that a fine-tuned Llama-3-8B model (using QLoRA) outperformed multilingual BERT by 12.5% and the production baseline by 19.7% in accuracy.

Because serving an 8B-parameter LLM directly on every search request is too slow and expensive, Pinterest uses knowledge distillation: the teacher LLM labels billions of query-Pin pairs offline each day to train a lightweight “student” model that combines precomputed embeddings (SearchSAGE, PinSAGE, visual embeddings) with lexical match features like BM25. Thanks to the multilingual teacher model, the student generalizes well even to languages and countries with zero human-labeled training data. In online A/B tests, the distilled model improved relevance by 2.18% in nDCG@20 and boosted overall search fulfillment rate by over 1.5%. Future work includes direct real-time LLM serving, native vision-language models, and active learning.


This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026; reviewed and edited by Codex with GPT 6.1 Sol on 09/11/2026, and re-verified by Claude Code with Sonnet 5.5 on 16/11/2026.