Hi Daniel,

First sentence was written from Datomic standpoint. In Datomic, all history is 
kept in the database ref. Given ref to an immutable DB, you can rewind back to 
any point in time. I can guess that each DB value consist of indexes to 
current, latest state + append-only history log. There's also special API call 
for it, "history".

In DataScript, however, each immutable DB value is a value for "just now", for 
latest moment that holds true. I do not keep history for values and do not 
support "history" API. There's not append-only history log built-in into 
DataScript. But still, DataScript DB is based on persistence data structures, 
meaning that DB before transact! and DB after transact! share a lot of inner 
structure between them. You can, on top of that immutable DB values, create 
just a vector of databases and store  values of DB as it evolves there. This 
kind of history is not in the box, but is trivial to add on top.

Motivation for that is that you rarely need audit queries in the browser where 
DB may exist for 30 seconds and dies when browser window closes. Immutability 
is important, referencing and doing queries to historical DB value are 
important, but doing queries accross whole history is not so.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to