Live data from Hacker News

What is Local first development

alexop.dev

51–56 of 56 posts

Re: What is Local first development

#51
post #17

Earlier quoted context omitted.

Reliable Sync from a syntactic (e.g. rich text) or data structure level is possible already with CRDTs, there are many excellent solutions (y.js, automerge etc.). Semantic sync (for example when 2 people have modified a draft of a novel and want to sync): how to auto sync both versions so the resulting text makes sense and has no duplicates, is indeed much harder, and requires manual revisions (like git revisions), p…

Text editing CRDTs fall in the category of things that are technically possible, in an incredibly useless way - just like it's possible to automatically "resolve" every Git merge conflict by randomly splatting the conflicting lines around in the file.

It's more of a UI/UX problem than a hard limitation. For uses cases that require collaboration with offline editing, the person that last merges might be given a split view to sync their changes.

Again, syntactically possible, semantically harder, but it depends on your use-case plus additional constraints (eg max offline time). Maybe not a fully automatic system, but still very useful.

Re: What is Local first development

#52
post #17

Earlier quoted context omitted.

Reliable Sync from a syntactic (e.g. rich text) or data structure level is possible already with CRDTs, there are many excellent solutions (y.js, automerge etc.). Semantic sync (for example when 2 people have modified a draft of a novel and want to sync): how to auto sync both versions so the resulting text makes sense and has no duplicates, is indeed much harder, and requires manual revisions (like git revisions), p…

Text editing CRDTs fall in the category of things that are technically possible, in an incredibly useless way - just like it's possible to automatically "resolve" every Git merge conflict by randomly splatting the conflicting lines around in the file.

Most collaborative text editors use CRDTs, OT, or a derivative nowadays. For the most part, the paradigm works fine: changes aren't just "randomly splatted" around the file but appear in their expected causal context. Strange things can happen when paragraphs are deleted or moved around, but this is more of a UI problem than an intrinsic limitation, and I'm not sure what alternative you're thinking of other than locking or throwing up a horrible "pick a version" dialog box.

Re: What is Local first development

#54

Earlier quoted context omitted.

I find actual lock on edit or last-save-wins to work best of what I have seen for structured data. You can add nice visual tools that show who is editing (so you can wait for them) and pass the object lock to someone else etc, but this way at least there is no merge mechanism (that generally knows very little about the ins/outs of the data) which will merge two semantically incompatible fields into one record. For of…

> For offline-first, the user would be alerted that someone changed the record(s) while you changed them as well and ask what to do. There are few sync strategies worse than "you worked hard on this, but now you have to choose to either throw away your change or everyone else's changes". May any product doing that fail miserably.

And your great solution? As others say; there are none. Talking about structured content in an offline first context. What is your strategy that won't break anything while doing a merge?

Re: What is Local first development

#55
post #19

> Picture using these apps offline with automatic synchronization when you’re back online. This is the essence of local-first web development – a revolutionary approach that puts users in control of their digital experience. I had to laugh very hard at the "revolutionary approach". How is it revolutionary, if software was developed "local-first" for decades? Techbros really do come up with the oldest ideas and call t…

Techbros really do come up with the oldest ideas and call them revolutionary. Wait until they start vibe-coding these ideas.

"Let's invent a thing inventor, said the thing-inventor-inventor after being invented by the thing inventor."

— bill wurtz, 2017, in the video "history of the entire world, i guess"

Re: What is Local first development

#56

> Picture using these apps offline with automatic synchronization when you’re back online. This is the essence of local-first web development – a revolutionary approach that puts users in control of their digital experience. I had to laugh very hard at the "revolutionary approach". How is it revolutionary, if software was developed "local-first" for decades? Techbros really do come up with the oldest ideas and call t…

I suppose "local-first development" is a misnomer. It's really about the syncing part. Currently we have traditional applications that write data locally and therefore don't require an internet connection to work, and we have online stuff that updates a shared state "live". The "revolutionary" part would be having both of those things. It's a surprisingly hard thing to do. The current state of the art here is git. So…

Google's Keep Notes works well enough for me.
Post reply on HN