Hey guys, not sure if this fits this channel but m...
# server
l
Hey guys, not sure if this fits this channel but maybe you can help me with some issue. I have a reporting application that runs some heavy mysql queries, to make it faster I want them to run in parallel but as I see Jdbc is not parallel so in order to do it I would need a thread pool and a connection pool. Is this the way of doing it or is there a library that will make my life easier?
o
It doesn’t look like something about Kotlin…
l
well the application is built on kotlin and maybe there is a specific kotlin way of dealing with this that I don't know, is the answer would be the same as Java then I will investigate in other place
o
I don’t think so, there are no coroutine-based SQL libraries yet, as far as I know. Check c3p0 may be? https://github.com/swaldman/c3p0
l
thanks, I'll take a look
m
And while you are looking at C3P0 have a look at Hikari also. https://github.com/brettwooldridge/HikariCP. And as you said, since the official JDBC is blocking, you are going to need a thread pool too
d
You could also look at vertx, which uses an async lib for db access, and also handles concurrancy like nodejs. Best thing of all it has support and docs for Kotlin😃