This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-31
Channels
- # beginners (153)
- # cider (30)
- # cljs-dev (8)
- # cljsrn (8)
- # clojure (105)
- # clojure-dev (6)
- # clojure-dusseldorf (5)
- # clojure-italy (6)
- # clojure-nl (3)
- # clojure-russia (34)
- # clojure-spec (23)
- # clojure-uk (54)
- # clojurescript (104)
- # core-matrix (3)
- # crypto (1)
- # cursive (17)
- # datomic (90)
- # duct (13)
- # editors (5)
- # emacs (1)
- # events (1)
- # figwheel-main (9)
- # fulcro (54)
- # hoplon (18)
- # hyperfiddle (2)
- # jobs-rus (1)
- # lein-figwheel (5)
- # leiningen (3)
- # luminus (52)
- # mount (6)
- # off-topic (22)
- # other-languages (3)
- # parinfer (7)
- # powderkeg (3)
- # re-frame (52)
- # reagent (58)
- # rum (4)
- # shadow-cljs (49)
- # spacemacs (12)
- # sql (13)
- # tools-deps (2)
- # yada (1)
we sanitize during the serialization to string, i'd like to think of it as an issue of serialization to string format and not an issue of our in-memory data structures i.e (-> some-obj json/generate-string strip-unicode-nulls)
Does anyone know when it’s right to reuse connections with SQLite? Some sources say don’t reuse, some say do, hard to find like a definitive answer that weighs the pros and cons
IIRC, you can read concurrently from sqlite, but writing concurrently may be dangerous.
Concurrency largely depends on the journal_mode
used as far as I understand
But yeah, I’m not sure how the concept of connections maps to SQLite at all 🙈
At the risk of remembering wrong, I think you can have even multiple processes accessing SQLite concurrently.
I’ve used SQLite in the past from Python etc, which was using of course the C api. I’m not sure how SQLite is used from JVM…
I would highly recommend looking at one of the jvm embedded databases like derby over using sqlite from the jvm
I considered using HSQLDB instead of SQLite for it’s seemingly much better performance shown on this page: http://www.jpab.org/Hibernate/HSQLDB/embedded/Hibernate/SQLite/embedded.html but then got sold by reading about how SQLite is tested and proven etc. I will test that concurrent access is possible..
edit, nevermind, didn’t apply some basic optimizations and H2 seems quite fast now 🙂
the sqlite jdbc driver situation may have improved recently (I am not sure), but it was really bad at one point
regardless of if sqlite could support concurrent access, the jdbc driver wouldn't let you do that at one point
I considered using HSQLDB instead of SQLite for it’s seemingly much better performance shown on this page: http://www.jpab.org/Hibernate/HSQLDB/embedded/Hibernate/SQLite/embedded.html but then got sold by reading about how SQLite is tested and proven etc. I will test that concurrent access is possible..