Oracle Code One: Solving the N + 1 Query Problem

Oracle Code One: Solving the N + 1 Query Problem

Back in the cold in Ottawa after a wonderful week in beautiful San Francisco for Oracle Code One 2018. I’ll write another post shortly that will go more personal, about my experience, my struggles, my good moments and a few lessons learned which hopefully some of you will relate to. But for now here is the presentation I gave there which uses some of the internals of the Assembler library as an example to explore a few java 8+ functional patterns. Those patterns, when combined together, go beyond a simple hello world example and tries to solve an actual business problem:

Solving the N + 1 Query Problem for Microservices Without Any Framework

Most ORMs can optimize querying/joining data to avoid the N + 1 query problem, but it is limited to querying a single database. This session presents a lightweight, purely stateless, and type-safe solution to the N + 1 query problem that can transparently be reused in any microservice environment, which is especially relevant in an event sourcing/CQRS architecture. Through source code examples, the presentation dives into some core java 8 functional patterns to design a simple and user-friendly API that decouples the core logic of querying and efficiently aggregating disparate datasources (REST, NoSQL, database) from the streaming/reactive technology used to connect to those sources (Project Reactor/Spring WebFlux, Akka Streams, RxJava, and so on).

Hopefully you will get some value out of that presentation, if you have any questions don’t hesitate to ping me on Twitter!

%d bloggers like this: