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
cjsauer 2019-10-29T14:14:04.020100Z

Hello 👋 > Pick datahike if your app has modest requirements towards a typical durable database, e.g. a single machine and a few millions of entities at maximum. Is this due to currently being limited to one machine, or is there an algorithmic limitation inherent in hitchhiker trees? Does something like Datomic’s query groups lift this restriction (for reads)?

whilo 2019-10-29T18:19:35.022900Z

It is mostly due to the fact that we have only prototypes for replication at the moment and are drafting a network API. I consider the single-machine setup a strength because we can be as lightweight as DataScript (are as easy and fast to create as a hash-map). The hitchhiker-tree has no algorithmic limitations really. If you are interested in playing with p2p replication @konrad.kuehne has a draft of how to do it here: https://github.com/kordano/kordano.github.io/blob/master/_drafts/database_replication_with_dat.md

whilo 2019-10-29T18:20:16.023800Z

What are your needs? @konrad.kuehne is currently designing a server-client setup for backends, feedback is very welcome.

whilo 2019-10-29T18:28:16.025400Z

Looking at https://docs.datomic.com/cloud/whatis/architecture.html#query-groups it is not clear to me what problem query groups solve exactly. Are they just read-only replicas of the main database?

cjsauer 2019-10-29T19:24:34.037200Z

> Are they just read-only replicas of the main database? I don’t think they truly replicate the db, at least that’s my understanding. They let you distribute query traffic over multiple nodes, where presumably the queries are for very different business cases (e.g. batched analytic reports on one node, primary user traffic on another). This way the node’s cache stays warm with the data its interested in, without competing with other types of queries. > I consider the single-machine setup a strength Yeah definitely. I was mostly wondering what happens at that million entities mark (e.g. queries become much slower, etc). > What are your needs? I’ve been extremely interested in the specific case of replicating datoms to a traditional web/mobile client for some time now. My prototype is built on datomic ions, and is rather primitive at this point, but the goal is to have a sort of general xact! function that performs a standard d/transact, and then also replicates those datoms to connected clients via some authorization rules. The client in this case is a web browser or mobile app running datascript. Working example is here: https://github.com/cjsauer/tightrope/blob/b82f37d87132e8811e1bd8580715823eca6fcfc1/src/main/tightrope/server/ions.clj#L210-L214 Lately tho I’ve been struggling with the proprietary nature of datomic, and lack of source code access. datahike is looking like an incredible replacement in that sense. So I guess you could say that my little framework is looking for a database to call “home” 🙂

cjsauer 2019-10-29T19:25:44.038200Z

Thanks for that article link btw. Very interesting. I have actually heard of Beaker/Dat in a different context long ago, but seeing it used as a means of database replication is brilliant.

2019-10-29T19:30:16.038800Z

oh, that is interesting. thanks for that!