This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-23
Channels
- # announcements (66)
- # babashka (41)
- # beginners (93)
- # calva (10)
- # cider (2)
- # clj-kondo (112)
- # cljs-dev (6)
- # cljsrn (1)
- # clojure (44)
- # clojure-dev (10)
- # clojure-europe (35)
- # clojure-italy (15)
- # clojure-nl (3)
- # clojure-uk (2)
- # clojurescript (38)
- # conjure (1)
- # datalevin (1)
- # datomic (16)
- # deps-new (4)
- # events (7)
- # figwheel-main (1)
- # fulcro (59)
- # graalvm (21)
- # integrant (3)
- # introduce-yourself (8)
- # jobs-discuss (2)
- # malli (23)
- # membrane (11)
- # membrane-term (2)
- # missionary (17)
- # off-topic (7)
- # pathom (23)
- # pedestal (6)
- # polylith (7)
- # portal (25)
- # releases (1)
- # remote-jobs (3)
- # reveal (5)
- # shadow-cljs (43)
- # spacemacs (7)
- # sql (18)
- # tools-deps (33)
- # vim (10)
- # xtdb (36)
hey! Do you know any libraries supporting async sql similarly to https://github.com/metosin/porsas? We are using porsas
in one of our services but as it seems to be abandoned and had some issues with it decided to reevaluate our options there.
I tried to find something similar but most of the libs are abandoned too, looked into walkable
but it’s not async all the way (not using the async apis of the db engines). Is there something fundamentally wrong doing async sql?
They were not caused by porsas but the underlying vertx-sql-client, one of the was a bug there that on https://github.com/eclipse-vertx/vert.x/issues/3249 it tried to receive a response (although with the update client this still seems to be an issue 😕)
The other one was related to the fact that we were trying to use it with RDS autoscaling and testing showed that the newly spun up replicas didn't get any traffic. This was caused by the way how the connection pool was working, in the new version this was also improved
I fixed these issues by updating the lib in porsas https://github.com/metosin/porsas/pull/12
@meszaros.jns JDBC itself is synchronous so your choice for async is: a) write a sort of fake async layer over the top of JDBC or b) use one of the experimental (and fairly volatile -- and often DB-specific) asynchronous DB drivers.
Thanks for your answer, those two options were the result of my investigation too, I was just hoping there was an option/lib I couldn't find
Sql itself by design is not async
As far as I could see there are async apis on most of the major db engines. I'm mostly using postgres which definitely has one
There are some apis but its still not by design
You are doomed to be io bound, doing more badly performing io at a time won't make life much better
@meszaros.jns All work on async jdbc apis has died in favor of waiting for this https://openjdk.java.net/jeps/8277131
We already has a service which is async end-to-end, but the maintaining cost still applies
• How long will it take to initially migrate to sync apis • How long will it take to do the work to be async • How many extra hours of maintenance will your async code need • How much will the extra machines cost if you use sync code • How long do you think it will be until virtual threads reach preview (my money is on next Sept) • How much do your engineers cost per hour