SlideShare a Scribd company logo
JF James, 2024
When Java
meets GenAI
at JChateau
Context
I'm neither a data scientist
nor an AI specialist
Just a Java Dev and
Software Architect
Wondering how to leverage
LLMs impressive
capabilities in our Apps
Experimentation
LET’S
EXPERIMENT
QUARKUS-
LANCHAIN4J
EXTENSION
WITH A SIMPLE
CAR BOOKING
APP
FOCUS ON
RAG AND
FUNCTION CALLS
USING AZURE GPT 3.5 & 4
How to
• Basic REST/HTTP
• Specific SDK: OpenAI
• Framework: langchain
• Low/No Code: FlowizeAI
• Orchestration tool: RAGNA
LangChain
• A popular framework for developing applications powered
by language models
• Assemblages of components for accomplishing higher-
level tasks
• Connect various building blocks: large language models,
document loaders, text splitters, output parsers, vector
stores to store text embeddings, tools, and prompts
• Supports Python and JavaScript
• Launched elf 2022 (just after ChatGPT release)
langchain4j
• The “Java version” of langchain
• Simplify the integration of AI/LLM capabilities into your
Java application
• Launched in 2023
• Last release : 0.27.1 (6 March 2024)
Quarkus-langchain4j
• Seamless integration between Quarkus and LangChain4j
• Easy incorporation of LLMs into your Quarkus applications
• Launched eof 2023
• Last release : 0.9.0 (6 March 2024) based on langchain4j
0.27.1
A fast pace of change
2017
Transformer
GPT1
2018
langchain
2022
2022
ChatGPT
2023
langchain4j
quarkus-langchain4j
2023
Defining an AI service
Defining an AI interface
@RegisterAiService
public interface CustomerSupportAgent {
// Free chat method, unstructured user message
@SystemMessage("You are a customer support agent of a car rental company …")
String chat(String userMessage);
// Structured fraud detection method with parameters
@SystemMessage("You are a car booking fraud detection AI… »)
@UserMessage("Your task is to detect if a fraud was committed for the customer {{name}} {{surname}} …")
String detectFraudForCustomer(String name, String surname);
}
LLM configuration
# Connection configuration to Azure OpenAI instance
quarkus.langchain4j.azure-openai.api-key=…
quarkus.langchain4j.azure-openai.resource-name=…
quarkus.langchain4j.azure-openai.deployment-name=…
quarkus.langchain4j.azure-openai.endpoint=…
# Warning: function calls support depends on the api-version
quarkus.langchain4j.azure-openai.api-version=2023-12-01-preview
quarkus.langchain4j.azure-openai.max-retries=2
quarkus.langchain4j.azure-openai.timeout=60S
# Set the model temperature for deterministic (non-creative) behavior (between 0 and 2)
quarkus.langchain4j.azure-openai.chat-model.temperature=0.1
# An alternative (or a complement?) to temperature: 0.1 means only top 10% probable tokens are considered
quarkus.langchain4j.azure-openai.chat-model.top-p=0.1
# Logging requests and responses in dev mode
%dev.quarkus.langchain4j.azure-openai.log-requests=true
%dev.quarkus.langchain4j.azure-openai.log-responses=true
Rietreval
Augmented
Generation
Principles
• Augment the LLM with specific knowledge
• From different data sources and formats: text, PDF, CSV …
• First off, the input text is turned into a vectorial representation
• Each request is then completed with relevant selected data
• Vector databases: InMemory, PgVector, Redis, Chroma …
• In-process embedding models: all-minlm-l6-v2-q, bge-small-en, bge-
small-zh …
Ingesting documents
public void ingest(@Observes StartupEvent evt) throws Exception {
DocumentSplitter splitter = DocumentSplitters.recursive(500, 0);
EmbeddingStoreIngestor ingestor = EmbeddingStoreIngestor
.builder()
.embeddingStore(embeddingStore)
.embeddingModel(embeddingModel)
.documentSplitter(splitter)
.build();
List<Document> docs = loadDocs();
ingestor.ingest(docs);
}
Retrieving relevant contents
public class DocRetriever implements ContentRetriever {
…
// From 0 (low selectivity) to 1 (high selectivity)
private static final double MIN_SCORE = 0.7;
@Inject
public DocRetriever(EmbeddingStore<TextSegment> store, EmbeddingModel model) {
this.retriever = EmbeddingStoreContentRetriever
.builder()
.embeddingModel(model)
.embeddingStore(store)
.maxResults(MAX_RESULTS)
.minScore(MIN_SCORE)
.build();
}
@Override
public List<Content> retrieve(Query query) {
return retriever.retrieve(query);
}
}
Binding an AI service to a document retriever
// Binding is defined with the RegisterAiService annotation
@RegisterAiService(retrievalAugmentor = DocRagAugmentor.class))
public interface CustomerSupportAgent { … }
// DocRagAugmentor is an intermediate class supplying the retriever
public class DocRagAugmentor implements Supplier<RetrievalAugmentor> {
@Override
public RetrievalAugmentor get() { … }
}
RAG configuration
# Local Embedding Model for RAG
quarkus.langchain4j.embedding-model.provider=dev.langchain4j…AllMiniLmL6V2EmbeddingModel
# Local directory for RAG documents
app.local-data-for-rag.dir=data-for-rag
Function calls
Stephan Pirson, 2023
Basic principles
1. Instruct the LLM to call App functions
2. A function is a Java method annotated with @Tool
3. Function descriptors are sent requests
4. The LLM decides whether it’s relevant to call a function
5. A description of the function call is provided in the response
6. quarkus-langchain4j automatically calls the @Tool method
Perspective
Use the LLM as a “workflow
engine”
The LLM is entrusted with the
decision to call business logic
Both powerful and dangerous
Trustable? Reliable?
Defining a function
@Tool("Get booking details for booking number {bookingNumber} and customer {name} {surname}")
public Booking getBookingDetails(String bookingNumber, String name, String surname) {
Log.info("DEMO: Calling Tool-getBookingDetails: " + bookingNumber + " and customer: "
+ name + " " + surname);
return checkBookingExists(bookingNumber, name, surname);
}
Binding the functions to an AI interface
@RegisterAiService(tools = BookingService.class)
public interface CustomerSupportAgent { … }
LLM initial request
"functions":[
{
"name":"getBookingDetails",
"description":"Get booking details for {bookingNumber} and customer {firstName} {lastName}",
"parameters":{
"type":"object",
"properties":{
"firstName":{
"type":"string"
},
"lastName":{
"type":"string"
},
"bookingNumber":{
"type":"string"
}
},
"required":[
"bookingNumber",
"firstName",
"lastName"
]
}
}, …]
LLM intermediate response
"choices":[
{
"finish_reason":"function_call",
"index":0,
"message":{
"role":"assistant",
"function_call":{
"name":"getBookingDetails",
"arguments":"{"firstName":"James","lastName":"Bond","bookingNumber":"456-789"}"
}
},
…
}
]
LLM intermediate request
{
"role":"function",
"name":"getBookingDetails",
"content":"{"bookingNumber" : "456-789",
"customer" : { "firstName" : "James", "lastName" : "Bond" },
"startDate" : "2024-03-01",
"endDate" : "2024-03-09",
"carModel" : "Volvo",
"cancelled" : false}"
}
Example of a booking cancelation
Initial request
Second request
Response: “Your booking 456-789 has
been successfully cancelled, Mr. Bond.
Prompt: “I'm James Bond, can you
cancel my booking 456-789”
Local execution
Third request
call getBookingDetails
POST
final response (finish_reason=stop)
POST cancelBooking result
Stateless request
processing
Local execution
call cancelBooking
POST getBookingDetails result
Stateless request
processing
Stateless request
processing
User Application LLM
Lessons learnt
Lesson learns
• Overall interesting results:
• quarkus-langchain4j makes GenAI really easy!
• Even a generic LLM such as GPT proves to be helpful regarding a specific domain context
• GPT4 is more precise but significantly slower in this example:
• GPT 4 >=5 sec
• GPT 3.5 >=2 sec
• RAG:
• Be selective: set min_score appropriately in your context when retrieving text segments
• Request message can be verbose: selected text segments are added to the user message
• Function calls:
• Not supported by all LLMs
• Powerful and dangerous
• Hard to debug
• Potentially verbose: 1 round-trip per function call
• Many requests under the cover, similar to JPA N+1 queries problem
• Non-deterministic behavior but acceptable with temperature and seed set to minimum
• To be used with care on critical functions: payment, cancelation
Next steps
• Testability
• Auditability
• Observability
• Security
• Production readiness
• Real use cases beyond the fun
Code available on GitHub
https://github.com/jefrajames/car-booking

