This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-10
Channels
- # announcements (1)
- # babashka (5)
- # beginners (44)
- # calva (45)
- # cider (8)
- # clj-kondo (9)
- # cljdoc (12)
- # clojars (7)
- # clojure (20)
- # clojure-czech (1)
- # clojure-dev (26)
- # clojure-europe (24)
- # clojure-france (8)
- # clojure-uk (1)
- # clojurescript (12)
- # conjure (8)
- # datascript (10)
- # fulcro (7)
- # leiningen (2)
- # malli (19)
- # meander (5)
- # off-topic (113)
- # pathom (3)
- # precept (4)
- # re-frame (13)
- # reagent (19)
- # reitit (3)
- # rewrite-clj (69)
- # shadow-cljs (9)
- # spacemacs (16)
- # tools-deps (1)
- # vim (1)
- # xtdb (10)
It still seems a bit ... wild ... to toss a database around in memory. Thanks for the sanity check :thumbsup:
@U3X7174KS It is wild π But, datascript is just... an in memory database. So it's wild by design.
FWIW, this is more or less what Posh does.
Ah, OK. I almost asked about what Posh actually does. After not too much code, I had something that worked decently, so I wondered if there was much more to it. Is it worth the extra dependency? I guess they may have thought a bit more about API design than what I collected.
Iβm in the same boat. I decided that I would work directly with the datascript until there was compelling reason to add a new dependency
Yeah; So the thing Posh does is give you reactive queries that only update if it looks new transactions have a chance of effecting the result. So it saves you some compute. However, it doesn't always do this perfectly; There are some edge cases like recursive query rules (and maybe using query functions?), and I don't remember now whether it catches these and updates them automatically. As a last resort, you can specify a custom pattern for deciding when to rerun a query if something is amiss. I'd say it's pretty convenient and worth taking a look at.
If don't expect to ever have too much data or too many queries though, it may not be necessary.