bahulneel / om-datascript

Make om and datascript play nice
26 stars 1 forks source link

datom level query analysis #2

Open pleasetrythisathome opened 9 years ago

pleasetrythisathome commented 9 years ago

Have you seen this discussion? I know this is more a datascript question, but it'd be great if changed? analysis could be smarter than a straight equality of the query on the old and new db.

https://github.com/tonsky/datascript/pull/12

bahulneel commented 9 years ago

Thanks this is really helpful, my way of doing things was a bit of a cludge.

metasoarous commented 7 years ago

I know this is an old thread, but it's worth noting that these ideas have become manifest as https://github.com/mpdairy/posh, which more or less automates (in most cases anyway) the ideas discussed in #12. Initially, Posh was built on/for Reagent, but has since been refactored into pure analysis code that could potentially be reworked for any UI framework. I think he'd be very open to merging in a namespace binding the pure parts of the library with om. Om-next may obviate some of the need for this, but there may still be some value to be had there. May be worth looking into...

bahulneel commented 7 years ago

Yeah, it was a crazy idea I had at clojurex. Turns out the for a small (for some value of small) number of queries, or pull type requests that it's cheaper to do something similar to posh.

My more recent work uses a form of the rete algorithm to generate new datoms which I will release soon. But that is the other half of the problem I was trying to solve here. The solution in posh is much more focused than what I did and is kind of why I stopped chasing this.

metasoarous commented 7 years ago

Gotcha.

The RETE algorithm? Really!? Interesting. I've been wondering how that might be applied in a DataScript/Datalog setting, so I'd be very interested to see that work when you're ready to release it.

bahulneel commented 7 years ago

What I have now only works with Datomic but I think that's only incidental. The idea is to store production rules in the db and then have a generic runtime over transaction reports to update the rete network. This does mean I'm slowly implementing the rules by hand so i can store partial results in the db. So far I have a simplified version of bloom working as well as a strips planning example. Should be open sourcing it all in a matter of days for some input.

On 29 Oct 2016 01:04, "Christopher Small" notifications@github.com wrote:

Gotcha.

The RETE algorithm? Really!? Interesting. I've been wondering how that might be applied in a DataScript/Datalog setting, so I'd be very interested to see that work when you're ready to release it.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bahulneel/om-datascript/issues/2#issuecomment-257056339, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_0pj1b4MrQioYNWX0_NPf3A0ipDSZyks5q4o2qgaJpZM4DKo_D .

metasoarous commented 7 years ago

Very interesting; Keep us posted!