SlideShare a Scribd company logo
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
ADBA – Asynchronous Database Access
A new asynchronous API for connecting to a database
Douglas Surber Kuassi Mensah
JDBC Architect Director, Product Management
Database Server Technologies
November, 2018
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
3
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Introduction
Code
Wrap-up
Q&A
1
2
3
4
4
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
ADBA – Asynchronous Database Access
• What: Java standard database access API that never blocks user threads
• Who: Developed by the JDBC Community, JDBC Expert Group and Oracle
• When: Targeted for a near future release, Java 12 perhaps
• Why: async apps have better throughput
– Fewer threads means less thread scheduling, less thread contention
– Database access is slow so blocked threads leave resources idle for a long time
5
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Goals
• No user thread blocks ever
– Minimize the number of threads used for database access
• Alternate API for database access
– Not an extension to the current JDBC standard
– Not a replacement for the current JDBC standard
• Target high throughput apps
– Not a completely general purpose database access API
– At least version 1 will have a limited feature set
• Build on the Java SE class library
• Support 3rd party Reactive Stream Database Access APIs
6
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Design Choices
• No reference to java.sql
• Rigorous use of types
• Builder pattern
• Fluent API
• Immutable after initialization
• One way to do something is enough
• No SQL processing by the driver
• Avoid callback hell
7
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
What About …?
There are already multiple async Java and JavaScript APIs
• Streams
– Java streams are inherently synchronous
• ReactiveStreams
– ADBA uses java.util.concurrent.Flow where appropriate
– R2DBC (see next slide)
• NodeJS
8
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
R2DBC
• Pure Reactive Streams Database Access API
– Adheres to the Reactive Manifesto
– Non-blocking Backpressure (push-pull)
– Dependency on project Reactor library
– https://github.com/r2dbc
• R2DBC over ADBA “…allows usage of ADBA drivers by using the R2DBC SPI”
– https://github.com/r2dbc/r2dbc-over-adba
– Reminder: one of the goals of ADBA is to support Reactive Streams Database Access
APIs like R2DBC
Confidential – Oracle Internal/Restricted/Highly Restricted 9
Reactive Relational Database Connectivity
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Introduction
Code
Wrap-up
Q&A
1
2
3
4
10
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Trivial Insert
// RowCountOperation
public void insertItem(Session session, Item item) {
session.rowCountOperation("insert into tab values (:id, :name, :answer)")
.set("id", item.id(), AdbaType.NUMERIC)
.set("name", item.name(), AdbaType.VARCHAR)
.set("answer", item.answer(), AdbaType.NUMERIC)
.submit();
}
Confidential – Oracle Internal/Restricted/Highly Restricted 11
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
CompletionStage
java.util.concurrent.CompletionStage
• Java representation of a computational monad
• Mechanism for asynchronous programming
– Event based: push model -> higher scalability
– Allows composing asynchronous tasks
– Supports lambda expressions and fluent programming
• More @ http://bit.ly/2nnLqa0
12
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Execution Model
• Everything is an Operation
• An Operation consists of
– SQL or other database operation
– Parameter assignments
– Result handling
– Submission and CompletionStage
• User thread creates and submits Operations
– Creating and submitting never blocks; user thread never blocks
• Implementation executes those Operations asynchronously
– Performs round trip(s) to the database
– Executes result handling
– Completes CompletionStage
13
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
getDataSource
// DataSourceFactory
public DataSource getDataSource() {
return DataSourceFactory.newFactory("oracle.database.adba")
.builder()
.url("//host.oracle.com:5521/example")
.username("scott")
.password("tiger")
.build();
}
Confidential – Oracle Internal/Restricted/Highly Restricted 14
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Getting a Session
Default method in DataSource:
public default Session getSession() {
return builder().build().attach();
}
Default method in Session:
public default Session attach() {
this.submit();
this.attachOperation()
.submit();
return this;
}
15
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Trivial Select
// RowOperation
public void idsForAnswer(DataSource ds, List<Integer> result, int correctAnswer) {
try (Session session = ds.getSession()) {
session.<List<Integer>>rowOperation("select id, name, answer from tab where answer = :target")
.set("target", correctAnswer, AdbaType.NUMERIC)
.collect(() -> result,
(list, row) -> list.add(row.at("id").get(Integer.class)))
.submit();
}
}
Confidential – Oracle Internal/Restricted/Highly Restricted 16
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Close
@Override
public default void close() {
this.closeOperation()
.submit();
// submitting a close Operation must satisfy the requirements of
// OperationGroup.close()
}
Note: A CloseOperation is never skipped.
17
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
SQL Support
• All SQL is vendor specific
– No escape sequences
– No specified parameter markers
• Non vendor specific syntax requires processing by the driver
– Adds overhead
– Increases code complexity
– Minimal benefit as most apps are tied to a specific database regardless
Note: Code examples use parameter markers from a variety of databases including DB2
(:foo), MySQL (?), Oracle Database(:foo), PostgresSQL($1), SQL Server (@foo), and JDBC (?).
18
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
SELECT
// RowOperation
public CompletionStage<List<Item>> itemsForAnswer(DataSource ds, int answer) {
try (Session session = ds.getSession()) {
return session.<List<Item>>rowOperation("select id, name, answer from tab where answer = :target")
.set("target", 42, AdbaType.NUMERIC)
.collect(Collectors.mapping(
row -> new Item(row.at("id").get(Integer.class),
row.at("name").get(String.class),
row.at("answer").get(Integer.class)),
Collectors.toList()))
.submit()
.getCompletionStage();
}
}
Confidential – Oracle Internal/Restricted/Highly Restricted 19
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Transaction
// TransactionCompletion
public void transaction(DataSource ds) {
try (Session session = ds.getSession(t -> System.out.println("ERROR: " + t.toString()))){
TransactionCompletion trans = session.transactionCompletion();
CompletionStage<Integer> idPromise = session.<Integer>rowOperation("select empno, ename from
emp where ename = :1 for update")
.set("1", "CLARK", AdbaType.VARCHAR)
.collect(Collectors.collectingAndThen(
Collectors.mapping(r -> r.at("empno").get(Integer.class),
Collectors.toList()),
l -> l.get(0)))
.onError(t -> trans.setRollbackOnly())
.submit()
.getCompletionStage();
Confidential – Oracle Internal/Restricted/Highly Restricted 20
continued
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Transaction (continued)
session.<Long>rowCountOperation("update emp set deptno = :1 where empno = :2")
.set("1", 50, AdbaType.INTEGER)
.set("2", idPromise, AdbaType.INTEGER)
.apply(c -> {
if (c.getCount() != 1L) {
trans.setRollbackOnly();
throw new RuntimeException("updated wrong number of rows");
}
return c.getCount();
})
.onError(t -> trans.setRollbackOnly())
.submit();
// .getCompletionStage()
// .exceptionally( t -> { trans.setRollbackOnly(); return null;}) // incorrect
session.catchErrors();
session.commitMaybeRollback(trans);
}
}
Confidential – Oracle Internal/Restricted/Highly Restricted 21
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
OperationGroup
Operations can be grouped
• OperationGroup has its own result handling and CompletionStage
• Members submitted to group.OperationGroup submitted as a unit
• Order of execution
– Sequential in order submitted
– Parallel, any order
• Conditional or unconditional
• Error response
– Dependent: remaining group members skipped
– Independent: remaining group members unaffected
• Session is an OperationGroup
– Sequential, dependent, unconditional by default
22
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Parallel UPDATE
// Parallel, Independent OperationGroup
public void updateListParallel(List<Item> list, DataSource ds) {
String query = "select id from tab where answer = :answer";
String update = "update tab set name = :name where id = :id";
try (Session session = ds.getSession();
OperationGroup<Object, Object> group = session.operationGroup()
.independent()
.parallel()) {
group.submit();
for (Item elem : list) {
CompletionStage<Integer> idPromise = group.<List<Integer>>rowOperation(query)
.set("answer", elem.answer, AdbaType.NUMERIC)
.collect(Collector.of(
() -> new ArrayList<>(),
(l, row) -> l.add(row.at("id").get(Integer.class)),
(l, r) -> l))
.submit()
.getCompletionStage()
.thenApply(l -> l.get(0));
Confidential – Oracle Internal/Restricted/Highly Restricted 23
continued
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Parallel UPDATE (continued)
group.rowCountOperation(update)
.set("id", idPromise)
.set("name", "the ultimate question")
.submit()
.getCompletionStage()
.exceptionally(t -> {
System.out.println(elem.id);
return null;
});
}
}
}
Confidential – Oracle Internal/Restricted/Highly Restricted 24
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Reactive Streams – Non blocking Backpressure
java.util.concurrent.Flow
Confidential – Oracle Internal/Restricted/Highly Restricted 25
ADBA User Java code
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Row Publisher
// RowPublisherOperation
public CompletionStage<List<String>> rowSubscriber(DataSource ds) {
String sql = "select empno, ename from emp";
CompletableFuture<List<String>> result = new CompletableFuture<>();
Flow.Subscriber<Result.RowColumn> subscriber = new Flow.Subscriber<>() {
Flow.Subscription subscription;
List<String> names = new ArrayList<>();
int demand = 0;
@Override
public void onSubscribe(Flow.Subscription subscription) {
this.subscription = subscription;
this.subscription.request(10);
demand += 10;
}
Confidential – Oracle Internal/Restricted/Highly Restricted 26
continued
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Row Publisher(continued)
@Override
public void onNext(Result.RowColumn column) {
names.add(column.at("ename").get(String.class));
if (--demand < 1) {
subscription.request(10);
demand += 10;
}
}
@Override
public void onError(Throwable throwable) {
result.completeExceptionally(throwable);
}
@Override
public void onComplete() {
result.complete(names);
}
};
Confidential – Oracle Internal/Restricted/Highly Restricted 27
// Subscriber
continued
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Row Publisher(continued)
try (Session session = ds.getSession()) {
return session.<List<String>>rowPublisherOperation(sql)
.subscribe(subscriber, result)
.submit();
.getCompletionStage();
}
} // fetchEmployees
28
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Operation Submission Rate
public class RecordSubscriber implements Subscriber<byte[]> {
private final Session session;
private OperationGroup<Long, Long> group;
public RecordSubscriber(DataSource ds) {
session = ds.getSession();
}
@Override
public void onSubscribe(Subscription subscription) {
group = session.<Long, Long>operationGroup()
.independent()
.collect(Collectors.summingLong(c -> c));
group.submit();
session.requestHook(subscription::request);
}
continued
29
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Operation Submission Rate (continued)
@Override
public void onNext(byte[] item) {
String insert = "insert into tab values (@record)";
group.<Long>rowCountOperation(insert)
.set("record", item, AdbaType.VARBINARY)
.apply(c -> c.getCount())
.submit();
}
@Override
public void onError(Throwable t) {
group.close();
session.close();
}
@Override
public void onComplete() {
group.close();
session.close();
}
}
30
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Controlling Session Creation Rate
public class ItemSubscriber implements Subscriber<Item> {
private final DataSourceFactory factory;
private DataSource ds;
public ItemSubscriber(DataSourceFactory f) {
factory = f;
}
@Override
public void onSubscribe(Subscription subscription) {
ds = factory.builder()
.url("//host.oracle.com:5521/example")
.username("scott")
.password("tiger")
.requestHook(subscription::request)
.build();
}
continued
31
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Controlling Session Creation Rate (continued)
@Override
public void onNext(Item item) {
try (Session s = ds.getSession()) {
insertItem(s, item);
}
}
@Override
public void onError(Throwable t) {
ds.close();
}
@Override
public void onComplete() {
ds.close();
}
}
32
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Introduction
Code
Wrap-up
Q&A
1
2
3
4
33
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
AoJ – ADBA over JDBC
• Proof-of-concept implementation that uses any standard JDBC driver
• Very limited functionality
• Source released under the Apache license
• Oracle is updating AoJ to track changes in ADBA
34
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Status
• Everything is subject to change
• Developed through the Java Community Process
• You can participate via jdbc-spec-discuss@openjdk.java.net
• The API is available for download from OpenJDK at
http://hg.openjdk.java.net/jdk/sandbox/file/JDK-8188051-
branch/src/jdk.incubator.adba/share/classes
• AoJ source available at https://github.com/oracle/oracle-db-
examples/tree/master/java/AoJ
• Targeted for a near future release, Java 12 perhaps
35
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Introduction
Code
Wrap-up
Q&A
1
2
3
4
36
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Q & A
37
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 38
Reactive Java Programming: A new Asynchronous Database Access API by Kuassi Mensah

More Related Content

What's hot

Containers and workload security an overview
Containers and workload security an overview Containers and workload security an overview
Containers and workload security an overview
Krishna-Kumar
 
Deploying Containers on Azure
Deploying Containers on AzureDeploying Containers on Azure
Deploying Containers on Azure
Hussein Salman
 
Mirantis OpenStack 4.0 Overview
Mirantis OpenStack 4.0 OverviewMirantis OpenStack 4.0 Overview
Mirantis OpenStack 4.0 Overview
Mirantis
 
Innovation with Open Sources and App Modernization for Developers | Ian Y. Choi
Innovation with Open Sources and App Modernization for Developers | Ian Y. ChoiInnovation with Open Sources and App Modernization for Developers | Ian Y. Choi
Innovation with Open Sources and App Modernization for Developers | Ian Y. Choi
Vietnam Open Infrastructure User Group
 
Build Robust Blockchain Services with Hyperledger and Containers
Build Robust Blockchain Services with Hyperledger and ContainersBuild Robust Blockchain Services with Hyperledger and Containers
Build Robust Blockchain Services with Hyperledger and Containers
LinuxCon ContainerCon CloudOpen China
 
Securing Containers - Sathyajit Bhat - Adobe - Container Conference 18
Securing Containers - Sathyajit Bhat - Adobe - Container Conference 18Securing Containers - Sathyajit Bhat - Adobe - Container Conference 18
Securing Containers - Sathyajit Bhat - Adobe - Container Conference 18
CodeOps Technologies LLP
 
Open Source, infrastructure as Code, Cloud Native Apps 2015
Open Source, infrastructure as Code, Cloud Native Apps 2015Open Source, infrastructure as Code, Cloud Native Apps 2015
Open Source, infrastructure as Code, Cloud Native Apps 2015
Jonas Rosland
 
Introduction to Oracle Cloud Infrastructure Services
Introduction to Oracle Cloud Infrastructure ServicesIntroduction to Oracle Cloud Infrastructure Services
Introduction to Oracle Cloud Infrastructure Services
Knoldus Inc.
 
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSASpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSA
Oracle Korea
 
Azure dev ops_demo
Azure dev ops_demoAzure dev ops_demo
Azure dev ops_demo
Abhishek Sahu
 
From a monolith to microservices + REST: The evolution of LinkedIn's architec...
From a monolith to microservices + REST: The evolution of LinkedIn's architec...From a monolith to microservices + REST: The evolution of LinkedIn's architec...
From a monolith to microservices + REST: The evolution of LinkedIn's architec...
Karan Parikh
 
How to Make Money Solving 5 Major Problems of Cloud Hosting Customers
How to Make Money Solving 5 Major Problems of Cloud Hosting CustomersHow to Make Money Solving 5 Major Problems of Cloud Hosting Customers
How to Make Money Solving 5 Major Problems of Cloud Hosting Customers
Jelastic Multi-Cloud PaaS
 
Big data and Kubernetes
Big data and KubernetesBig data and Kubernetes
Big data and Kubernetes
Anirudh Ramanathan
 
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
CodeOps Technologies LLP
 
A New Centralized Volume Storage Solution for Docker and Container Cloud by W...
A New Centralized Volume Storage Solution for Docker and Container Cloud by W...A New Centralized Volume Storage Solution for Docker and Container Cloud by W...
A New Centralized Volume Storage Solution for Docker and Container Cloud by W...
Docker, Inc.
 
Spring to Image
Spring to ImageSpring to Image
Spring to Image
VMware Tanzu
 
Micro services vs hadoop
Micro services vs hadoopMicro services vs hadoop
Micro services vs hadoop
Gergely Devenyi
 
Resilient Microservices with Spring Cloud
Resilient Microservices with Spring CloudResilient Microservices with Spring Cloud
Resilient Microservices with Spring Cloud
VMware Tanzu
 
Data protection in a kubernetes-native world
Data protection in a kubernetes-native worldData protection in a kubernetes-native world
Data protection in a kubernetes-native world
LibbySchulze
 
Azure Service Fabric Overview
Azure Service Fabric OverviewAzure Service Fabric Overview
Azure Service Fabric Overview
João Pedro Martins
 

What's hot (20)

Containers and workload security an overview
Containers and workload security an overview Containers and workload security an overview
Containers and workload security an overview
 
Deploying Containers on Azure
Deploying Containers on AzureDeploying Containers on Azure
Deploying Containers on Azure
 
Mirantis OpenStack 4.0 Overview
Mirantis OpenStack 4.0 OverviewMirantis OpenStack 4.0 Overview
Mirantis OpenStack 4.0 Overview
 
Innovation with Open Sources and App Modernization for Developers | Ian Y. Choi
Innovation with Open Sources and App Modernization for Developers | Ian Y. ChoiInnovation with Open Sources and App Modernization for Developers | Ian Y. Choi
Innovation with Open Sources and App Modernization for Developers | Ian Y. Choi
 
Build Robust Blockchain Services with Hyperledger and Containers
Build Robust Blockchain Services with Hyperledger and ContainersBuild Robust Blockchain Services with Hyperledger and Containers
Build Robust Blockchain Services with Hyperledger and Containers
 
Securing Containers - Sathyajit Bhat - Adobe - Container Conference 18
Securing Containers - Sathyajit Bhat - Adobe - Container Conference 18Securing Containers - Sathyajit Bhat - Adobe - Container Conference 18
Securing Containers - Sathyajit Bhat - Adobe - Container Conference 18
 
Open Source, infrastructure as Code, Cloud Native Apps 2015
Open Source, infrastructure as Code, Cloud Native Apps 2015Open Source, infrastructure as Code, Cloud Native Apps 2015
Open Source, infrastructure as Code, Cloud Native Apps 2015
 
Introduction to Oracle Cloud Infrastructure Services
Introduction to Oracle Cloud Infrastructure ServicesIntroduction to Oracle Cloud Infrastructure Services
Introduction to Oracle Cloud Infrastructure Services
 
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSASpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSA
 
Azure dev ops_demo
Azure dev ops_demoAzure dev ops_demo
Azure dev ops_demo
 
From a monolith to microservices + REST: The evolution of LinkedIn's architec...
From a monolith to microservices + REST: The evolution of LinkedIn's architec...From a monolith to microservices + REST: The evolution of LinkedIn's architec...
From a monolith to microservices + REST: The evolution of LinkedIn's architec...
 
How to Make Money Solving 5 Major Problems of Cloud Hosting Customers
How to Make Money Solving 5 Major Problems of Cloud Hosting CustomersHow to Make Money Solving 5 Major Problems of Cloud Hosting Customers
How to Make Money Solving 5 Major Problems of Cloud Hosting Customers
 
Big data and Kubernetes
Big data and KubernetesBig data and Kubernetes
Big data and Kubernetes
 
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
 
A New Centralized Volume Storage Solution for Docker and Container Cloud by W...
A New Centralized Volume Storage Solution for Docker and Container Cloud by W...A New Centralized Volume Storage Solution for Docker and Container Cloud by W...
A New Centralized Volume Storage Solution for Docker and Container Cloud by W...
 
Spring to Image
Spring to ImageSpring to Image
Spring to Image
 
Micro services vs hadoop
Micro services vs hadoopMicro services vs hadoop
Micro services vs hadoop
 
Resilient Microservices with Spring Cloud
Resilient Microservices with Spring CloudResilient Microservices with Spring Cloud
Resilient Microservices with Spring Cloud
 
Data protection in a kubernetes-native world
Data protection in a kubernetes-native worldData protection in a kubernetes-native world
Data protection in a kubernetes-native world
 
Azure Service Fabric Overview
Azure Service Fabric OverviewAzure Service Fabric Overview
Azure Service Fabric Overview
 

Similar to Reactive Java Programming: A new Asynchronous Database Access API by Kuassi Mensah

Silicon Valley JUG meetup July 18, 2018
Silicon Valley JUG meetup July 18, 2018Silicon Valley JUG meetup July 18, 2018
Silicon Valley JUG meetup July 18, 2018
Oracle Developers
 
JDBC Next: A New Asynchronous API for Connecting to a Database
JDBC Next: A New Asynchronous API for Connecting to a Database JDBC Next: A New Asynchronous API for Connecting to a Database
JDBC Next: A New Asynchronous API for Connecting to a Database
Yolande Poirier
 
Coherence RoadMap 2018
Coherence RoadMap 2018Coherence RoadMap 2018
Coherence RoadMap 2018
harvraja
 
ADBA (Asynchronous Database Access)
ADBA (Asynchronous Database Access)ADBA (Asynchronous Database Access)
ADBA (Asynchronous Database Access)
Logico
 
JAX RS and CDI bike the reactive bridge
JAX RS and CDI bike the reactive bridgeJAX RS and CDI bike the reactive bridge
JAX RS and CDI bike the reactive bridge
José Paumard
 
Streaming Solutions for Real time problems
Streaming Solutions for Real time problemsStreaming Solutions for Real time problems
Streaming Solutions for Real time problems
Abhishek Gupta
 
Java EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersJava EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c Developers
Bruno Borges
 
20161029 py con-mysq-lv3
20161029 py con-mysq-lv320161029 py con-mysq-lv3
20161029 py con-mysq-lv3
Ivan Ma
 
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document StoreConnector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Filipe Silva
 
Functional Programming With Lambdas and Streams in JDK8
 Functional Programming With Lambdas and Streams in JDK8 Functional Programming With Lambdas and Streams in JDK8
Functional Programming With Lambdas and Streams in JDK8
IndicThreads
 
MySQL Connector/Node.js and the X DevAPI
MySQL Connector/Node.js and the X DevAPIMySQL Connector/Node.js and the X DevAPI
MySQL Connector/Node.js and the X DevAPI
Rui Quelhas
 
JAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesJAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web Services
Arun Gupta
 
MySQL Document Store
MySQL Document StoreMySQL Document Store
MySQL Document Store
Mario Beck
 
MySQL Quick Dive
MySQL Quick DiveMySQL Quick Dive
MySQL Quick Dive
Sudipta Kumar Sahoo
 
Java EE7
Java EE7Java EE7
Java EE7
Jay Lee
 
Introdução ao Oracle NoSQL
Introdução ao Oracle NoSQLIntrodução ao Oracle NoSQL
Introdução ao Oracle NoSQL
Bruno Borges
 
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Codemotion
 
Don't Wait! Develop responsive applications with Java EE7 instead
Don't Wait! Develop responsive applications with Java EE7 insteadDon't Wait! Develop responsive applications with Java EE7 instead
Don't Wait! Develop responsive applications with Java EE7 instead
Erin Schnabel
 
MySQL 8 loves JavaScript
MySQL 8 loves JavaScript MySQL 8 loves JavaScript
MySQL 8 loves JavaScript
Sanjay Manwani
 
20171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v120171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v1
Ivan Ma
 

Similar to Reactive Java Programming: A new Asynchronous Database Access API by Kuassi Mensah (20)

Silicon Valley JUG meetup July 18, 2018
Silicon Valley JUG meetup July 18, 2018Silicon Valley JUG meetup July 18, 2018
Silicon Valley JUG meetup July 18, 2018
 
JDBC Next: A New Asynchronous API for Connecting to a Database
JDBC Next: A New Asynchronous API for Connecting to a Database JDBC Next: A New Asynchronous API for Connecting to a Database
JDBC Next: A New Asynchronous API for Connecting to a Database
 
Coherence RoadMap 2018
Coherence RoadMap 2018Coherence RoadMap 2018
Coherence RoadMap 2018
 
ADBA (Asynchronous Database Access)
ADBA (Asynchronous Database Access)ADBA (Asynchronous Database Access)
ADBA (Asynchronous Database Access)
 
JAX RS and CDI bike the reactive bridge
JAX RS and CDI bike the reactive bridgeJAX RS and CDI bike the reactive bridge
JAX RS and CDI bike the reactive bridge
 
Streaming Solutions for Real time problems
Streaming Solutions for Real time problemsStreaming Solutions for Real time problems
Streaming Solutions for Real time problems
 
Java EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersJava EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c Developers
 
20161029 py con-mysq-lv3
20161029 py con-mysq-lv320161029 py con-mysq-lv3
20161029 py con-mysq-lv3
 
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document StoreConnector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
 
Functional Programming With Lambdas and Streams in JDK8
 Functional Programming With Lambdas and Streams in JDK8 Functional Programming With Lambdas and Streams in JDK8
Functional Programming With Lambdas and Streams in JDK8
 
MySQL Connector/Node.js and the X DevAPI
MySQL Connector/Node.js and the X DevAPIMySQL Connector/Node.js and the X DevAPI
MySQL Connector/Node.js and the X DevAPI
 
JAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesJAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web Services
 
MySQL Document Store
MySQL Document StoreMySQL Document Store
MySQL Document Store
 
MySQL Quick Dive
MySQL Quick DiveMySQL Quick Dive
MySQL Quick Dive
 
Java EE7
Java EE7Java EE7
Java EE7
 
Introdução ao Oracle NoSQL
Introdução ao Oracle NoSQLIntrodução ao Oracle NoSQL
Introdução ao Oracle NoSQL
 
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
 
Don't Wait! Develop responsive applications with Java EE7 instead
Don't Wait! Develop responsive applications with Java EE7 insteadDon't Wait! Develop responsive applications with Java EE7 instead
Don't Wait! Develop responsive applications with Java EE7 instead
 
MySQL 8 loves JavaScript
MySQL 8 loves JavaScript MySQL 8 loves JavaScript
MySQL 8 loves JavaScript
 
20171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v120171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v1
 

More from Oracle Developers

Running Kubernetes Workloads on Oracle Cloud Infrastructure
Running Kubernetes Workloads on Oracle Cloud InfrastructureRunning Kubernetes Workloads on Oracle Cloud Infrastructure
Running Kubernetes Workloads on Oracle Cloud Infrastructure
Oracle Developers
 
Apex atp customer_presentation_wwc march 2019
Apex atp customer_presentation_wwc march 2019Apex atp customer_presentation_wwc march 2019
Apex atp customer_presentation_wwc march 2019
Oracle Developers
 
Building Cloud Native Applications with Oracle Autonomous Database.
Building Cloud Native Applications with Oracle Autonomous Database.Building Cloud Native Applications with Oracle Autonomous Database.
Building Cloud Native Applications with Oracle Autonomous Database.
Oracle Developers
 
Fn meetup by Sardar Jamal Arif
Fn meetup by Sardar Jamal ArifFn meetup by Sardar Jamal Arif
Fn meetup by Sardar Jamal Arif
Oracle Developers
 
Get ready for_an_autonomous_data_driven_future_ext
Get ready for_an_autonomous_data_driven_future_extGet ready for_an_autonomous_data_driven_future_ext
Get ready for_an_autonomous_data_driven_future_ext
Oracle Developers
 
Cloud Native Meetup Santa Clara 07-11-2019 by Manish Kapur
Cloud Native Meetup Santa Clara 07-11-2019 by Manish KapurCloud Native Meetup Santa Clara 07-11-2019 by Manish Kapur
Cloud Native Meetup Santa Clara 07-11-2019 by Manish Kapur
Oracle Developers
 
Container Native Development Tools - Talk by Mickey Boxell
Container Native Development Tools - Talk by Mickey BoxellContainer Native Development Tools - Talk by Mickey Boxell
Container Native Development Tools - Talk by Mickey Boxell
Oracle Developers
 
General Capabilities of GraalVM by Oleg Selajev @shelajev
General Capabilities of GraalVM by Oleg Selajev @shelajevGeneral Capabilities of GraalVM by Oleg Selajev @shelajev
General Capabilities of GraalVM by Oleg Selajev @shelajev
Oracle Developers
 
GraalVM Native Images by Oleg Selajev @shelajev
GraalVM Native Images by Oleg Selajev @shelajevGraalVM Native Images by Oleg Selajev @shelajev
GraalVM Native Images by Oleg Selajev @shelajev
Oracle Developers
 
Serverless Patterns by Jesse Butler
Serverless Patterns by Jesse ButlerServerless Patterns by Jesse Butler
Serverless Patterns by Jesse Butler
Oracle Developers
 
Java Library for High Speed Streaming Data
Java Library for High Speed Streaming Data Java Library for High Speed Streaming Data
Java Library for High Speed Streaming Data
Oracle Developers
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
Oracle Developers
 
North America November Meetups
North America November MeetupsNorth America November Meetups
North America November Meetups
Oracle Developers
 
GraphPipe - Blazingly Fast Machine Learning Inference by Vish Abrams
GraphPipe - Blazingly Fast Machine Learning Inference by Vish AbramsGraphPipe - Blazingly Fast Machine Learning Inference by Vish Abrams
GraphPipe - Blazingly Fast Machine Learning Inference by Vish Abrams
Oracle Developers
 
North America Meetups in September
North America Meetups in September North America Meetups in September
North America Meetups in September
Oracle Developers
 
Oracle Data Science Platform
Oracle Data Science PlatformOracle Data Science Platform
Oracle Data Science Platform
Oracle Developers
 
Persistent storage with containers By Kaslin Fields
Persistent storage with containers By Kaslin FieldsPersistent storage with containers By Kaslin Fields
Persistent storage with containers By Kaslin Fields
Oracle Developers
 
The Fn Project by Jesse Butler
 The Fn Project by Jesse Butler The Fn Project by Jesse Butler
The Fn Project by Jesse Butler
Oracle Developers
 
Hyperledger Austin meetup July 10, 2018
Hyperledger Austin meetup July 10, 2018Hyperledger Austin meetup July 10, 2018
Hyperledger Austin meetup July 10, 2018
Oracle Developers
 
Oracle Global Meetups Team Update - Upcoming Meetups (July and August)
Oracle Global Meetups Team Update - Upcoming Meetups (July and August)Oracle Global Meetups Team Update - Upcoming Meetups (July and August)
Oracle Global Meetups Team Update - Upcoming Meetups (July and August)
Oracle Developers
 

More from Oracle Developers (20)

Running Kubernetes Workloads on Oracle Cloud Infrastructure
Running Kubernetes Workloads on Oracle Cloud InfrastructureRunning Kubernetes Workloads on Oracle Cloud Infrastructure
Running Kubernetes Workloads on Oracle Cloud Infrastructure
 
Apex atp customer_presentation_wwc march 2019
Apex atp customer_presentation_wwc march 2019Apex atp customer_presentation_wwc march 2019
Apex atp customer_presentation_wwc march 2019
 
Building Cloud Native Applications with Oracle Autonomous Database.
Building Cloud Native Applications with Oracle Autonomous Database.Building Cloud Native Applications with Oracle Autonomous Database.
Building Cloud Native Applications with Oracle Autonomous Database.
 
Fn meetup by Sardar Jamal Arif
Fn meetup by Sardar Jamal ArifFn meetup by Sardar Jamal Arif
Fn meetup by Sardar Jamal Arif
 
Get ready for_an_autonomous_data_driven_future_ext
Get ready for_an_autonomous_data_driven_future_extGet ready for_an_autonomous_data_driven_future_ext
Get ready for_an_autonomous_data_driven_future_ext
 
Cloud Native Meetup Santa Clara 07-11-2019 by Manish Kapur
Cloud Native Meetup Santa Clara 07-11-2019 by Manish KapurCloud Native Meetup Santa Clara 07-11-2019 by Manish Kapur
Cloud Native Meetup Santa Clara 07-11-2019 by Manish Kapur
 
Container Native Development Tools - Talk by Mickey Boxell
Container Native Development Tools - Talk by Mickey BoxellContainer Native Development Tools - Talk by Mickey Boxell
Container Native Development Tools - Talk by Mickey Boxell
 
General Capabilities of GraalVM by Oleg Selajev @shelajev
General Capabilities of GraalVM by Oleg Selajev @shelajevGeneral Capabilities of GraalVM by Oleg Selajev @shelajev
General Capabilities of GraalVM by Oleg Selajev @shelajev
 
GraalVM Native Images by Oleg Selajev @shelajev
GraalVM Native Images by Oleg Selajev @shelajevGraalVM Native Images by Oleg Selajev @shelajev
GraalVM Native Images by Oleg Selajev @shelajev
 
Serverless Patterns by Jesse Butler
Serverless Patterns by Jesse ButlerServerless Patterns by Jesse Butler
Serverless Patterns by Jesse Butler
 
Java Library for High Speed Streaming Data
Java Library for High Speed Streaming Data Java Library for High Speed Streaming Data
Java Library for High Speed Streaming Data
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
North America November Meetups
North America November MeetupsNorth America November Meetups
North America November Meetups
 
GraphPipe - Blazingly Fast Machine Learning Inference by Vish Abrams
GraphPipe - Blazingly Fast Machine Learning Inference by Vish AbramsGraphPipe - Blazingly Fast Machine Learning Inference by Vish Abrams
GraphPipe - Blazingly Fast Machine Learning Inference by Vish Abrams
 
North America Meetups in September
North America Meetups in September North America Meetups in September
North America Meetups in September
 
Oracle Data Science Platform
Oracle Data Science PlatformOracle Data Science Platform
Oracle Data Science Platform
 
Persistent storage with containers By Kaslin Fields
Persistent storage with containers By Kaslin FieldsPersistent storage with containers By Kaslin Fields
Persistent storage with containers By Kaslin Fields
 
The Fn Project by Jesse Butler
 The Fn Project by Jesse Butler The Fn Project by Jesse Butler
The Fn Project by Jesse Butler
 
Hyperledger Austin meetup July 10, 2018
Hyperledger Austin meetup July 10, 2018Hyperledger Austin meetup July 10, 2018
Hyperledger Austin meetup July 10, 2018
 
Oracle Global Meetups Team Update - Upcoming Meetups (July and August)
Oracle Global Meetups Team Update - Upcoming Meetups (July and August)Oracle Global Meetups Team Update - Upcoming Meetups (July and August)
Oracle Global Meetups Team Update - Upcoming Meetups (July and August)
 

Recently uploaded

Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 

Recently uploaded (20)

Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 

Reactive Java Programming: A new Asynchronous Database Access API by Kuassi Mensah

  • 1.
  • 2. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | ADBA – Asynchronous Database Access A new asynchronous API for connecting to a database Douglas Surber Kuassi Mensah JDBC Architect Director, Product Management Database Server Technologies November, 2018
  • 3. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 3
  • 4. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Program Agenda Introduction Code Wrap-up Q&A 1 2 3 4 4
  • 5. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | ADBA – Asynchronous Database Access • What: Java standard database access API that never blocks user threads • Who: Developed by the JDBC Community, JDBC Expert Group and Oracle • When: Targeted for a near future release, Java 12 perhaps • Why: async apps have better throughput – Fewer threads means less thread scheduling, less thread contention – Database access is slow so blocked threads leave resources idle for a long time 5
  • 6. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Goals • No user thread blocks ever – Minimize the number of threads used for database access • Alternate API for database access – Not an extension to the current JDBC standard – Not a replacement for the current JDBC standard • Target high throughput apps – Not a completely general purpose database access API – At least version 1 will have a limited feature set • Build on the Java SE class library • Support 3rd party Reactive Stream Database Access APIs 6
  • 7. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Design Choices • No reference to java.sql • Rigorous use of types • Builder pattern • Fluent API • Immutable after initialization • One way to do something is enough • No SQL processing by the driver • Avoid callback hell 7
  • 8. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | What About …? There are already multiple async Java and JavaScript APIs • Streams – Java streams are inherently synchronous • ReactiveStreams – ADBA uses java.util.concurrent.Flow where appropriate – R2DBC (see next slide) • NodeJS 8
  • 9. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | R2DBC • Pure Reactive Streams Database Access API – Adheres to the Reactive Manifesto – Non-blocking Backpressure (push-pull) – Dependency on project Reactor library – https://github.com/r2dbc • R2DBC over ADBA “…allows usage of ADBA drivers by using the R2DBC SPI” – https://github.com/r2dbc/r2dbc-over-adba – Reminder: one of the goals of ADBA is to support Reactive Streams Database Access APIs like R2DBC Confidential – Oracle Internal/Restricted/Highly Restricted 9 Reactive Relational Database Connectivity
  • 10. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Program Agenda Introduction Code Wrap-up Q&A 1 2 3 4 10
  • 11. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Trivial Insert // RowCountOperation public void insertItem(Session session, Item item) { session.rowCountOperation("insert into tab values (:id, :name, :answer)") .set("id", item.id(), AdbaType.NUMERIC) .set("name", item.name(), AdbaType.VARCHAR) .set("answer", item.answer(), AdbaType.NUMERIC) .submit(); } Confidential – Oracle Internal/Restricted/Highly Restricted 11
  • 12. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | CompletionStage java.util.concurrent.CompletionStage • Java representation of a computational monad • Mechanism for asynchronous programming – Event based: push model -> higher scalability – Allows composing asynchronous tasks – Supports lambda expressions and fluent programming • More @ http://bit.ly/2nnLqa0 12
  • 13. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Execution Model • Everything is an Operation • An Operation consists of – SQL or other database operation – Parameter assignments – Result handling – Submission and CompletionStage • User thread creates and submits Operations – Creating and submitting never blocks; user thread never blocks • Implementation executes those Operations asynchronously – Performs round trip(s) to the database – Executes result handling – Completes CompletionStage 13
  • 14. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | getDataSource // DataSourceFactory public DataSource getDataSource() { return DataSourceFactory.newFactory("oracle.database.adba") .builder() .url("//host.oracle.com:5521/example") .username("scott") .password("tiger") .build(); } Confidential – Oracle Internal/Restricted/Highly Restricted 14
  • 15. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Getting a Session Default method in DataSource: public default Session getSession() { return builder().build().attach(); } Default method in Session: public default Session attach() { this.submit(); this.attachOperation() .submit(); return this; } 15
  • 16. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Trivial Select // RowOperation public void idsForAnswer(DataSource ds, List<Integer> result, int correctAnswer) { try (Session session = ds.getSession()) { session.<List<Integer>>rowOperation("select id, name, answer from tab where answer = :target") .set("target", correctAnswer, AdbaType.NUMERIC) .collect(() -> result, (list, row) -> list.add(row.at("id").get(Integer.class))) .submit(); } } Confidential – Oracle Internal/Restricted/Highly Restricted 16
  • 17. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Close @Override public default void close() { this.closeOperation() .submit(); // submitting a close Operation must satisfy the requirements of // OperationGroup.close() } Note: A CloseOperation is never skipped. 17
  • 18. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | SQL Support • All SQL is vendor specific – No escape sequences – No specified parameter markers • Non vendor specific syntax requires processing by the driver – Adds overhead – Increases code complexity – Minimal benefit as most apps are tied to a specific database regardless Note: Code examples use parameter markers from a variety of databases including DB2 (:foo), MySQL (?), Oracle Database(:foo), PostgresSQL($1), SQL Server (@foo), and JDBC (?). 18
  • 19. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | SELECT // RowOperation public CompletionStage<List<Item>> itemsForAnswer(DataSource ds, int answer) { try (Session session = ds.getSession()) { return session.<List<Item>>rowOperation("select id, name, answer from tab where answer = :target") .set("target", 42, AdbaType.NUMERIC) .collect(Collectors.mapping( row -> new Item(row.at("id").get(Integer.class), row.at("name").get(String.class), row.at("answer").get(Integer.class)), Collectors.toList())) .submit() .getCompletionStage(); } } Confidential – Oracle Internal/Restricted/Highly Restricted 19
  • 20. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Transaction // TransactionCompletion public void transaction(DataSource ds) { try (Session session = ds.getSession(t -> System.out.println("ERROR: " + t.toString()))){ TransactionCompletion trans = session.transactionCompletion(); CompletionStage<Integer> idPromise = session.<Integer>rowOperation("select empno, ename from emp where ename = :1 for update") .set("1", "CLARK", AdbaType.VARCHAR) .collect(Collectors.collectingAndThen( Collectors.mapping(r -> r.at("empno").get(Integer.class), Collectors.toList()), l -> l.get(0))) .onError(t -> trans.setRollbackOnly()) .submit() .getCompletionStage(); Confidential – Oracle Internal/Restricted/Highly Restricted 20 continued
  • 21. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Transaction (continued) session.<Long>rowCountOperation("update emp set deptno = :1 where empno = :2") .set("1", 50, AdbaType.INTEGER) .set("2", idPromise, AdbaType.INTEGER) .apply(c -> { if (c.getCount() != 1L) { trans.setRollbackOnly(); throw new RuntimeException("updated wrong number of rows"); } return c.getCount(); }) .onError(t -> trans.setRollbackOnly()) .submit(); // .getCompletionStage() // .exceptionally( t -> { trans.setRollbackOnly(); return null;}) // incorrect session.catchErrors(); session.commitMaybeRollback(trans); } } Confidential – Oracle Internal/Restricted/Highly Restricted 21
  • 22. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OperationGroup Operations can be grouped • OperationGroup has its own result handling and CompletionStage • Members submitted to group.OperationGroup submitted as a unit • Order of execution – Sequential in order submitted – Parallel, any order • Conditional or unconditional • Error response – Dependent: remaining group members skipped – Independent: remaining group members unaffected • Session is an OperationGroup – Sequential, dependent, unconditional by default 22
  • 23. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Parallel UPDATE // Parallel, Independent OperationGroup public void updateListParallel(List<Item> list, DataSource ds) { String query = "select id from tab where answer = :answer"; String update = "update tab set name = :name where id = :id"; try (Session session = ds.getSession(); OperationGroup<Object, Object> group = session.operationGroup() .independent() .parallel()) { group.submit(); for (Item elem : list) { CompletionStage<Integer> idPromise = group.<List<Integer>>rowOperation(query) .set("answer", elem.answer, AdbaType.NUMERIC) .collect(Collector.of( () -> new ArrayList<>(), (l, row) -> l.add(row.at("id").get(Integer.class)), (l, r) -> l)) .submit() .getCompletionStage() .thenApply(l -> l.get(0)); Confidential – Oracle Internal/Restricted/Highly Restricted 23 continued
  • 24. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Parallel UPDATE (continued) group.rowCountOperation(update) .set("id", idPromise) .set("name", "the ultimate question") .submit() .getCompletionStage() .exceptionally(t -> { System.out.println(elem.id); return null; }); } } } Confidential – Oracle Internal/Restricted/Highly Restricted 24
  • 25. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Reactive Streams – Non blocking Backpressure java.util.concurrent.Flow Confidential – Oracle Internal/Restricted/Highly Restricted 25 ADBA User Java code
  • 26. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Row Publisher // RowPublisherOperation public CompletionStage<List<String>> rowSubscriber(DataSource ds) { String sql = "select empno, ename from emp"; CompletableFuture<List<String>> result = new CompletableFuture<>(); Flow.Subscriber<Result.RowColumn> subscriber = new Flow.Subscriber<>() { Flow.Subscription subscription; List<String> names = new ArrayList<>(); int demand = 0; @Override public void onSubscribe(Flow.Subscription subscription) { this.subscription = subscription; this.subscription.request(10); demand += 10; } Confidential – Oracle Internal/Restricted/Highly Restricted 26 continued
  • 27. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Row Publisher(continued) @Override public void onNext(Result.RowColumn column) { names.add(column.at("ename").get(String.class)); if (--demand < 1) { subscription.request(10); demand += 10; } } @Override public void onError(Throwable throwable) { result.completeExceptionally(throwable); } @Override public void onComplete() { result.complete(names); } }; Confidential – Oracle Internal/Restricted/Highly Restricted 27 // Subscriber continued
  • 28. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Row Publisher(continued) try (Session session = ds.getSession()) { return session.<List<String>>rowPublisherOperation(sql) .subscribe(subscriber, result) .submit(); .getCompletionStage(); } } // fetchEmployees 28
  • 29. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Operation Submission Rate public class RecordSubscriber implements Subscriber<byte[]> { private final Session session; private OperationGroup<Long, Long> group; public RecordSubscriber(DataSource ds) { session = ds.getSession(); } @Override public void onSubscribe(Subscription subscription) { group = session.<Long, Long>operationGroup() .independent() .collect(Collectors.summingLong(c -> c)); group.submit(); session.requestHook(subscription::request); } continued 29
  • 30. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Operation Submission Rate (continued) @Override public void onNext(byte[] item) { String insert = "insert into tab values (@record)"; group.<Long>rowCountOperation(insert) .set("record", item, AdbaType.VARBINARY) .apply(c -> c.getCount()) .submit(); } @Override public void onError(Throwable t) { group.close(); session.close(); } @Override public void onComplete() { group.close(); session.close(); } } 30
  • 31. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Controlling Session Creation Rate public class ItemSubscriber implements Subscriber<Item> { private final DataSourceFactory factory; private DataSource ds; public ItemSubscriber(DataSourceFactory f) { factory = f; } @Override public void onSubscribe(Subscription subscription) { ds = factory.builder() .url("//host.oracle.com:5521/example") .username("scott") .password("tiger") .requestHook(subscription::request) .build(); } continued 31
  • 32. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Controlling Session Creation Rate (continued) @Override public void onNext(Item item) { try (Session s = ds.getSession()) { insertItem(s, item); } } @Override public void onError(Throwable t) { ds.close(); } @Override public void onComplete() { ds.close(); } } 32
  • 33. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Program Agenda Introduction Code Wrap-up Q&A 1 2 3 4 33
  • 34. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | AoJ – ADBA over JDBC • Proof-of-concept implementation that uses any standard JDBC driver • Very limited functionality • Source released under the Apache license • Oracle is updating AoJ to track changes in ADBA 34
  • 35. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Status • Everything is subject to change • Developed through the Java Community Process • You can participate via jdbc-spec-discuss@openjdk.java.net • The API is available for download from OpenJDK at http://hg.openjdk.java.net/jdk/sandbox/file/JDK-8188051- branch/src/jdk.incubator.adba/share/classes • AoJ source available at https://github.com/oracle/oracle-db- examples/tree/master/java/AoJ • Targeted for a near future release, Java 12 perhaps 35
  • 36. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Program Agenda Introduction Code Wrap-up Q&A 1 2 3 4 36
  • 37. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Q & A 37
  • 38. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 38