datahike

https://datahike.io/, Join the conversation at https://discord.com/invite/kEBzMvb, history for this channel is available at https://clojurians.zulipchat.com/#narrow/stream/180378-slack-archive/topic/datahike
ro6 2020-12-06T20:02:04.149400Z

Hi all! I'm working on a web extension where a durable Datalog store would be useful. Is Datahike development headed there? I see that Konserve has an indexedDB impl. I assume if it were trivial to attach those two it would have been done already.

grischoun 2020-12-07T17:27:05.152400Z

Yes, i think it is heading there, but @grounded_sage would be able to tell you more.

grounded_sage 2020-12-07T18:09:36.155200Z

@robert.mather.rmm we are working on this right now. Hoping to have an initial version soon. But still bit of work to go for full API and before we would declare it stable.

2020-12-07T19:08:40.155400Z

@robert.mather.rmm It's a little more work than it sounds like because with Cljs if the storage is durable (indexDB or whatever, vs in memory) then all of the IO operations have to be async, which means all of the query logic has to be adapted to accomodate this.

2020-12-07T19:09:49.155600Z

However, if you need durability but aren't expecting a ton of data, you could always just write to disc, but query the data from an in-memory db, till a proper indexdb implementation is ready.

ro6 2020-12-07T20:02:25.155800Z

@grounded_sage Is that work going on somewhere public?

ro6 2020-12-07T20:05:03.156Z

@metasoarous You mean like sync the whole db to LocalStorage after each op? Fortunately I found Mamulengo (https://github.com/wandersoncferreira/mamulengo), which seems to work and saves to LocalStorage. Not sure of the internals, maybe just doing what I would have done to hack it together. This should hold me for a while.

2020-12-07T20:12:15.156300Z

Yeah, that should get you by ok. I'll note though that since that project seems to store transactions individually, eventually you'll get so many transactions that it may take a while for it to boot up. Unless it's also periodically taking snapshots of the EAV index to boot from. Probably fine if you're just looking to tide yourself over until we get this full support in datahike.

👍 1
grounded_sage 2020-12-08T10:01:28.159Z

@robert.mather.rmm work is currently happening on a fork. When we have it in a decent shape for others to start experimenting with it this will be placed onto a feature branch of the official repository.