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
whilo 2020-05-04T03:36:20.108400Z

@alekcz360 what do you expect to be in the SNAPSHOT release? we can push the current metadata support branch, but it is not finished yet. most backends (except the filestore for nodejs) are ported now and we figure out the automatic migration between versions now. after that we will port our garbage collector (should not be too much effort) and then port a selection of the other backends. if people could help porting some of them it would go faster.

alekcz 2020-05-04T06:10:57.111500Z

@whilo the main thing at least from my perspective is the protocol. Without the protocol on clojars I can't put together any automated pipelines in a stable way.

alekcz 2020-05-04T06:13:32.113700Z

What I'm thinking is that once the snapshot is there I can update the template repo. Put together some robust automated tests then porting the other backends should be much faster.

whilo 2020-05-04T06:33:17.114500Z

Ok, that sounds good. We will provide a compliance test for backends with the next vesion.

whilo 2020-05-04T06:35:49.116Z

Do you want to collaborate on that? I think this is https://github.com/replikativ/konserve/blob/feature_metadata_support/src/konserve/protocols.cljc is already pretty much done, but I can ask @ferdi.kuehne to push his recent changes tomorrow.

alekcz 2020-05-04T09:23:55.116500Z

Yeah I'm keen to collaborate on that.

Ferdi 2020-05-04T14:02:03.117900Z

hello i updated the indexddb ns to the new protocols.

Flo 2020-05-04T15:43:50.121600Z

Hey eveyone! I'm running into a weird issue when inserting a :`db.type/instant` value. The relevant schema entry looks like this:

{:db/ident  :onair/started                                                                                         
 :db/valueType   :db.type/instant                                                                                       
 :db/cardinality :db.cardinality/one}
and I'm setting said attribute-value like this:
(d/transact conn [{:db/id id :onair/started (new java.util.Date)}])
Now the weird thing is that the value is written to the database, but I also get this exception: https://paste.debian.net/hidden/83735403/ Does anyone have a clue what I might be doing wrong?

Flo 2020-05-04T15:44:58.121700Z

A near-identical call for an attribute :onair/ended (also db.type.instant works without exception..

Flo 2020-05-04T16:16:50.122100Z

ah! found a ticket about it with the solution: https://github.com/replikativ/datahike/issues/131

whilo 2020-05-04T18:36:28.122400Z

Yes, sorry for the inconvenience. This will be automatically gone with the next release.

whilo 2020-05-04T19:45:31.125400Z

@alekcz360 and @ferdi.kuehne, my priority list of the stores is PostgreSQL, LevelDB, Redis, RocksDB, CouchDB and then the nodejs filestore. We need to provide an automatic migration path from the previous version at least for the konserve filestore (@ferdi.kuehne is working on that) PosgreSQL and LevelDB.

whilo 2020-05-04T19:45:58.125800Z

So the fastest way to the next release is to make sure that those are ported and the migration works.

alekcz 2020-05-04T19:50:20.126500Z

@whilo I can give redis a shot

alekcz 2020-05-04T19:50:37.127Z

Never used RocksDB our CouchDB before.

alekcz 2020-05-04T19:50:52.127600Z

I can give CouchDB at try once I'm done with redis

whilo 2020-05-04T19:51:17.128100Z

Cool! For the filestore we decided to explicitly encode the version of the schema in each value in the first byte. That will make it easier to migrate values on the fly in the future.

whilo 2020-05-04T19:52:22.129700Z

The idea being that you look up the serialized version, you lookup the version of the code running, you calculate the path of migrations and then apply a series of migration functions.

whilo 2020-05-04T19:53:37.130300Z

We can factor the migration code, the only thing we need to be able in each store is to determine the version of a serialized value.

whilo 2020-05-04T19:54:01.130700Z

And provide migration functions for each of the schema changes obviously.

whilo 2020-05-04T19:54:24.131300Z

Hopefully we do not need to change the schema often, we should avoid it as much as possible, but we need to be able to when it becomes necessary.

whilo 2020-05-04T20:01:57.131500Z

@alekcz360 Does that make sense?

alekcz 2020-05-04T20:03:12.132400Z

Yeah that makes sense conceptually. I'll have a look and let you know if I get stuck.

whilo 2020-05-04T20:03:44.132700Z

Ok, perfect 🙂.

Flo 2020-05-04T22:24:37.132800Z

@whilo not at all! Thank you for your hard and amazing work, really enjoy working with datahike!