datascript 2022-04-25

@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

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

🙏 1

thank you! this gives me a good entry point to learn about this!

👍 1