This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-25
Channels
- # announcements (4)
- # babashka (3)
- # beginners (79)
- # biff (4)
- # calva (17)
- # cider (18)
- # clj-kondo (21)
- # cljdoc (45)
- # cljs-dev (14)
- # cljsrn (9)
- # clojure (90)
- # clojure-europe (86)
- # clojure-italy (3)
- # clojure-nl (3)
- # clojure-portugal (1)
- # clojure-uk (9)
- # clojurescript (20)
- # code-reviews (23)
- # conjure (14)
- # cursive (12)
- # datascript (12)
- # emacs (5)
- # events (2)
- # fulcro (13)
- # gratitude (1)
- # holy-lambda (9)
- # lambdaisland (2)
- # malli (6)
- # nbb (1)
- # nextjournal (2)
- # nrepl (30)
- # off-topic (63)
- # pathom (1)
- # portal (24)
- # reagent (5)
- # reitit (13)
- # releases (2)
- # remote-jobs (1)
- # sci (90)
- # shadow-cljs (59)
- # spacemacs (5)
- # sql (13)
- # testing (20)
- # tools-build (17)
- # xtdb (27)
@chase-lambert @jtth not tiny, but that’s what’s happening in https://github.com/athensresearch/athens
well… not quite quite what’s happening there
in athens it goes something like: • user interaction triggers an event • frontend resolves that event locally to datascript, then forwards the event to backend • backend also resolves the event to datascript, and forwards the event to all clients • all clients use the event forwarded from the backend to update their state
using datascript transactions as the communication medium between the frontend and the backend is not great because the state of each can differ, and thus generate different datascript transactions
in athens we model the event stream first, and derive datascript transactions from the events
part of this was to be database agnostic and make it easier to change database in both frontend and backend
so if you want to go from datascript to sql, you add new SQL resolvers
there are our events, as a malli schema https://github.com/athensresearch/athens/blob/main/src/cljc/athens/common_events/graph/schema.cljc
this is our event->datascript resolver https://github.com/athensresearch/athens/blob/main/src/cljc/athens/common_events/resolver/atomic.cljc
we have information about our design decisions in this space in the ADR folder https://github.com/athensresearch/athens/tree/main/doc/adr
happy to talk about anything in this space really, lmk if you want to know more