Fork me on GitHub
#datahike
<
2022-12-30
>
Tom H.05:12:21

I was re-reading this datahike blog and saw it mentioned Syncthing https://lambdaforge.io/2019/12/08/replicate-datahike-wherever-you-go.html Would datahike synced with Syncthing work well for building hobby apps? I already use it for syncing my personal files, it would be handy if I could run little Clojure apps on any of my PCs and have them communicate via Syncthing/datahike. Is a filewatcher triggering a reconnect still a good approach?

👀 1
timo17:01:03

I guess reconnecting is a reasonably good approach for a hobby app. Maybe @UB95JRKM3, the author, can tell you more...

whilo16:01:21

It still a good approach, but not necessary anymore with https://github.com/replikativ/datahike/pull/332. You can set it up so that it always rereads from the file system now, with the caveat of more IO and latency. Nonetheless you need to make sure that you have only a single writer until the system has converged again.

whilo16:01:53

This can be achieved by running datahike-server with https://github.com/replikativ/datahike-server-transactor loaded on the clients. Effectively it routes all transact calls through the server to ensure a single writer.

whilo16:01:53

I can walk you through it in case you are interested. I need to write docs still anyway.

Tom H.12:01:30

Thanks @U1C36HC6N! When i get some time I'll have a read of the code first and then get back to you