This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-25
Channels
- # announcements (21)
- # babashka (7)
- # beginners (27)
- # calva (7)
- # chlorine-clover (3)
- # cider (1)
- # clerk (21)
- # clojure (24)
- # clojure-europe (28)
- # clojure-finland (3)
- # clojure-nl (1)
- # clojure-norway (5)
- # clojure-uk (2)
- # clojurescript (13)
- # clr (2)
- # conjure (1)
- # consulting (1)
- # datahike (1)
- # datomic (13)
- # fulcro (3)
- # graalvm (33)
- # gratitude (7)
- # honeysql (7)
- # humbleui (12)
- # hyperfiddle (26)
- # interop (11)
- # introduce-yourself (4)
- # jobs-discuss (8)
- # lsp (26)
- # malli (6)
- # nbb (11)
- # polylith (26)
- # practicalli (1)
- # rdf (3)
- # re-frame (7)
- # reitit (10)
- # releases (2)
- # shadow-cljs (1)
- # tools-deps (15)
https://github.com/Dangercoder/clojure-clr-dotnet-api just received some updates.
• database access (postgres) using https://www.npgsql.org/index.html. There's a few functions for creating a database connection pool, connection, execute sql statements sync and async. The query results are transformed to edn with the right types.
• the http machinery now uses clojure.data.json
• core.async
Unexpected numbers:
Did some testing against my own postgres database and the synchronous clojure-clr database access was 5-8 times faster at all times compared to next.jdbc
.NET 7 Clojure-CLR database access - Elapsed time: 2.2049 msecs
(time (->> (with-open [conn (a/<!! (->connection datasource))]
(execute!! conn ["SELECT * from mydatabase.user"]))))
JDK 11 Clojure database access (next.jdbc) - Elapsed time: 11.108928 msecs
(time
(next.jdbc/execute! db ["SELECT * from mydatabase.user"]))
A heads up
https://github.com/Dangercoder/clojure-clr-dotnet-api/blob/master/clj_api/interop/dotnet/http.cljr#LL67C24-L67C24
We can currently not go non-blocking when using .NET for api's since go-blocks doesn't suspend tasks from continuing their execution, and a/<!!
is blocking.
clojure-clr needs async
await
support or some better way of interoping with Task
's.