This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-04
Channels
- # announcements (28)
- # asami (12)
- # aws (3)
- # babashka (69)
- # babashka-sci-dev (34)
- # beginners (52)
- # biff (3)
- # calva (20)
- # clj-kondo (4)
- # cljsrn (4)
- # clojars (1)
- # clojure (90)
- # clojure-czech (2)
- # clojure-europe (33)
- # clojure-nl (11)
- # clojure-norway (35)
- # clojure-seattle (1)
- # clojure-uk (5)
- # clojurescript (87)
- # cursive (10)
- # datascript (5)
- # datomic (35)
- # defnpodcast (1)
- # emacs (8)
- # events (4)
- # fulcro (1)
- # google-cloud (2)
- # graphql (2)
- # hispano (2)
- # honeysql (5)
- # hoplon (2)
- # hugsql (1)
- # jobs (7)
- # kaocha (9)
- # lsp (102)
- # meander (13)
- # observability (7)
- # off-topic (56)
- # overtone (2)
- # pathom (47)
- # podcasts-discuss (1)
- # rdf (30)
- # reagent (16)
- # reitit (1)
- # releases (2)
- # remote-jobs (26)
- # rewrite-clj (10)
- # tools-deps (4)
- # vim (5)
- # vscode (4)
- # xtdb (41)
Another option here @chase-lambert is to try out #datahike, a fork of datascript which supports durability (persisting to disk). At the moment, I think it officially only supports the JVM, but durable JS/browser support is in beta, and writes out the data to an indexeddb.
PS the terminology is a little confusing here, since technically, a datascript database value is a persistent data structure, but we often talk about persisting to disk. In database-specific terminology, durable (the D in ACID) is somewhat more precise and less potentially confusing, even if not always used as frequently in informal technical discussions.
Using #datahike, or writing an entire datascript db value to localstorage, is fine if you only want the data to be accessible from a single device. But obviously, if you want to share state/data between devices, you either need a central database or some other form of data transfer between clients. Building out an entire SQL data model is doable, and affords some benefits, but is also a lot of work, and you may find it more natural to use either #datomic or #datahike on the back end for this purpose, since then you'll have a more similar data model across the system.
@chase-lambert Hey I work at Roam and I open sourced our original datascript persistence code awhile back https://github.com/panterarocks49/datascript-firebase. It’s very much just a POC but it could give you an idea of how we do it