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
alekcz 2020-04-19T13:49:08.002400Z

@whilo I'm a bit stuck with building a konserve backend. Eventually I cloned the konserve-pg repo and ran lein test I get this error (same one I was getting on my repo):

Exception in thread "main" java.lang.IllegalArgumentException: No single method: _update_in of interface: konserve.protocols.PEDNAsyncKeyValueStore found for function: -update-in of protocol: PEDNAsyncKeyValueStore, compiling:(konserve_pg/core.clj:86:6

adamfeldman 2020-04-20T12:38:54.004400Z

May I ask what backend you’re targeting?

alekcz 2020-04-20T21:24:33.004600Z

@adam622 I'm targeting firebase.

alekcz 2020-04-20T21:26:26.004800Z

Still a work in progress https://github.com/alekcz/konserve-fire

2👍1👀
adamfeldman 2020-04-20T21:42:59.005300Z

That’s awesome! I’ve been spending time lately looking into using Datahike on a new project, exploring how to implement konserve storage adapters, with Firestore and FoundationDB in mind. Was recently reading konserve storage protocol implementations from datahike and/or a konserve storage adapter, trying to understand how stored data is organized and mapped to the semantics of the storage. Am I correct that batches of what Datahike sees as a single key-value are serialized and stored in a single key in the storage?

alekcz 2020-04-21T07:43:36.005700Z

@adam622 yeah it looks like it. I only got it working late last night.

1👍
alekcz 2020-04-21T07:44:06.005900Z

I'm now wondering what happens when the value in the kv is at capacity

adamfeldman 2020-04-21T13:00:30.008700Z

Yup. FoundationDB also has byte-size limits for values and the transaction as a whole.

whilo 2020-04-23T11:39:37.041Z

@adam622 Yes, the underlying hitchhiker tree stores tree fragments under single key-value pairs. @alekcz360 That is super cool. I have hit this -update-in also in the past, but decided to simplify the API by having just one protocol instead of multiple arities. I would still like to know what the problem is. It seems to work in some setups.

whilo 2020-04-23T11:41:33.041200Z

We are having a group call on Friday discussing a metadata extension to the konserve protocols to support our concurrent GC (basically we need to store last edit time of key value pairs). Current backend implementations should need minor changes, but we also need to write migration code. I would recommend getting a backend to run now anyway and we can help you to update it to the new protocol.

whilo 2020-04-23T11:41:47.041400Z

The work you are doing is super awesome. Thank you!

alekcz 2020-04-23T11:48:58.043100Z

@whilo I cloned konserve-pg and was building off that. Turns konserve-pg was using an outdated version of konserve before -update-in in the current was in the protocol. So the error was justified.

alekcz 2020-04-23T11:49:42.043600Z

@whilo I'm going to do a pull request on it. I also noticed on konserve-pg that in -get-in the read is potentially blocking.

alekcz 2020-04-23T11:50:33.044300Z

I'm actually thinking it may be worth while for me to put together a template repo for backends with lots of notes robust test. Would love you to review it afterwards.

whilo 2020-04-23T12:06:53.055300Z

Ok, sure. Given your level of interest you could also join our call on Friday on the new protocol and the filestore implementation.

alekcz 2020-04-23T14:33:34.055500Z

I'm keen @whilo. What time is the call?

nprbst 2020-04-24T21:26:13.059300Z

@alekcz360 If you do the template repo thing, please post it to #datahike ...would be fantastic learning tool. I'm interested in seeing if Datahike can be combined with CRDTs...so achieving an understanding where the layer boundaries by seeing just the "scaffolding" would be very helpful.

alekcz 2020-04-19T13:49:18.002700Z

Any idea what's wrong?