SlideShare ist ein Scribd-Unternehmen logo
1 von 59
Downloaden Sie, um offline zu lesen
@ArneLimburg @_openknowledge #WISSENTEILEN
Reactive Applications
in Enterprise Java
@ArneLimburg
@_openknowledge
ÜBER MICH
Reactive Enterprise Java | Arne Limburg
• Enterprise Architect bei der open knowledge GmbH
• Themen
• Microservices
• Domain Driven Design
• APIs
• Architektur
• Coaching
• Technologie (JEE)
Arne Limburg
Was ist eigentlich
Reactive Programming?
@ArneLimburg @_openknowledge #WISSENTEILEN
@ArneLimburg @_openknowledge #WISSENTEILEN
@ArneLimburg @_openknowledge #WISSENTEILEN
@ArneLimburg @_openknowledge #WISSENTEILEN
Reactive Programming
in der Praxis?
Reactive Enterprise Java | Arne Limburg
Reactive Javascript
var request = new XMLHttpRequest();
request.open("POST", "/orders", true);
request.onload = function (e) {
...
};
request.send(null);
1
2
3
4
@ArneLimburg @_openknowledge #WISSENTEILEN
Und jetzt
bitte reactive
@ArneLimburg @_openknowledge #WISSENTEILEN
Reactive Enterprise Java | Arne Limburg
Asynchronous JAX-RS Client
ClientBuilder
.newClient ()
.target("https://...")
.request()
.async()
.get(new InvocationCallback<OrderStatus>() {
public void completed(OrderStatus response) {
…
}
public void failed(Throwable error) {
…
}
});
^
@GET @Path("/orders/{orderNo}/status")
public void waitForStatusChange(
@PathParam("orderNo") UUID orderNo,
@Suspended AsyncResponse asyncResponse) {
newClient().target("https://...payment-service...").request().async()
.get(new InvocationCallback<OrderStatus>() {
public void completed(PaymentStatus statusResponse) {
asyncResponse.resume(statusResponse::toPaymentStatus);
}
public void failed(Throwable error) { … }
});
}
Reactive Enterprise Java | Arne Limburg
Asynchronous JAX-RS
^
@GET @Path("/orders/{orderNo}/status")
public void waitForStatusChange(
@PathParam("orderNo") UUID orderNo,
@Suspended AsyncResponse asyncResponse) {
newClient().target("https://...payment-service...").request().async()
.get(new InvocationCallback<OrderStatus>() {
public void completed(PaymentStatus statusResponse) { … }
public void failed(Throwable error) {
asyncResponse.resume(error);
}
});
}
Reactive Enterprise Java | Arne Limburg
Asynchronous JAX-RS
@ArneLimburg @_openknowledge #WISSENTEILEN
Willkommen in der Callback-Hölle
Reactive Enterprise Java | Arne Limburg
Promises in Javascript
fetch("https://...order-service...")
.then(…)
.catch(…)
Reactive Enterprise Java | Arne Limburg
Mit Java 8 – CompletableFuture
@Inject
private ManagedExecutorService executor;
@POST
public void createCustomer(final Customer customer,
@Suspended final AsyncResponse asyncResponse) {
CompletableFuture
.supplyAsync(() -> createCustomer(customer), executor)
.thenApply(customer -> buildResponse(customer))
.thenAccept(asyncResponse::resume);
}
@GET @Path("/orders/{orderNo}/status")
public CompletitonStage<OrderStatus> getOrderStatus(
@PathParam("orderNo") UUID orderNo) {
return newClient()
.target("https://...payment-service...")
.request()
.rx()
.get()
.exceptionally(…)
.thenApply(OrderStatus::fromPaymentStatus);
}
Reactive Enterprise Java | Arne Limburg
Mit JAX RS 2.1 und CompletionStage
@ArneLimburg @_openknowledge #WISSENTEILEN
Reactive Enterprise Java | Arne Limburg
Kombination mehrerer Ergebnisse in JS
Promise.all([
fetch("https://...payment-service..."),
fetch("https://...stock-service..."),
fetch("https://...shipping-service...")
])
.then(…)
.catch(…)
Reactive Enterprise Java | Arne Limburg
Kombination mehrerer Ergebnisse
^
^
@GET @Path("/orders/{orderNo}/status")
public CompletableFuture<OrderStatus> getOrderStatus(
@PathParam("orderNo") UUID orderNo) {
CompletionStage<PaymentStatus> paymentResponse
= newClient().target("https://...payment-serv...")
.rx().get(PaymentStatus.class);
CompletionStage<StockStatus> stockResponse
= newClient().target("https://...stock-service...")
.rx().get(StockStatus.class);
return paymentResponse
.thenCombine(stockResponse, (p, s) -> OrderStatus.of(…));
}
^
^
Aber was ist mit Listen?
@ArneLimburg @_openknowledge #WISSENTEILEN
@ArneLimburg @_openknowledge #WISSENTEILEN
@ArneLimburg @_openknowledge #WISSENTEILEN
Stream-Oriented Programming
91
'[' '{' '"' '}' ',' '{' ... '}''n' 'a' 'm' 'e' '"' ':' ...
123 34 110 ...
@ArneLimburg @_openknowledge #WISSENTEILEN
Stream-Oriented Programming
91
'[' '{' '"' '}' ',' '{' ... '}'
[ { "name" } , { ... }
'n' 'a' 'm' 'e' '"' ':' ...
: ...
123 34 110 ...
@ArneLimburg @_openknowledge #WISSENTEILEN
Stream-Oriented Programming
91
'[' '{' '"' '}' ',' '{' ... '}'
[ { "name" } , { ... }
'n' 'a' 'm' 'e' '"' ':' ...
: ...
{"name": ... } {...}
Customer 1 Customer 2
123 34 110 ...
Reactive Enterprise Java | Arne Limburg
ReactiveX / Akka / Project Reactor
input
.map(Converter::toCharacter)
.buffer(Tokenizer::tokenize)
.buffer(JsonObjectCollector::collect)
.map(CustomerOrder::new);
Backpressure
@ArneLimburg @_openknowledge #WISSENTEILEN
@ArneLimburg @_openknowledge #WISSENTEILEN
Reactive Support in Java 9
Reactive Enterprise Java | Arne Limburg
Java 9 Flow API
public interface Flow.Publisher<T>;
public interface Flow.Subscriber<T>;
public interface Flow.Processor<T, R>;
public interface Flow.Subscription;
Reactive Enterprise Java | Arne Limburg
Java 9 Flow API
public interface Flow.Publisher<T> {
void subscribe(Flow.Subscriber<? super T> subscriber);
}
Reactive Enterprise Java | Arne Limburg
Java 9 Flow API
public interface Flow.Subscriber<T> {
void onSubscribe(Flow.Subscription subscription);
void onNext(T item);
void onError(Throwable error);
void onComplete();
}
Reactive Enterprise Java | Arne Limburg
Java 9 Flow API
public interface Flow.Subscription {
void request(long n);
void cancel();
}
Reactive Enterprise Java | Arne Limburg
Java 9 Flow API
public interface Flow.Processor<T, R>
extends Flow.Subscriber<T>, Flow.Publisher<R> {
}
Reactive Enterprise Java | Arne Limburg
Reactive mit Spring Webflux
@GetMapping("/orders/{orderNo}/status")
public Mono<OrderStatus> getStatus(@PathVariable("orderNo") number) {
return WebClient
.create("https://…payment-service…")
.get()
.accept(APPLICATION_JSON)
.retrieve()
.toMono(PaymentStatus.class)
.map(OrderStatus::fromPaymentStatus);
}
Reactive Enterprise Java | Arne Limburg
Logging & Debugging?
@GetMapping("/orders/{orderNo}/status")
public Mono<OrderStatus> getStatus(@PathVariable("orderNo") number) {
Hooks.onOperatorDebug();
return WebClient
.create("https://…payment-service…")
.get()
.accept(APPLICATION_JSON)
.retrieve()
.toMono(PaymentStatus.class)
.log()
.checkpoint() // alternative to Hooks.onOperatorDebug()
.map(OrderStatus::fromPaymentStatus);
}
@ArneLimburg @_openknowledge #WISSENTEILEN
@ArneLimburg @_openknowledge #WISSENTEILEN
Reactive Enterprise Java | Arne Limburg
Kombinierter Status mit Project Reactor
Mono<OrderStatus> orderStatus
= Mono.zip(
WebClient.create("https://…payment-service…").get()
.accept(APPLICATION_JSON).retrieve().toMono(PaymentStatus.class),
WebClient.create("https://…stock-service…").get()
.accept(APPLICATION_JSON).retrieve().toMono(StockStatus.class),
WebClient.create("https://…shipping-service…").get()
.accept(APPLICATION_JSON).retrieve().toMono(ShippingStatus.class))
.map(this::toOrderStatus);
Reactive Enterprise Java | Arne Limburg
Reactive mit Spring Webflux
@GetMapping("/orders")
public Flux<CustomerOrder> getOrders() {
return orderRepository.findAll();
}
@ArneLimburg @_openknowledge #WISSENTEILEN
Reactive Enterprise Java | Arne Limburg
Reactive Mongo DB mit Spring
public interface ReactiveMongoOperations {
<T> Mono<T> findOne(Query query, Class<T> entityClass);
<T> Flux<T> find(Query query, Class<T> entityClass);
<T> Mono<T> insert(T objectToSave, String collectionName);
<T> Mono<T> insert(Mono<? extends T> objectToSave);
}
Reactive Enterprise Java | Arne Limburg
Reactive Database Access mit R2DBC
Publisher<OrderItem> items = client.execute()
.sql("SELECT ITEM_ID, ITEM_NAME FROM TAB_ORDER_ITEM")
.fetch()
.all();
items.subscribe(rowProcessor);
Reactive Enterprise Java | Arne Limburg
Reactive mit Spring Data R2DBC
public class OrderService {
@Inject private OrderItemRepository repository;
@Transactional
public Flux<Order> processOrder(Order order) {
… = repository.findByOrderNumber(order.getNumber());
…
}
}
public interface OrderItemRepository extends CrudRepository<OrderItem, …> {
@Query("SELECT ITEM_ID, … FROM ORDER_ITEM WHERE ORDER_NO = :orderNo")
Flux<OrderItem> findByOrderNumber(String orderNo);
}
@ArneLimburg @_openknowledge #WISSENTEILEN
Reactive als Java Sprachfeature?
Reactive Enterprise Java | Arne Limburg
Async & Await in Javascript
async function fetch(url) { … }
const paymentResponse
= await fetch("https://…payment-service…");
const paymentStatus = await paymentResponse.json();
const stockResponse
= await fetch("https://…stock-service…");
const stockStatus = await stockResponse.json();
Reactive Enterprise Java | Arne Limburg
Async & Await in Javascript
const orderIds = await connection
.execute("SELECT orderId FROM CustomerOrder ");
async function execute(sql) {
return new Promise(…);
}
Reactive Enterprise Java | Arne Limburg
Blockierender Thread in Java
ResultSet result = statement
.executeQuery("SELECT orderId FROM CustomerOrder");
while (result.next()) {
…
}
Reactive Enterprise Java | Arne Limburg
Reactive Database Access mit R2DBC
Publisher<OrderItem> items = client.execute()
.sql("SELECT ITEM_ID, ITEM_NAME FROM TAB_ORDER_ITEM")
.fetch()
.all();
items.subscribe(rowProcessor);
Reactive Enterprise Java | Arne Limburg
Blockierender Thread in Java
ResultSet result
= statement
.executeQuery("SELECT orderId FROM CustomerOrder");
while (result.next()) {
…
}
@ArneLimburg @_openknowledge #WISSENTEILEN
Fazit
CompletionStage reicht meistens
Integration von Reactive Bibliotheken mit Flow
Project Loom to rule them all
Reactive Enterprise Java | Arne Limburg
FRAGEN
? ? ?
KONTAKT
Reactive Enterprise Java | Arne Limburg
ARNE LIMBURG
ENTERPRISE ARCHITECT
arne.limburg@openknowledge.de
+49 (0)441 4082 – 0
Icons in this presentation designed by “Freepik”, “Nice and Serious” and “Elegant Themes” from www.flaticon.com
OFFENKUNDIGGUT

Weitere ähnliche Inhalte

Ähnlich wie Reactive Applications in Enterprise Java

Crossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end FrameworkCrossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end FrameworkDaniel Spector
 
Microservices Chaos Testing at Jet
Microservices Chaos Testing at JetMicroservices Chaos Testing at Jet
Microservices Chaos Testing at JetC4Media
 
Dev sum - Beyond REST with GraphQL in .Net
Dev sum - Beyond REST with GraphQL in .NetDev sum - Beyond REST with GraphQL in .Net
Dev sum - Beyond REST with GraphQL in .NetIrina Scurtu
 
Reactive programming with RxJS - Taiwan
Reactive programming with RxJS - TaiwanReactive programming with RxJS - Taiwan
Reactive programming with RxJS - Taiwanmodernweb
 
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav DukhinFwdays
 
Deploying Next Gen Systems with Zero Downtime
Deploying Next Gen Systems with Zero DowntimeDeploying Next Gen Systems with Zero Downtime
Deploying Next Gen Systems with Zero DowntimeTwilio Inc
 
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)jeffz
 
React native meetup 2019
React native meetup 2019React native meetup 2019
React native meetup 2019Arjun Kava
 
Serverless Single Page Apps with React and Redux at ItCamp 2017
Serverless Single Page Apps with React and Redux at ItCamp 2017Serverless Single Page Apps with React and Redux at ItCamp 2017
Serverless Single Page Apps with React and Redux at ItCamp 2017Melania Andrisan (Danciu)
 
Javaslang Talk @ Javaland 2017
Javaslang Talk @ Javaland 2017Javaslang Talk @ Javaland 2017
Javaslang Talk @ Javaland 2017David Schmitz
 
Need for Speed: Removing speed bumps in API Projects
Need for Speed: Removing speed bumps in API ProjectsNeed for Speed: Removing speed bumps in API Projects
Need for Speed: Removing speed bumps in API ProjectsŁukasz Chruściel
 
QCon 2015 Scala for the Enterprise: Get FuNkEd Up on the JVM
QCon 2015 Scala for the Enterprise: Get FuNkEd Up on the JVMQCon 2015 Scala for the Enterprise: Get FuNkEd Up on the JVM
QCon 2015 Scala for the Enterprise: Get FuNkEd Up on the JVMPeter Pilgrim
 
3 things you must know to think reactive - Geecon Kraków 2015
3 things you must know to think reactive - Geecon Kraków 20153 things you must know to think reactive - Geecon Kraków 2015
3 things you must know to think reactive - Geecon Kraków 2015Manuel Bernhardt
 
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVMVoxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVMManuel Bernhardt
 
Web technologies-course 12.pptx
Web technologies-course 12.pptxWeb technologies-course 12.pptx
Web technologies-course 12.pptxStefan Oprea
 
Buildingsocialanalyticstoolwithmongodb
BuildingsocialanalyticstoolwithmongodbBuildingsocialanalyticstoolwithmongodb
BuildingsocialanalyticstoolwithmongodbMongoDB APAC
 
How to perform debounce in react
How to perform debounce in reactHow to perform debounce in react
How to perform debounce in reactBOSC Tech Labs
 
MongoDB.local Berlin: Building a GraphQL API with MongoDB, Prisma and Typescript
MongoDB.local Berlin: Building a GraphQL API with MongoDB, Prisma and TypescriptMongoDB.local Berlin: Building a GraphQL API with MongoDB, Prisma and Typescript
MongoDB.local Berlin: Building a GraphQL API with MongoDB, Prisma and TypescriptMongoDB
 
Embrace NoSQL and Eventual Consistency with Ripple
Embrace NoSQL and Eventual Consistency with RippleEmbrace NoSQL and Eventual Consistency with Ripple
Embrace NoSQL and Eventual Consistency with RippleSean Cribbs
 
Elixir, GraphQL and Vue.js
Elixir, GraphQL and Vue.jsElixir, GraphQL and Vue.js
Elixir, GraphQL and Vue.jsJeroen Visser
 

Ähnlich wie Reactive Applications in Enterprise Java (20)

Crossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end FrameworkCrossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end Framework
 
Microservices Chaos Testing at Jet
Microservices Chaos Testing at JetMicroservices Chaos Testing at Jet
Microservices Chaos Testing at Jet
 
Dev sum - Beyond REST with GraphQL in .Net
Dev sum - Beyond REST with GraphQL in .NetDev sum - Beyond REST with GraphQL in .Net
Dev sum - Beyond REST with GraphQL in .Net
 
Reactive programming with RxJS - Taiwan
Reactive programming with RxJS - TaiwanReactive programming with RxJS - Taiwan
Reactive programming with RxJS - Taiwan
 
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
 
Deploying Next Gen Systems with Zero Downtime
Deploying Next Gen Systems with Zero DowntimeDeploying Next Gen Systems with Zero Downtime
Deploying Next Gen Systems with Zero Downtime
 
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
 
React native meetup 2019
React native meetup 2019React native meetup 2019
React native meetup 2019
 
Serverless Single Page Apps with React and Redux at ItCamp 2017
Serverless Single Page Apps with React and Redux at ItCamp 2017Serverless Single Page Apps with React and Redux at ItCamp 2017
Serverless Single Page Apps with React and Redux at ItCamp 2017
 
Javaslang Talk @ Javaland 2017
Javaslang Talk @ Javaland 2017Javaslang Talk @ Javaland 2017
Javaslang Talk @ Javaland 2017
 
Need for Speed: Removing speed bumps in API Projects
Need for Speed: Removing speed bumps in API ProjectsNeed for Speed: Removing speed bumps in API Projects
Need for Speed: Removing speed bumps in API Projects
 
QCon 2015 Scala for the Enterprise: Get FuNkEd Up on the JVM
QCon 2015 Scala for the Enterprise: Get FuNkEd Up on the JVMQCon 2015 Scala for the Enterprise: Get FuNkEd Up on the JVM
QCon 2015 Scala for the Enterprise: Get FuNkEd Up on the JVM
 
3 things you must know to think reactive - Geecon Kraków 2015
3 things you must know to think reactive - Geecon Kraków 20153 things you must know to think reactive - Geecon Kraków 2015
3 things you must know to think reactive - Geecon Kraków 2015
 
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVMVoxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
 
Web technologies-course 12.pptx
Web technologies-course 12.pptxWeb technologies-course 12.pptx
Web technologies-course 12.pptx
 
Buildingsocialanalyticstoolwithmongodb
BuildingsocialanalyticstoolwithmongodbBuildingsocialanalyticstoolwithmongodb
Buildingsocialanalyticstoolwithmongodb
 
How to perform debounce in react
How to perform debounce in reactHow to perform debounce in react
How to perform debounce in react
 
MongoDB.local Berlin: Building a GraphQL API with MongoDB, Prisma and Typescript
MongoDB.local Berlin: Building a GraphQL API with MongoDB, Prisma and TypescriptMongoDB.local Berlin: Building a GraphQL API with MongoDB, Prisma and Typescript
MongoDB.local Berlin: Building a GraphQL API with MongoDB, Prisma and Typescript
 
Embrace NoSQL and Eventual Consistency with Ripple
Embrace NoSQL and Eventual Consistency with RippleEmbrace NoSQL and Eventual Consistency with Ripple
Embrace NoSQL and Eventual Consistency with Ripple
 
Elixir, GraphQL and Vue.js
Elixir, GraphQL and Vue.jsElixir, GraphQL and Vue.js
Elixir, GraphQL and Vue.js
 

Mehr von OPEN KNOWLEDGE GmbH

Cloud-native and Enterprise Java? Hold my beer!
Cloud-native and Enterprise Java? Hold my beer!Cloud-native and Enterprise Java? Hold my beer!
Cloud-native and Enterprise Java? Hold my beer!OPEN KNOWLEDGE GmbH
 
From Zero to still Zero: The most beautiful mistakes going into the cloud.
From Zero to still Zero: The most beautiful mistakes going into the cloud. From Zero to still Zero: The most beautiful mistakes going into the cloud.
From Zero to still Zero: The most beautiful mistakes going into the cloud. OPEN KNOWLEDGE GmbH
 
Ready for the Future: Jakarta EE in Zeiten von Cloud Native & Co
Ready for the Future: Jakarta EE in Zeiten von Cloud Native & CoReady for the Future: Jakarta EE in Zeiten von Cloud Native & Co
Ready for the Future: Jakarta EE in Zeiten von Cloud Native & CoOPEN KNOWLEDGE GmbH
 
Shared Data in verteilten Architekturen
Shared Data in verteilten ArchitekturenShared Data in verteilten Architekturen
Shared Data in verteilten ArchitekturenOPEN KNOWLEDGE GmbH
 
Machine Learning mit TensorFlow.js
Machine Learning mit TensorFlow.jsMachine Learning mit TensorFlow.js
Machine Learning mit TensorFlow.jsOPEN KNOWLEDGE GmbH
 
It's not Rocket Science: Neuronale Netze
It's not Rocket Science: Neuronale NetzeIt's not Rocket Science: Neuronale Netze
It's not Rocket Science: Neuronale NetzeOPEN KNOWLEDGE GmbH
 
Shared Data in verteilten Systemen
Shared Data in verteilten SystemenShared Data in verteilten Systemen
Shared Data in verteilten SystemenOPEN KNOWLEDGE GmbH
 
Mehr Sicherheit durch Automatisierung
Mehr Sicherheit durch AutomatisierungMehr Sicherheit durch Automatisierung
Mehr Sicherheit durch AutomatisierungOPEN KNOWLEDGE GmbH
 
API-Design, Microarchitecture und Testing
API-Design, Microarchitecture und TestingAPI-Design, Microarchitecture und Testing
API-Design, Microarchitecture und TestingOPEN KNOWLEDGE GmbH
 
Supersonic Java für die Cloud: Quarkus
Supersonic Java für die Cloud: QuarkusSupersonic Java für die Cloud: Quarkus
Supersonic Java für die Cloud: QuarkusOPEN KNOWLEDGE GmbH
 
Hilfe, ich will meinen Monolithen zurück!
Hilfe, ich will meinen Monolithen zurück!Hilfe, ich will meinen Monolithen zurück!
Hilfe, ich will meinen Monolithen zurück!OPEN KNOWLEDGE GmbH
 
Das ist doch alles nur Frontend - Wer braucht da schon Architektur?
Das ist doch alles nur Frontend - Wer braucht da schon Architektur?Das ist doch alles nur Frontend - Wer braucht da schon Architektur?
Das ist doch alles nur Frontend - Wer braucht da schon Architektur?OPEN KNOWLEDGE GmbH
 
Auf geht‘s in die Cloud: „Das kann doch nicht so schwer sein!“
Auf geht‘s in die Cloud: „Das kann doch nicht so schwer sein!“Auf geht‘s in die Cloud: „Das kann doch nicht so schwer sein!“
Auf geht‘s in die Cloud: „Das kann doch nicht so schwer sein!“OPEN KNOWLEDGE GmbH
 
Das Product Goal oder "Ohne Ziele laufen eben alle in die Richtung, die ihnen...
Das Product Goal oder "Ohne Ziele laufen eben alle in die Richtung, die ihnen...Das Product Goal oder "Ohne Ziele laufen eben alle in die Richtung, die ihnen...
Das Product Goal oder "Ohne Ziele laufen eben alle in die Richtung, die ihnen...OPEN KNOWLEDGE GmbH
 
Die Matrix: Enterprise-Architekturen jenseits von Microservices
Die Matrix: Enterprise-Architekturen jenseits von MicroservicesDie Matrix: Enterprise-Architekturen jenseits von Microservices
Die Matrix: Enterprise-Architekturen jenseits von MicroservicesOPEN KNOWLEDGE GmbH
 

Mehr von OPEN KNOWLEDGE GmbH (20)

Nie wieder Log-Files!
Nie wieder Log-Files!Nie wieder Log-Files!
Nie wieder Log-Files!
 
Cloud-native and Enterprise Java? Hold my beer!
Cloud-native and Enterprise Java? Hold my beer!Cloud-native and Enterprise Java? Hold my beer!
Cloud-native and Enterprise Java? Hold my beer!
 
From Zero to still Zero: The most beautiful mistakes going into the cloud.
From Zero to still Zero: The most beautiful mistakes going into the cloud. From Zero to still Zero: The most beautiful mistakes going into the cloud.
From Zero to still Zero: The most beautiful mistakes going into the cloud.
 
API Expand Contract
API Expand ContractAPI Expand Contract
API Expand Contract
 
Ready for the Future: Jakarta EE in Zeiten von Cloud Native & Co
Ready for the Future: Jakarta EE in Zeiten von Cloud Native & CoReady for the Future: Jakarta EE in Zeiten von Cloud Native & Co
Ready for the Future: Jakarta EE in Zeiten von Cloud Native & Co
 
Shared Data in verteilten Architekturen
Shared Data in verteilten ArchitekturenShared Data in verteilten Architekturen
Shared Data in verteilten Architekturen
 
Machine Learning mit TensorFlow.js
Machine Learning mit TensorFlow.jsMachine Learning mit TensorFlow.js
Machine Learning mit TensorFlow.js
 
KI und Architektur
KI und ArchitekturKI und Architektur
KI und Architektur
 
It's not Rocket Science: Neuronale Netze
It's not Rocket Science: Neuronale NetzeIt's not Rocket Science: Neuronale Netze
It's not Rocket Science: Neuronale Netze
 
Shared Data in verteilten Systemen
Shared Data in verteilten SystemenShared Data in verteilten Systemen
Shared Data in verteilten Systemen
 
Business-Mehrwert durch KI
Business-Mehrwert durch KIBusiness-Mehrwert durch KI
Business-Mehrwert durch KI
 
Mehr Sicherheit durch Automatisierung
Mehr Sicherheit durch AutomatisierungMehr Sicherheit durch Automatisierung
Mehr Sicherheit durch Automatisierung
 
API-Design, Microarchitecture und Testing
API-Design, Microarchitecture und TestingAPI-Design, Microarchitecture und Testing
API-Design, Microarchitecture und Testing
 
Supersonic Java für die Cloud: Quarkus
Supersonic Java für die Cloud: QuarkusSupersonic Java für die Cloud: Quarkus
Supersonic Java für die Cloud: Quarkus
 
Hilfe, ich will meinen Monolithen zurück!
Hilfe, ich will meinen Monolithen zurück!Hilfe, ich will meinen Monolithen zurück!
Hilfe, ich will meinen Monolithen zurück!
 
Das ist doch alles nur Frontend - Wer braucht da schon Architektur?
Das ist doch alles nur Frontend - Wer braucht da schon Architektur?Das ist doch alles nur Frontend - Wer braucht da schon Architektur?
Das ist doch alles nur Frontend - Wer braucht da schon Architektur?
 
Auf geht‘s in die Cloud: „Das kann doch nicht so schwer sein!“
Auf geht‘s in die Cloud: „Das kann doch nicht so schwer sein!“Auf geht‘s in die Cloud: „Das kann doch nicht so schwer sein!“
Auf geht‘s in die Cloud: „Das kann doch nicht so schwer sein!“
 
Das Product Goal oder "Ohne Ziele laufen eben alle in die Richtung, die ihnen...
Das Product Goal oder "Ohne Ziele laufen eben alle in die Richtung, die ihnen...Das Product Goal oder "Ohne Ziele laufen eben alle in die Richtung, die ihnen...
Das Product Goal oder "Ohne Ziele laufen eben alle in die Richtung, die ihnen...
 
Serverless Survival Guide
Serverless Survival GuideServerless Survival Guide
Serverless Survival Guide
 
Die Matrix: Enterprise-Architekturen jenseits von Microservices
Die Matrix: Enterprise-Architekturen jenseits von MicroservicesDie Matrix: Enterprise-Architekturen jenseits von Microservices
Die Matrix: Enterprise-Architekturen jenseits von Microservices
 

Kürzlich hochgeladen

Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 

Kürzlich hochgeladen (20)

Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Odoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting ServiceOdoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting Service
 

Reactive Applications in Enterprise Java

  • 1. @ArneLimburg @_openknowledge #WISSENTEILEN Reactive Applications in Enterprise Java @ArneLimburg @_openknowledge
  • 2. ÜBER MICH Reactive Enterprise Java | Arne Limburg • Enterprise Architect bei der open knowledge GmbH • Themen • Microservices • Domain Driven Design • APIs • Architektur • Coaching • Technologie (JEE) Arne Limburg
  • 9. Reactive Enterprise Java | Arne Limburg Reactive Javascript var request = new XMLHttpRequest(); request.open("POST", "/orders", true); request.onload = function (e) { ... }; request.send(null); 1 2 3 4
  • 13. Reactive Enterprise Java | Arne Limburg Asynchronous JAX-RS Client ClientBuilder .newClient () .target("https://...") .request() .async() .get(new InvocationCallback<OrderStatus>() { public void completed(OrderStatus response) { … } public void failed(Throwable error) { … } }); ^
  • 14. @GET @Path("/orders/{orderNo}/status") public void waitForStatusChange( @PathParam("orderNo") UUID orderNo, @Suspended AsyncResponse asyncResponse) { newClient().target("https://...payment-service...").request().async() .get(new InvocationCallback<OrderStatus>() { public void completed(PaymentStatus statusResponse) { asyncResponse.resume(statusResponse::toPaymentStatus); } public void failed(Throwable error) { … } }); } Reactive Enterprise Java | Arne Limburg Asynchronous JAX-RS ^
  • 15. @GET @Path("/orders/{orderNo}/status") public void waitForStatusChange( @PathParam("orderNo") UUID orderNo, @Suspended AsyncResponse asyncResponse) { newClient().target("https://...payment-service...").request().async() .get(new InvocationCallback<OrderStatus>() { public void completed(PaymentStatus statusResponse) { … } public void failed(Throwable error) { asyncResponse.resume(error); } }); } Reactive Enterprise Java | Arne Limburg Asynchronous JAX-RS
  • 17. Reactive Enterprise Java | Arne Limburg Promises in Javascript fetch("https://...order-service...") .then(…) .catch(…)
  • 18. Reactive Enterprise Java | Arne Limburg Mit Java 8 – CompletableFuture @Inject private ManagedExecutorService executor; @POST public void createCustomer(final Customer customer, @Suspended final AsyncResponse asyncResponse) { CompletableFuture .supplyAsync(() -> createCustomer(customer), executor) .thenApply(customer -> buildResponse(customer)) .thenAccept(asyncResponse::resume); }
  • 19. @GET @Path("/orders/{orderNo}/status") public CompletitonStage<OrderStatus> getOrderStatus( @PathParam("orderNo") UUID orderNo) { return newClient() .target("https://...payment-service...") .request() .rx() .get() .exceptionally(…) .thenApply(OrderStatus::fromPaymentStatus); } Reactive Enterprise Java | Arne Limburg Mit JAX RS 2.1 und CompletionStage
  • 21. Reactive Enterprise Java | Arne Limburg Kombination mehrerer Ergebnisse in JS Promise.all([ fetch("https://...payment-service..."), fetch("https://...stock-service..."), fetch("https://...shipping-service...") ]) .then(…) .catch(…)
  • 22. Reactive Enterprise Java | Arne Limburg Kombination mehrerer Ergebnisse ^ ^ @GET @Path("/orders/{orderNo}/status") public CompletableFuture<OrderStatus> getOrderStatus( @PathParam("orderNo") UUID orderNo) { CompletionStage<PaymentStatus> paymentResponse = newClient().target("https://...payment-serv...") .rx().get(PaymentStatus.class); CompletionStage<StockStatus> stockResponse = newClient().target("https://...stock-service...") .rx().get(StockStatus.class); return paymentResponse .thenCombine(stockResponse, (p, s) -> OrderStatus.of(…)); } ^ ^
  • 23. Aber was ist mit Listen?
  • 26. @ArneLimburg @_openknowledge #WISSENTEILEN Stream-Oriented Programming 91 '[' '{' '"' '}' ',' '{' ... '}''n' 'a' 'm' 'e' '"' ':' ... 123 34 110 ...
  • 27. @ArneLimburg @_openknowledge #WISSENTEILEN Stream-Oriented Programming 91 '[' '{' '"' '}' ',' '{' ... '}' [ { "name" } , { ... } 'n' 'a' 'm' 'e' '"' ':' ... : ... 123 34 110 ...
  • 28. @ArneLimburg @_openknowledge #WISSENTEILEN Stream-Oriented Programming 91 '[' '{' '"' '}' ',' '{' ... '}' [ { "name" } , { ... } 'n' 'a' 'm' 'e' '"' ':' ... : ... {"name": ... } {...} Customer 1 Customer 2 123 34 110 ...
  • 29. Reactive Enterprise Java | Arne Limburg ReactiveX / Akka / Project Reactor input .map(Converter::toCharacter) .buffer(Tokenizer::tokenize) .buffer(JsonObjectCollector::collect) .map(CustomerOrder::new);
  • 33. Reactive Enterprise Java | Arne Limburg Java 9 Flow API public interface Flow.Publisher<T>; public interface Flow.Subscriber<T>; public interface Flow.Processor<T, R>; public interface Flow.Subscription;
  • 34. Reactive Enterprise Java | Arne Limburg Java 9 Flow API public interface Flow.Publisher<T> { void subscribe(Flow.Subscriber<? super T> subscriber); }
  • 35. Reactive Enterprise Java | Arne Limburg Java 9 Flow API public interface Flow.Subscriber<T> { void onSubscribe(Flow.Subscription subscription); void onNext(T item); void onError(Throwable error); void onComplete(); }
  • 36. Reactive Enterprise Java | Arne Limburg Java 9 Flow API public interface Flow.Subscription { void request(long n); void cancel(); }
  • 37. Reactive Enterprise Java | Arne Limburg Java 9 Flow API public interface Flow.Processor<T, R> extends Flow.Subscriber<T>, Flow.Publisher<R> { }
  • 38. Reactive Enterprise Java | Arne Limburg Reactive mit Spring Webflux @GetMapping("/orders/{orderNo}/status") public Mono<OrderStatus> getStatus(@PathVariable("orderNo") number) { return WebClient .create("https://…payment-service…") .get() .accept(APPLICATION_JSON) .retrieve() .toMono(PaymentStatus.class) .map(OrderStatus::fromPaymentStatus); }
  • 39. Reactive Enterprise Java | Arne Limburg Logging & Debugging? @GetMapping("/orders/{orderNo}/status") public Mono<OrderStatus> getStatus(@PathVariable("orderNo") number) { Hooks.onOperatorDebug(); return WebClient .create("https://…payment-service…") .get() .accept(APPLICATION_JSON) .retrieve() .toMono(PaymentStatus.class) .log() .checkpoint() // alternative to Hooks.onOperatorDebug() .map(OrderStatus::fromPaymentStatus); }
  • 42. Reactive Enterprise Java | Arne Limburg Kombinierter Status mit Project Reactor Mono<OrderStatus> orderStatus = Mono.zip( WebClient.create("https://…payment-service…").get() .accept(APPLICATION_JSON).retrieve().toMono(PaymentStatus.class), WebClient.create("https://…stock-service…").get() .accept(APPLICATION_JSON).retrieve().toMono(StockStatus.class), WebClient.create("https://…shipping-service…").get() .accept(APPLICATION_JSON).retrieve().toMono(ShippingStatus.class)) .map(this::toOrderStatus);
  • 43. Reactive Enterprise Java | Arne Limburg Reactive mit Spring Webflux @GetMapping("/orders") public Flux<CustomerOrder> getOrders() { return orderRepository.findAll(); }
  • 45. Reactive Enterprise Java | Arne Limburg Reactive Mongo DB mit Spring public interface ReactiveMongoOperations { <T> Mono<T> findOne(Query query, Class<T> entityClass); <T> Flux<T> find(Query query, Class<T> entityClass); <T> Mono<T> insert(T objectToSave, String collectionName); <T> Mono<T> insert(Mono<? extends T> objectToSave); }
  • 46. Reactive Enterprise Java | Arne Limburg Reactive Database Access mit R2DBC Publisher<OrderItem> items = client.execute() .sql("SELECT ITEM_ID, ITEM_NAME FROM TAB_ORDER_ITEM") .fetch() .all(); items.subscribe(rowProcessor);
  • 47. Reactive Enterprise Java | Arne Limburg Reactive mit Spring Data R2DBC public class OrderService { @Inject private OrderItemRepository repository; @Transactional public Flux<Order> processOrder(Order order) { … = repository.findByOrderNumber(order.getNumber()); … } } public interface OrderItemRepository extends CrudRepository<OrderItem, …> { @Query("SELECT ITEM_ID, … FROM ORDER_ITEM WHERE ORDER_NO = :orderNo") Flux<OrderItem> findByOrderNumber(String orderNo); }
  • 49. Reactive Enterprise Java | Arne Limburg Async & Await in Javascript async function fetch(url) { … } const paymentResponse = await fetch("https://…payment-service…"); const paymentStatus = await paymentResponse.json(); const stockResponse = await fetch("https://…stock-service…"); const stockStatus = await stockResponse.json();
  • 50. Reactive Enterprise Java | Arne Limburg Async & Await in Javascript const orderIds = await connection .execute("SELECT orderId FROM CustomerOrder "); async function execute(sql) { return new Promise(…); }
  • 51. Reactive Enterprise Java | Arne Limburg Blockierender Thread in Java ResultSet result = statement .executeQuery("SELECT orderId FROM CustomerOrder"); while (result.next()) { … }
  • 52.
  • 53. Reactive Enterprise Java | Arne Limburg Reactive Database Access mit R2DBC Publisher<OrderItem> items = client.execute() .sql("SELECT ITEM_ID, ITEM_NAME FROM TAB_ORDER_ITEM") .fetch() .all(); items.subscribe(rowProcessor);
  • 54.
  • 55.
  • 56. Reactive Enterprise Java | Arne Limburg Blockierender Thread in Java ResultSet result = statement .executeQuery("SELECT orderId FROM CustomerOrder"); while (result.next()) { … }
  • 57. @ArneLimburg @_openknowledge #WISSENTEILEN Fazit CompletionStage reicht meistens Integration von Reactive Bibliotheken mit Flow Project Loom to rule them all
  • 58. Reactive Enterprise Java | Arne Limburg FRAGEN ? ? ?
  • 59. KONTAKT Reactive Enterprise Java | Arne Limburg ARNE LIMBURG ENTERPRISE ARCHITECT arne.limburg@openknowledge.de +49 (0)441 4082 – 0 Icons in this presentation designed by “Freepik”, “Nice and Serious” and “Elegant Themes” from www.flaticon.com OFFENKUNDIGGUT