maybe #pedestal chain? @d4hines http://pedestal.io/api/pedestal.interceptor/io.pedestal.interceptor.chain.html
Yeah, that’s sorta where I’m leaning. I was thinking of just a quick thing - perhaps a specialized db->
macro or function that takes db & fns
where each fn accepts a db and returns some datoms. The db is passed to the first function, then the results are applied to db/with
and passed to the next, until the last function, which just returns the combined transactions.
But pedestal interceptors are a good point, and that’s where I’m ultimately leaning. I have a lot of questions about how to do event sourcing + interceptors. I’m hoping to learn from Re-Frame and DatSys.
Part of my question is about how to do event sourcing in general. My only experience is with Redux (Angular ngrx actually, but close enough). It seems easy enough to have events run through some functions to produce state and effects, and some of those effects can be more events. So, kind of like the internals of Datascript itself, the system (I think it’s called a reactor?) would essentially recurse through an event loop until it reached a fixed point. If I looked at the event log, I might see one incoming IO event and 20 other events produced by interceptors in response. But, for debugging, I’d like to see the hierarchical chain - I’d like to be able to point to an event and walk up its ancestry until I get to a “root” event, or start at a root and see all the children. I’m sure these are just the basics of event sourcing, but its new territory for me, so I’m eager for input. But then again, since Datascript already has some of this functionality built in (fixed point search), I’m not sure if I need a separate thing, or merely to plug into Datascript somehow.
About the hierarchical chain: this is a shot in the dark, but I think the $5 word for this is data provenance. At least I saw that word on some papers cited by Eve and DatSys. But hey, reading the title of an academic paper is a far cry reading the thing itself, so I’m probably wrong 😆
@d4hines did you know #clara ? it's a forward chain engine, may will help you to "describe relations" and "let it run" without care about order.
I’ve heard about Clara, but I don’t really understand forward chaining rules engines, so I’ve yet to”dive in”. I’m just sorta figuring out datalog, and am super impressed with its power - I also really like the EAVT model. I recently saw this: https://github.com/clyfe/clara-eav - maybe the best of both worlds?
But I think you’re right - I should take a closer look at Clara.