[ 
https://issues.apache.org/jira/browse/DERBY-7036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16776344#comment-16776344
 ] 

Mark Paluch commented on DERBY-7036:
------------------------------------

Thanks for looking into that. I do not have an in-depth understanding of what 
happens in Derby embedded to figure whether embedded usage would be a good fit 
as well. From a non-blocking perspective, hooking into the transport layer 
seemed the best option to me.

We have also an H2 driver implementation – to be honest, you don't use H2 
embedded much in production but embedded Derby in production is a thing. If 
non-blocking calls end up on blocking resources (e.g. file system), then we 
miss the whole point of being non-blocking.

In that context, offloading calls to a thread pool often comes up. This is only 
limited useful as with scaling we talk about 1000's of concurrent requests. 
Using a bounded queue causes blocking behavior if the queue runs full or, if 
the queue is unbounded, we run into other problems.

Another option could be building an R2DBC interface for embedded mode and 
pointing out drawbacks if any apply.

> Investigate an R2DBC client implementation
> ------------------------------------------
>
>                 Key: DERBY-7036
>                 URL: https://issues.apache.org/jira/browse/DERBY-7036
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Client
>            Reporter: Mark Paluch
>            Priority: Major
>
> As programming models evolve towards functional data access patterns, it 
> would be great to have a non-blocking, reactive network client implementation 
> for Derby. The advantage of having a non-blocking I/O layer allows to scale 
> applications by orders of magnitude.
> There's an effort named R2DBC to bring Java-based, reactive database access 
> to relational databases using a standardized API. This ticket is here to 
> start some discussion around whether you'd be interested to look into this 
> and how we can help.
> A few resources to get you started:
>  * The project organization can be found [on Github|https://github.com/r2dbc] 
> and contains the SPI, a client API as well as Postgres implementation and an 
> H2 implementation.
>  * An [in-depth talk on the 
> topic|https://www.youtube.com/watch?v=idApf9DMdfk] by Ben Hale which is 
> basically _the_ introduction you can get.
>  * There's a [public mailing 
> list|https://groups.google.com/forum/#!forum/r2dbc] that summarizes the 
> events and activities around R2DBC.
>  * There's the [Spring Data R2DBC 
> project|https://github.com/spring-projects/spring-data-r2dbc] that provides a 
> good overview of how functional-reactive data access can look like.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to