They are very similar, indeed. It's true that using Datascript, queries should be recomputed, unless you save them as a kind of component state - that's what I do now: I save, well, actually rum saves, the previous result of the query and compares it with the new result (in the 'should-update' function). Basically, this logic is now embedded in a rum mixin. It would be somewhat 'more decoupled' using a state machine; state management is probably conceptually simpler. Using a state machine feels (slightly) more decomplected to me.
Looking forward to more complete examples, so I might try it out on a small test application I'm building, to get a hang of rum/datascript. I've put freactive on hold for now :). I'm really interested in both, not only in terms of efficiency and performance. Have fun! qsys > The two are very close in concept but I think, under some conditions, Clara > has an advantage in being based on the Rete algorithm. My guess is that the > Rete algorithm might be more efficient but am unsure where the cost/benefit > cross over is re: # rules, amount of data, etc.. It heavily depends on how > much commonality/overlap and sharing happens in the graph which is dependent > on your rules and their structure. Caveat emptor. > > Rete doesn't have to recompute the results of the query over and over again > as data arrive like I suspect Datascript would have to. With Datascript, > after each query is run there is no memory of what the previous results were. > Rete maintains the state of all of your rules/queries across all of your data > that you insert/remove in/out it. > > Re: Datascript and listen! At a conference a couple years ago I asked Rich a > similar question re: Datomic, I couldn't hear his response very well but I > think he said that Datomic doesn't support persistent queries and probably > won't. I would think that datalog could handle it but I don't know how you'd > do it. I think that pull request says the same thing basically if I'm reading > it right. > > I know this kind of thing is very powerfule - I embedded Jess into IE 4 as a > Windows Scripting Engine way back in the day. Just like javascript, Jess code > could be embedded in your page using <script language="jess">(defrule xyz > ...) </script> and you had full access to the DOM and events, with all the > event wiring/registration happening automagically, etc. It made for a really > elegant programming model. > > It worked great but internally it was a tangled mess of C++ COM objects, > jscript, and java. IE 5 broke everything so I gave up on it. > > As previously mentioned, I'll post a more complete example of Clara tomorrow > after I recover from my trip. > > Take care. -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
