This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-23
Channels
- # announcements (26)
- # babashka (8)
- # babashka-sci-dev (3)
- # beginners (93)
- # biff (44)
- # calva (1)
- # cider (7)
- # clj-kondo (13)
- # cljdoc (1)
- # clojure (121)
- # clojure-australia (2)
- # clojure-europe (18)
- # clojure-nl (1)
- # clojure-norway (5)
- # clojure-uk (1)
- # clojurescript (35)
- # conjure (1)
- # core-async (2)
- # datalevin (6)
- # datomic (28)
- # emacs (25)
- # events (1)
- # fulcro (5)
- # introduce-yourself (2)
- # jobs (8)
- # leiningen (2)
- # off-topic (13)
- # other-languages (1)
- # podcasts-discuss (1)
- # polylith (7)
- # rdf (6)
- # re-frame (1)
- # reagent (53)
- # releases (3)
- # rewrite-clj (7)
- # scittle (5)
- # shadow-cljs (63)
- # specter (1)
- # squint (5)
- # tools-build (5)
- # xtdb (7)
Hi all, noob here to programming and datalevin. I have a couple questions about clients.
Is there any concern for leaving open connections or clients from datalevin.core/create-conn
and datalevin.client/new-client
?
For example is there something that should be kept in mind if:
1. a repl session creates a connection and then never closes the connection when the repl is closed, or
2. 2 hosts with a client app connect to a db server but one crashes what should happen to those connections or what might automatically happen to those connections
I see that datalevin.client/disconnect-client
, datalevin.core/close
and datalevin.timeout
exist but I'm not sure I understand which ones are best to use or apply to client applications, repl sessions or just db administration. I figure most of my confusion comes from not programming all that much, so i have questions like should an app open one conn
and maintain that for the runtime of the app or if each call from a client application should create and close it's own conn
s to db server for the duration of the call.
An app should open one conn to a database and maintain that for the runtime of the app.
Due to security requirement (so that a hacker cannot try out password by brutal force), it is deliberately made expensive to open new client. Therefore, you do not want to open new client every time.