More Related Content

PPTX
Storage Requirements and Options for Running Spark on Kubernetes
PDF
User Story Smells & Anti-patterns
PPTX
Stephan Ewen - Experiences running Flink at Very Large Scale
PDF
Splunk Architecture | Splunk Tutorial For Beginners | Splunk Training | Splun...
PDF
Kafka internals
PDF
Accelerating Spark SQL Workloads to 50X Performance with Apache Arrow-Based F...
PDF
Disaster Recovery and High Availability with Kafka, SRM and MM2
PDF
Using Data Science for Cybersecurity
Storage Requirements and Options for Running Spark on Kubernetes
User Story Smells & Anti-patterns
Stephan Ewen - Experiences running Flink at Very Large Scale
Splunk Architecture | Splunk Tutorial For Beginners | Splunk Training | Splun...
Kafka internals
Accelerating Spark SQL Workloads to 50X Performance with Apache Arrow-Based F...
Disaster Recovery and High Availability with Kafka, SRM and MM2
Using Data Science for Cybersecurity

What's hot (20)

PPTX
A visual introduction to Apache Kafka
PDF
How to GraphQL
PDF
Apache Hadoop YARN – Multi-Tenancy, Capacity Scheduler & Preemption - Stamped...
PDF
Running Apache NiFi with Apache Spark : Integration Options
ODP
Wireguard VPN
PPTX
Apache Ranger
PPTX
Fundamentals of Stream Processing with Apache Beam, Tyler Akidau, Frances Perry
PDF
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
PDF
Swoole w PHP. Czy to ma sens?
PPT
Cloudera Impala Internals
PDF
Saga pattern and event sourcing with kafka
PPTX
From Project Manager to Scrum Master
PDF
Building Real-Time BI Systems with Kafka, Spark, and Kudu: Spark Summit East ...
PDF
Machine Learning using Kubeflow and Kubernetes
PPTX
Change Data Capture to Data Lakes Using Apache Pulsar and Apache Hudi - Pulsa...
PDF
Getting Started with Confluent Schema Registry
PDF
Apache Druid®: A Dance of Distributed Processes
PDF
FPGA-Based Acceleration Architecture for Spark SQL Qi Xie and Quanfu Wang
PDF
MuleSoft SAP Integration using IDocs
PPTX
Exactly-Once Financial Data Processing at Scale with Flink and Pinot
A visual introduction to Apache Kafka
How to GraphQL
Apache Hadoop YARN – Multi-Tenancy, Capacity Scheduler & Preemption - Stamped...
Running Apache NiFi with Apache Spark : Integration Options
Wireguard VPN
Apache Ranger
Fundamentals of Stream Processing with Apache Beam, Tyler Akidau, Frances Perry
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Swoole w PHP. Czy to ma sens?
Cloudera Impala Internals
Saga pattern and event sourcing with kafka
From Project Manager to Scrum Master
Building Real-Time BI Systems with Kafka, Spark, and Kudu: Spark Summit East ...
Machine Learning using Kubeflow and Kubernetes
Change Data Capture to Data Lakes Using Apache Pulsar and Apache Hudi - Pulsa...
Getting Started with Confluent Schema Registry
Apache Druid®: A Dance of Distributed Processes
FPGA-Based Acceleration Architecture for Spark SQL Qi Xie and Quanfu Wang
MuleSoft SAP Integration using IDocs
Exactly-Once Financial Data Processing at Scale with Flink and Pinot
Ad

