This talk will be about how we applied Typed functional programming and object-functional concepts inspired from languages like Scala, Haskell in building an Ads serving engine using Java 8 and made the stack extensible for multiple Ads serving usecases like App, Desktop, Exchange and ML model execution for CTR prediction, Guaranteed delivery etc. This talk will focus on how we solved problems in an Ads serving engine using functional programming constructs for: Relevance and Ranking CTR prediction Bidding models Guaranteed delivery (Convex Optimization) Explore / Exploit (Multi-armed bandit) Attribution, Deduplication etc From a language level, it will focus on how we applied our learnings from other functional languages like Scala, Clojure, Haskell in Java 8 to write elegant code for:

Composing Ad selection workflows from reusable components Reasoning about code through immutability Defining interfaces like function types. Functions as first class objects to express behaviour. Using Builders and Filter predicates for adding new features Transforming collections using streams, lambdas, map, reduce, flatMap, groupBy Optional for writing null safe code and handling defaults using map, flatMap, orElse Functional operations like partition, zip for simplifying code Pattern matching and other features from libraries Caching and memoization