Genesis and Use of the New Java Client for Elasticsearch
summary
A new Java client for Elasticsearch released in October 2021 was designed to be lighter, faster and mostly generated from a formal model: the team modeled the ~400 API endpoints and ~2000 data types using TypeScript types compiled into a generation model instead of OpenAPI. The talk explains the development workflow for that generated library and demonstrates using fluent functional builders and tagged unions in Java to provide a DSL-like, IDE-autocomplete-driven experience for navigating large, polymorphic tree structures with many variants.
AI-written summary · about
chapters (13)
- 0:00Intro
- 1:40The Elasticsearch API in numbers
- 2:48Architecture of existing Java clients
- 4:10Problems with the High Level Rest Client
- 8:37Architecture of the new Java client
- 24:06Polymorphic types
- 26:55ReST API specification Open API?
- 28:27JSON API specification TypeScript!
- 29:49Example: search request
- 31:46Example: search response
- 32:48Example: query
- 34:35Validating the specification
- 37:50Code generation pipelines
related talks
54mAdvanced (elastic)search for your legacy application
54mModern Java in Action
54mScale Elasticsearch for Your Java Applications. Philipp Krenn. Java Fest 2020 Online
52mModern Java in Action
43mKeeping Up With Java
59mEffective Java SE 12 APIs/Lang features, makes your life easier
54mEffective JavaSE9 to 15APIs/Lang features, makes your life easier.
57mThe New ExcitementAround Good Old Java