Similar to When GenAI meets with Java with Quarkus and langchain4j (20)

PDF
Scalable web application architecture
PPTX
Intro to node and mongodb 1
PDF
Logisland "Event Mining at scale"
PDF
Building APIs in an easy way using API Platform
PDF
exploring-spring-boot-clients.pdf Spring Boot
PDF
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
PDF
Apex Enterprise Patterns: Building Strong Foundations
PDF
Securing Microservices using Play and Akka HTTP
PDF
WebNet Conference 2012 - Designing complex applications using html5 and knock...
PDF
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
PDF
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
PPTX
#CNX14 - Intro to Force
PDF
web2py:Web development like a boss
PDF
Make your gui shine with ajax solr
PDF
OpenERP Technical Memento
PDF
2024 Dec 05 - PyData Global - Tutorial Its In The Air Tonight
PPTX
ServerLess by usama Azure fuctions.pptx
PPTX
SharePoint REST vs CSOM
PPTX
Practices and Tools for Building Better APIs
Scalable web application architecture
Intro to node and mongodb 1
Logisland "Event Mining at scale"
Building APIs in an easy way using API Platform
exploring-spring-boot-clients.pdf Spring Boot
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
Apex Enterprise Patterns: Building Strong Foundations
Securing Microservices using Play and Akka HTTP
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
#CNX14 - Intro to Force
web2py:Web development like a boss
Make your gui shine with ajax solr
OpenERP Technical Memento
2024 Dec 05 - PyData Global - Tutorial Its In The Air Tonight
ServerLess by usama Azure fuctions.pptx
SharePoint REST vs CSOM
Practices and Tools for Building Better APIs
Ad

