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 2019-06-27T07:33:35.031500Z

@mihaelkonjevic nice work https://github.com/retro/konserve-pg 😎

whilo 2019-06-27T08:00:38.032100Z

what kind of benefits does postgres provide for you?

purrgrammer 2019-06-27T08:10:32.033100Z

I can't speak for Mihael, but at $work Postgres is the only database that we are allowed to deploy, so I can see how having a backend for Postgres might be useful (albeit not optimal)

πŸ‘ 1
whilo 2019-06-27T08:29:46.033500Z

that makes sense. it should not be too bad, i hope

whilo 2019-06-27T08:30:01.033800Z

after all people also use postgres as a JSON blob store nowadays

mihaelkonjevic 2019-06-27T08:39:14.043400Z

@whilo for me it's ability to deploy to Heroku. I want to be able to quickly prototype backends for the apps I'm working on because backend mocking is not really a feasible strategy for anything except the simplest cases. So in our case I would prototype an app in a few weeks (both on frontend and backend) which would allow me to nail the GraphQL schema early in the process. After that the backend team takes over and implements the real backend based on the prototype. So for my usecase, cheap (free) way to quickly deploy a datomic-like backend is extremely valuable

πŸ‘ 1
whilo 2019-06-27T08:40:33.044200Z

that sounds like a super reasonable workflow

whilo 2019-06-27T08:45:24.044900Z

you are missing the flexible postgres protocol dispatch for that, right?

mihaelkonjevic 2019-06-27T08:48:27.047200Z

Yeah, but I'm ok with patching datahike in my codebase if you're in the middle of re-architecting. It depends on how valuable is pg driver for the rest of the community

purrgrammer 2019-06-27T09:42:39.047500Z

i did a proof of concept of extensible stores w/ multimethods in my fork https://github.com/purrgrammer/datahike/pull/1/files not sure if that's what you folks had in mind

mihaelkonjevic 2019-06-27T09:59:29.048700Z

@bandarra yeah, that’s it. I would only add :default implementations that throw exceptions if the method is not defined

purrgrammer 2019-06-28T10:14:26.051800Z

I also took a stab at the rolling hash for the DB that @whilo suggested, there is an explanation of a couple possible approaches in https://github.com/purrgrammer/datahike/pull/3

purrgrammer 2019-06-28T10:17:48.052200Z

for me it makes sense that the hash of DB incorporates hashes of atoms added and then retracted, is part of the history of the DB. supporting consistent hashing of DB and FilteredDB forces us to recompute hashes when retracting datoms too..

purrgrammer 2019-06-28T10:19:46.052500Z

not sure how valuable is supporting hashing of FilteredDB

purrgrammer 2019-06-29T10:29:35.052700Z

another option would be to support hashing in hitchiker-tree as suggested in https://github.com/replikativ/datahike/issues/38#issuecomment-489301927 going to take a πŸ‘€

whilo 2019-06-30T23:31:54.053Z

I think the hitchhiker tree option is not as good, because it means databases with the same values, but different indices are not the same. If we can track the hashing in datahike along your PR then this would be optimal, I think.

πŸ‘ 2
purrgrammer 2019-06-27T10:03:00.048800Z

πŸ‘ i'll tidy it up based on feedback and open a PR to datahike

kkuehne 2019-06-27T10:04:36.049Z

if possible to the index-protocols branch

kkuehne 2019-06-27T10:04:50.049200Z

we’ll release a beta version using that next week

purrgrammer 2019-06-27T10:05:31.049400Z

sure

kkuehne 2019-06-27T10:07:38.049600Z

πŸ‘ thanks

purrgrammer 2019-06-27T10:36:52.049800Z

let me know your thoughts on the PR, thanks for your time! https://github.com/replikativ/datahike/pull/51

kkuehne 2019-06-27T10:44:11.050100Z

alright, I’ll review it tomorrow.

2019-06-27T18:46:52.051400Z

These sound like really great rationales to me. Thanks @mihaelkonjevic!

πŸ‘ 1