<@UCDBW1H26> and collaborators have published Buil...
# linking-together
s
@Geoffrey Litt and collaborators have published Building data-centric apps with a reactive relational database https://riffle.systems/essays/prelude My understanding of this approach is that you replace all (most of?) your data structures and ad-hoc data sync/copy code within an app with relational tables. IOW, all state (even UI state) is put in a app-wide relational database with well defined queries between tables that automatically trigger on updates. Very interesting approach.
🍰 3
t
Its really cool. I just read it. This is supposed to be how you architect Firestore driven apps, they are also a local cache + live queries, but having SQL is maybe more expressive, however, they then go on to say SQL was getting in the way so maybe NoSQL is a better fit for apps? Its interesting.... in the shower today I was thinking of putting firebase as a virtual table on sqllite so you can use SQL over Firebase which would land in a similar place I think, it was interesting to see this today.
i
That's how Eve worked 🙂
❤️ 5
🤯 1
everything was just one giant reactive relational system
it's a really powerful and elegant approach
s
@Tom Larkworthy they say SQL as a language is not great for many things. I agree with that. They're not suggesting NoSQL, but rather a different language to query the same relational model.
a
Haven't read this article in full, but generally love the idea. I really hope it's a part of the future of mainstream UI programming. It reminds me of the Entity-Component architecture for games, which you can think of as making each "entity" in the game be basically a primary key, and hanging other bits of game logic off that ID, encapsulated in "components". (Implementation strategies are... manifold, so it's hard to give a good reference, but the best explanation I've seen of the idea behind ECS is Catherine West's RustConf 2018 keynote; I think it'll be comprehensible even if you don't know Rust)
t
I am familiar with ECS too and its orthogonal to reactivity IMHO. The classic game loop is a bunch a systems applied to mutable lists in lockstep. Its explicitly anti reactive because in games its too easy to cause circular self-triggering loops. I love ECS for its extendability, and you could probably make a reactive ECS system, but the programming feeling is quite different. Its very easy to connect reactive systems in unhealthy loops on the other hand....
💭 1
a
Sure, not so much the reactivity as the "app state is (like) a relational database" part. If nothing else, convergent evolution is a strong sign the idea is a good one.
t
you do not need extra sqlite to turn a ui into a database, actually vue framework itself can be thought as a database, and query from vue directly, checkout my library https://vue-db.js.org/
c
cc @Chet Corcos