More from Jean-Francois James (7)

PPTX
Loom promises: be there!
PDF
LyonJUG-2023-v1.0.pdf
PDF
ParisJUG-2022-v0.4.pdf
PDF
Boost your APIs with GraphQL
PDF
Tnt 2020-jf-james
PDF
Talk Oracle Code One 2019
PDF
Boost your API with GraphQL
Loom promises: be there!
LyonJUG-2023-v1.0.pdf
ParisJUG-2022-v0.4.pdf
Boost your APIs with GraphQL
Tnt 2020-jf-james
Talk Oracle Code One 2019
Boost your API with GraphQL

Recently uploaded (20)

PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Cloud computing and distributed systems.
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Machine Learning_overview_presentation.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Big Data Technologies - Introduction.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
sap open course for s4hana steps from ECC to s4
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
MIND Revenue Release Quarter 2 2025 Press Release
Diabetes mellitus diagnosis method based random forest with bat algorithm
NewMind AI Weekly Chronicles - August'25-Week II
Per capita expenditure prediction using model stacking based on satellite ima...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Reach Out and Touch Someone: Haptics and Empathic Computing
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Cloud computing and distributed systems.
Machine learning based COVID-19 study performance prediction
Machine Learning_overview_presentation.pptx
MYSQL Presentation for SQL database connectivity
Encapsulation_ Review paper, used for researhc scholars
Big Data Technologies - Introduction.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
sap open course for s4hana steps from ECC to s4
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025

