Mike, thanks for this! Will surely re-read later when it comes to thinking
of storing. I think that by then I'll have more of the app structure and
needs for this field detailed in my head, so will consider all the options
you've mentioned :) At the moment I'm about to dive in Datomic docs and
then will experiment with just runtime in-memory usage of Datascript first.


On 7 May 2014 01:43, Mike Haney <[email protected]> wrote:

> One straightforward approach would be to use tx-listen to listen to all
> your db transactions and then just append the datoms to a file.  This would
> be very easy with node-webkit, because you can take advantage of node's
> asynchronous io.  Then when your app restarts just read the file and apply
> the transactions in order.
>
> This would retain the entire history (like Datomic), which may not be what
> you want.  But you could easily build on this to suit many use cases.  You
> could create separate files for different entities, and/or choose which
> data to persist the entire history vs. just the current state.  Append-only
> is easy, but once you start getting fancy there are a ton of edge cases to
> worry about.  In that case, you could look at using a logging framework to
> manage the gory details.
>
> You could even embed a database to back everything up, there are about a
> billion choices in npm.  Even if you choose to use an embedded db on the
> node side, tx-listen is probably the easiest place to hook in.  Another
> route would be to add some metadata to your entities in Datascript to make
> it easier to query what you want to persist.
>
> --
> 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.
>

-- 
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.

Reply via email to