On Tuesday, October 27, 2015 at 4:05:04 PM UTC+6, Scott Klarenbach wrote: > On Thursday, April 24, 2014 at 11:18:06 PM UTC-7, Nikita Prokopov wrote: > > Hi! > > > > I’m glad to announce my new library, DataScript. > > > > It’s an open-source, from-the-scratch implementation of in-memory immutable > > database aimed at ClojureScript with API and data model designed after > > Datomic. Full-featured Datalog queries included. > > > > Library is here: https://github.com/tonsky/datascript > > > > Also check out this blog post about why you may need a database in a > > browser: http://tonsky.me/blog/decomposing-web-app-development/ > > > > Feedback welcome! > > Hello, > > Very helpful library Nikita. > > I wonder what would be required to enable datascript to act more like a > datomic peer, which holds, say, part of the db in browser memory, and then > goes back to the server to fetch new segments if it can't serve the query > from browser cache. Older entries in the cache get gc'd and the system can > operate on dbs of any size. > > I realize this wasn't a design goal of datascript, and am just looking for > insights into how it might be possible. I guess a more fundamental question > is: how does a datomic peer know when the segments to complete its query are > not present in cache? And can we emulate this in datascript?
Requesting segments on-demand is, in theory, possible. DataScript is written to support queries over data source protocol, which can be a DB (we can then utilize indexes), collection (full scans) or something user-specific. I don’t have working example of that at the moment, but from design perspective, plugging in custom data source with, e.g., on-demand segment loader, is possible. -- 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.