When GenAI meets with Java with Quarkus and langchain4j

  • 1. JF James, 2024 When Java meets GenAI at JChateau
  • 2. Context I'm neither a data scientist nor an AI specialist Just a Java Dev and Software Architect Wondering how to leverage LLMs impressive capabilities in our Apps
  • 3. Experimentation LET’S EXPERIMENT QUARKUS- LANCHAIN4J EXTENSION WITH A SIMPLE CAR BOOKING APP FOCUS ON RAG AND FUNCTION CALLS USING AZURE GPT 3.5 & 4
  • 4. How to • Basic REST/HTTP • Specific SDK: OpenAI • Framework: langchain • Low/No Code: FlowizeAI • Orchestration tool: RAGNA
  • 5. LangChain • A popular framework for developing applications powered by language models • Assemblages of components for accomplishing higher- level tasks • Connect various building blocks: large language models, document loaders, text splitters, output parsers, vector stores to store text embeddings, tools, and prompts • Supports Python and JavaScript • Launched elf 2022 (just after ChatGPT release)
  • 6. langchain4j • The “Java version” of langchain • Simplify the integration of AI/LLM capabilities into your Java application • Launched in 2023 • Last release : 0.27.1 (6 March 2024)
  • 7. Quarkus-langchain4j • Seamless integration between Quarkus and LangChain4j • Easy incorporation of LLMs into your Quarkus applications • Launched eof 2023 • Last release : 0.9.0 (6 March 2024) based on langchain4j 0.27.1
  • 8. A fast pace of change 2017 Transformer GPT1 2018 langchain 2022 2022 ChatGPT 2023 langchain4j quarkus-langchain4j 2023
  • 9. Defining an AI service
  • 10. Defining an AI interface @RegisterAiService public interface CustomerSupportAgent { // Free chat method, unstructured user message @SystemMessage("You are a customer support agent of a car rental company …") String chat(String userMessage); // Structured fraud detection method with parameters @SystemMessage("You are a car booking fraud detection AI… ») @UserMessage("Your task is to detect if a fraud was committed for the customer {{name}} {{surname}} …") String detectFraudForCustomer(String name, String surname); }
  • 11. LLM configuration # Connection configuration to Azure OpenAI instance quarkus.langchain4j.azure-openai.api-key=… quarkus.langchain4j.azure-openai.resource-name=… quarkus.langchain4j.azure-openai.deployment-name=… quarkus.langchain4j.azure-openai.endpoint=… # Warning: function calls support depends on the api-version quarkus.langchain4j.azure-openai.api-version=2023-12-01-preview quarkus.langchain4j.azure-openai.max-retries=2 quarkus.langchain4j.azure-openai.timeout=60S # Set the model temperature for deterministic (non-creative) behavior (between 0 and 2) quarkus.langchain4j.azure-openai.chat-model.temperature=0.1 # An alternative (or a complement?) to temperature: 0.1 means only top 10% probable tokens are considered quarkus.langchain4j.azure-openai.chat-model.top-p=0.1 # Logging requests and responses in dev mode %dev.quarkus.langchain4j.azure-openai.log-requests=true %dev.quarkus.langchain4j.azure-openai.log-responses=true
  • 13. Principles • Augment the LLM with specific knowledge • From different data sources and formats: text, PDF, CSV … • First off, the input text is turned into a vectorial representation • Each request is then completed with relevant selected data • Vector databases: InMemory, PgVector, Redis, Chroma … • In-process embedding models: all-minlm-l6-v2-q, bge-small-en, bge- small-zh …
  • 14. Ingesting documents public void ingest(@Observes StartupEvent evt) throws Exception { DocumentSplitter splitter = DocumentSplitters.recursive(500, 0); EmbeddingStoreIngestor ingestor = EmbeddingStoreIngestor .builder() .embeddingStore(embeddingStore) .embeddingModel(embeddingModel) .documentSplitter(splitter) .build(); List<Document> docs = loadDocs(); ingestor.ingest(docs); }
  • 15. Retrieving relevant contents public class DocRetriever implements ContentRetriever { … // From 0 (low selectivity) to 1 (high selectivity) private static final double MIN_SCORE = 0.7; @Inject public DocRetriever(EmbeddingStore<TextSegment> store, EmbeddingModel model) { this.retriever = EmbeddingStoreContentRetriever .builder() .embeddingModel(model) .embeddingStore(store) .maxResults(MAX_RESULTS) .minScore(MIN_SCORE) .build(); } @Override public List<Content> retrieve(Query query) { return retriever.retrieve(query); } }
  • 16. Binding an AI service to a document retriever // Binding is defined with the RegisterAiService annotation @RegisterAiService(retrievalAugmentor = DocRagAugmentor.class)) public interface CustomerSupportAgent { … } // DocRagAugmentor is an intermediate class supplying the retriever public class DocRagAugmentor implements Supplier<RetrievalAugmentor> { @Override public RetrievalAugmentor get() { … } }
  • 17. RAG configuration # Local Embedding Model for RAG quarkus.langchain4j.embedding-model.provider=dev.langchain4j…AllMiniLmL6V2EmbeddingModel # Local directory for RAG documents app.local-data-for-rag.dir=data-for-rag
  • 19. Stephan Pirson, 2023 Basic principles 1. Instruct the LLM to call App functions 2. A function is a Java method annotated with @Tool 3. Function descriptors are sent requests 4. The LLM decides whether it’s relevant to call a function 5. A description of the function call is provided in the response 6. quarkus-langchain4j automatically calls the @Tool method
  • 20. Perspective Use the LLM as a “workflow engine” The LLM is entrusted with the decision to call business logic Both powerful and dangerous Trustable? Reliable?
  • 21. Defining a function @Tool("Get booking details for booking number {bookingNumber} and customer {name} {surname}") public Booking getBookingDetails(String bookingNumber, String name, String surname) { Log.info("DEMO: Calling Tool-getBookingDetails: " + bookingNumber + " and customer: " + name + " " + surname); return checkBookingExists(bookingNumber, name, surname); }
  • 22. Binding the functions to an AI interface @RegisterAiService(tools = BookingService.class) public interface CustomerSupportAgent { … }
  • 23. LLM initial request "functions":[ { "name":"getBookingDetails", "description":"Get booking details for {bookingNumber} and customer {firstName} {lastName}", "parameters":{ "type":"object", "properties":{ "firstName":{ "type":"string" }, "lastName":{ "type":"string" }, "bookingNumber":{ "type":"string" } }, "required":[ "bookingNumber", "firstName", "lastName" ] } }, …]
  • 25. LLM intermediate request { "role":"function", "name":"getBookingDetails", "content":"{"bookingNumber" : "456-789", "customer" : { "firstName" : "James", "lastName" : "Bond" }, "startDate" : "2024-03-01", "endDate" : "2024-03-09", "carModel" : "Volvo", "cancelled" : false}" }
  • 26. Example of a booking cancelation Initial request Second request Response: “Your booking 456-789 has been successfully cancelled, Mr. Bond. Prompt: “I'm James Bond, can you cancel my booking 456-789” Local execution Third request call getBookingDetails POST final response (finish_reason=stop) POST cancelBooking result Stateless request processing Local execution call cancelBooking POST getBookingDetails result Stateless request processing Stateless request processing User Application LLM
  • 28. Lesson learns • Overall interesting results: • quarkus-langchain4j makes GenAI really easy! • Even a generic LLM such as GPT proves to be helpful regarding a specific domain context • GPT4 is more precise but significantly slower in this example: • GPT 4 >=5 sec • GPT 3.5 >=2 sec • RAG: • Be selective: set min_score appropriately in your context when retrieving text segments • Request message can be verbose: selected text segments are added to the user message • Function calls: • Not supported by all LLMs • Powerful and dangerous • Hard to debug • Potentially verbose: 1 round-trip per function call • Many requests under the cover, similar to JPA N+1 queries problem • Non-deterministic behavior but acceptable with temperature and seed set to minimum • To be used with care on critical functions: payment, cancelation
  • 29. Next steps • Testability • Auditability • Observability • Security • Production readiness • Real use cases beyond the fun
  • 30. Code available on GitHub https://github.com/jefrajames/car-booking