Bart Blast shows how to build local-first applications in pure Elixir using Hologram.
I think he’s created something truly special here. I’ve been playing around with it and the DX is unmatched imo. Looking forward to the official release.
I think so, though I didn't spend any near that amount of time on other language forums, though I guess that's saying something. It's cool having José, Chris, and other big community leaders participate often. Same goes for frequent participating from the Erlang core team, in fact I think it got to the point where we'd hear from them even more often!
But ya, was a fun place. I loved reading it, I love helping on it and the more general chats. I even made some friends and found a job through it!
There's no easy out-of-the-box way yet. But you can do it today with JS interop as a workaround. For small files: read the file and send the bytes directly in a Hologram command payload. For big files: fetch-POST the file to your own Phoenix endpoint, or directly to S3 with a presigned URL (no extra endpoint needed, since presigning can happen in a regular Hologram command or in the page's initial state), then pass the returned reference to a command for processing.
A proper Hologram-way file upload is planned as part of a high-level forms abstraction, which comes after Local-First support lands.
Taking a peek at the repo and the local first data layer issue (https://github.com/bartblast/hologram/issues/940) I get the sense that you aren't (and not planning to) using any off-the-shelf CRDT or the like, am I right in that assumption?
How will conflict resolution be handled? Or is it a last-write-wins type setup? It would be amazing to have this build on top of automerge or something like that! It could compile to and use the automerge js libs in the browser, and deal with automerge through a NIF server side? Ok, not knowing your implementation and plans, I have to confess I am talking a bit out of my arse here...
Haha I genuinely couldn't tell. I liked it which made me think that it was actually created by a human but had me a bit concerned that my detector is losing calibration.
I think he’s created something truly special here. I’ve been playing around with it and the DX is unmatched imo. Looking forward to the official release.
reply