DataScript: Immutable database and Datalog query engine in ClojureScript
11–20 of 30 posts
Re: DataScript: Immutable database and Datalog query engine in ClojureScript
#12Re: DataScript: Immutable database and Datalog query engine in ClojureScript
#13I wonder when we are going to see an open source implementation of Datomic's main ideas in the database space.
for bonus points, it uses rethink as the backing store
Re: DataScript: Immutable database and Datalog query engine in ClojureScript
#14Immutable database? That doesn't make sense. If you can't mutate it, how do you write to it? How do you update records in it? If it's really immutable then you can't. Such a database is a compile-time constant. These days everybody seems to throw around terms like immutable, isomorphic, pure etc. without actually knowing what they mean, or using them in contexts whey they don't make any sense.
> Immutable database? That doesn't make sense. If you can't mutate it, how do you write to it? How do you update records in it? You don't write to the database, you perform an operation that takes a database and a write request and returns a new database. Same with updates. Essentially, the kind of things you think of as "mutating" operations have a signature of, in Haskell-ish notation: db -> operation -> db
Re: DataScript: Immutable database and Datalog query engine in ClojureScript
#15We're using it in production, but then, the author is on our team. We've been using Datomic in production since Jan 2013. It's as good as it says on the tin. I love living dangerously, if danger means using full-stack Clojure and immutability -grin-
It's also well-suited for rapid-prototyping. I'm working on a small project that will eventually need a backend, but for now I just store everything in a datascript db and serialize that to localStorage. When I'm ready to add a backend, I'll just subscribe to datascript's transaction queue and forward them to be saved on the server.
Re: DataScript: Immutable database and Datalog query engine in ClojureScript
#16Earlier quoted context omitted.
> Immutable database? That doesn't make sense. If you can't mutate it, how do you write to it? How do you update records in it? You don't write to the database, you perform an operation that takes a database and a write request and returns a new database. Same with updates. Essentially, the kind of things you think of as "mutating" operations have a signature of, in Haskell-ish notation: db -> operation -> db
That's how every langauge with immutable data structures works. What makes this one special?
tx_report = datascript.transact(db_conn, [{:key "value"}]);
set_db_to_render_from(tx_report.db_after);
send_report_to_server(tx_report, function(error) {
set_db_to_render_from(tx.report.db_before);
});Re: DataScript: Immutable database and Datalog query engine in ClojureScript
#17I wanted something like this for Go recently, settled with SQLite :(
Re: DataScript: Immutable database and Datalog query engine in ClojureScript
#18We're using it in production, but then, the author is on our team. We've been using Datomic in production since Jan 2013. It's as good as it says on the tin. I love living dangerously, if danger means using full-stack Clojure and immutability -grin-
We're also using it in production, and it works really well when paired with Datomic. Thanks to transaction queues on both ends, we can set up a meteor-style sync that's pretty handy. It's also well-suited for rapid-prototyping. I'm working on a small project that will eventually need a backend, but for now I just store everything in a datascript db and serialize that to localStorage. When I'm ready to add a backend,…
Re: DataScript: Immutable database and Datalog query engine in ClojureScript
#19This is a project I've kept a closer eye on, as I'm thoroughly fascinated with Datomic, and the concept of using a similar system alongside functional approaches like React seems a good match. Would love to hear comments from anyone who has given DataScript a test drive - I'm guessing from the alpha state that no one is using it in production but hey, who knows... some people like to live dangerously.
Re: DataScript: Immutable database and Datalog query engine in ClojureScript
#20I've been thinking a lot about using a datascript database in place of a large mutable deeply nested hash map, or other non-regular chunk of data, to keep track of state using the amazing clojurescript library re-frame[1]. There are some times when having a novel way to query could lead to simpler data. [1] https://github.com/Day8/re-frame/