You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Asami is great for producing data-driven apps with arbitrary data sources, and it pairs well with other triple-based tools. I'm working on a library that uses Asami as its state atom. Currently, it uses the DB name to separate sessions/states. However, I would like to start being able to reuse earlier states and exploit Clojure's cheap persistent data structures for features such as incremental dataflow or pre-computing some expensive initial data set and then using the db value at this point as the initial db value.
Datomic and Datascript have the db-with function for this in-memory/speculative work.
Problem
Looking at the implementation of transactions in the repo, it's not too clear if such a thing exists or how one might roll their own. I've tried to bake a connection value based on the shape of the "atoms in an atom" connection, but it was a bit flakey and felt like a code smell. This also makes subscribing to updates non-trivial.
Suggested Approach
A separate functional API for in-memory graph values that leverages a db-with approach to transactions would provide a good balance between keeping the existing implementation and supporting this functionality. Such a thing may already exist if you know where to look, which, right now, I don't
I'm happy to be shown in the right direction to be able to implement this myself.
The text was updated successfully, but these errors were encountered:
Description
Asami is great for producing data-driven apps with arbitrary data sources, and it pairs well with other triple-based tools. I'm working on a library that uses Asami as its state atom. Currently, it uses the DB name to separate sessions/states. However, I would like to start being able to reuse earlier states and exploit Clojure's cheap persistent data structures for features such as incremental dataflow or pre-computing some expensive initial data set and then using the db value at this point as the initial db value.
Datomic and Datascript have the
db-with
function for this in-memory/speculative work.Problem
Looking at the implementation of transactions in the repo, it's not too clear if such a thing exists or how one might roll their own. I've tried to bake a connection value based on the shape of the "atoms in an atom" connection, but it was a bit flakey and felt like a code smell. This also makes subscribing to updates non-trivial.
Suggested Approach
A separate functional API for in-memory graph values that leverages a
db-with
approach to transactions would provide a good balance between keeping the existing implementation and supporting this functionality. Such a thing may already exist if you know where to look, which, right now, I don'tI'm happy to be shown in the right direction to be able to implement this myself.
The text was updated successfully, but these errors were encountered: