[CONJ-447] Provide non-jdbc async implementation Created: 2017-03-20  Updated: 2019-09-13  Resolved: 2019-09-13

Status: Closed
Project: MariaDB Connector/J
Component/s: Other
Affects Version/s: None
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: Diego Dupin Assignee: Diego Dupin
Resolution: Fixed Votes: 1
Labels: None


 Description   

Goal of this task is to provide non jdbc async methods.
Driver must then be driven by event, based on java AsynchronousSocketChannel. Those async method has then to return CompletableFuture results, to permit returning results/exception and permit chaining execution.

example :
standard JDBC method ResultSet executeQuery(String sql) will have a corresponding async method :
CompletableFuture<Boolean> executeAsync(String sql)

Relying on AsynchronousSocketChannel avoid having just another thread pool but use a java internal thread pool that will have threads only when data has to be send/received.

Server will still execute query one after another, driver has to send commands one after the other, but without waiting for previous query answer. Relying on FIFO order, when server for a connection finish command, next one might already be in TCP buffer.
Driver has to prioritize reading socket to avoid having client and server TCP buffer full, locking exchanges.



 Comments   
Comment by Suzanne Laine [ 2017-03-20 ]

Hi, I am Suzanne Laine a Computer Science student and I wish to participate in Google Summer of code 2017 with MariaDB. I am interested in working on this task. I am familiar with JDBC drivers and other databases. Cassandra has a jdbc driver that supports this feature by having non-blocking methods that rather return a Cassandra Future object (CassFuture) upon query execution. I am currently studying the datastax implementation on how this was implemented and I will write my proposal for a MariaDB implementation for this task. Thank you.

Comment by Diego Dupin [ 2019-09-13 ]

Closing since ADBA, R2DBC are better alternative

Generated at Thu Feb 08 03:15:44 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.