Fork me on GitHub
#sql
<
2019-10-01
>
murtaza5218:10:58

Is there a clojure wrapper for what oracle calls - Asynchronous Database Access API (ADBA). Or is there a mature java implementation, the one from oracle seems experimental.

seancorfield18:10:25

No, and Oracle just stopped working on that.

seancorfield18:10:49

They've abandoned it in favor of waiting for fibers (Project Loom) to land in the JVM for everyone (JDK 14 at the earliest).

murtaza5218:10:36

thanks and on the same lines what is the best technology to do non blocking db access, I was just scanning golang, and their db access libs are also blocking, I assume that leaves just node.js ?

seancorfield18:10:31

JDBC is inherently synchronous. Some DBs have proprietary async drivers but you're mostly on your own in Java interop land at that point.

seancorfield18:10:30

If you want to do JDBC access in a "non-blocking" way, you need to wrap the code in something like a completable future.

seancorfield18:10:09

For some situations at work, where we need to run several heavy queries, gather up the results of all of them to process data and respond to the user, we simply wrap each one in future and then deref those as part of the final processing. Not ideal -- uses a heavy JVM thread for each -- but a good-enough compromise for those situations.