Skip to content
Dave Moten edited this page Nov 12, 2016 · 29 revisions

#rxjava-jdbc rewrite for RxJava 2 These are some of the aims of the rewrite:

  • leverage RxJava 2 features including more explicit types (Completable, Single, Maybe, Flowable, Observable), new creation methods, better performance, improved API.
  • aim support at Flowable because backpressure is a good fit for database interaction
  • support transactions across asynchronous boundaries
  • support returning generated keys
  • support batching
  • reactive connection pools - connection pools for example c3po or Hikari provide blocking semaphore access to groups of connections. Blocking for access to jdbc Connection objects is not in keeping with reactive style so an rx connection pool is proposed (draft already written, tests required).

Transaction support

rxjava-jdbc supported transactions but relied on synchronous processing and ThreadLocals to hold context. This meant that a bunch of operators could not be applied within the stream for fear of stuffing up access to the ThreadLocal. The rewrite will provide support for using Transactions across asynchronous boundaries at the expense of a slightly more verbose api.

Clone this wiki locally