Fork me on GitHub
#datascript
<
2017-06-22
>
claudiu06:06:13

Hi, Can anyone help me out with how's datascript in production when you can't have all the db in the browser ?

claudiu06:06:25

Seems really nice, but wondering how it works for certain scenarios: Like 2k edits on a imput form, can I lose those updates and just keep the last value so that the db does not grow.

claudiu06:06:32

Or if for a listing I ignore what's in the db and just get & insert every time (until I add websockets).

danielstockton07:06:57

@claudiu datascript doesn't track history by default, like datomic.

danielstockton07:06:25

As long as the number of datoms remains roughly the same, memory shouldn't grow too much.

danielstockton07:06:54

"Aimed at interactive, long-living browser applications, DataScript DBs operate in constant space. If you do not add new entities, just update existing ones, or clean up database from time to time, memory consumption will be limited. This is unlike Datomic which keeps history of all changes, thus grows monotonically. DataScript does not track history by default, but you can do it via your own code if needed." https://github.com/tonsky/datascript

claudiu07:06:20

@danielstockton thank you 🙂