Live data from Hacker News

Why haven't local-first apps become popular?

marcobambini.substack.com

181–190 of 494 posts

Re: Why haven't local-first apps become popular?

#181

Local-first was the first kind of app. Way up into the 2000s, you'd use your local excel/word/etc, and the sync mechanism was calling your file annual_accounts_final_v3_amend_v5_final(3).xls But also nowadays you want to have information from other computers. Everything from shared calendars to the weather, or a social media entry. There's so much more you can do with internet access, you need to be able to access re…

> There's no easy way to keep sync, either. Look at CAP theorem. You can decide which leg you can do without, but you can't solve the distributed computing "problem". Best is just be aware of what tradeoff you're making. Git has largely solved asynchronous decentralized collaboration, but it requires file formats that are ideally as human understandable as machine-readable, or at least diffable/mergable in a way wher…

Git's original merge algorithm was intentionally dumb, it was mostly just a basic three-way diff/merge. (Git's merge algorithms have gotten smarter since then.)

Three-way merges in general are easier to write than the CRDTs as the article suggests. They are also far more useful than just the file formats you would think to source control in get; it's a relatively easy algorithm to apply to any data structure you might want to try.

For a hobby project I took a local-first-like approach even though the app is an MPA, partly just because I could. It uses a real simple three-way merge technique of storing the user's active "document" (JSON document) and the last known saved document. When it pulls an updated remote "document" it can very simply "replay" the changes between the active document and the last known saved document to the active document to create a new active document. This "app" currently only has user-owned documents so I don't generally compute the difference between the remote update and the last saved to mark conflicted fields to the user, but that would be the easy next step.

In this case the "documents" are in the JSON sense of complex schemas (including Zod schemas) and the diff operation is a lot of very simple `===` checks. It's an easy to implement pattern and feels smarter than it should with good JSON schemas.

The complicated parts, as always, are the User Experience of it, more than anything. How do you try to make it obvious that there are unsaved changes? (In this app: big Save buttons that go from disabled states to brightly colored ones.) If you allow users to create drafts that have never been saved next to items that have at least one save, how you visualize that? (For one document type, I had to iterate on Draft markers a few times to make it clearer something wasn't yet saved remotely.) Do you need a "revert changes" button to toss a draft?

I think sometimes using a complicated sync tool like CRDTs makes you think you can escape the equally complicated User Experience problems, but in the end the User Experience matters more than whatever your data structure is and no matter how complicated your merge algorithm is. I think it's also easy to see all the recommendations for complex merge algorithms like CRDTs (which absolutely have their place and are very cool for what they can accomplish) and miss that some of the ancient merge algorithms are simple and dumb and easy to write patterns.

Re: Why haven't local-first apps become popular?

#182
post #8

I feel like a broken record here: it is not an engineering problem. Local-first and decentralized apps haven't become popular because SaaS has a vastly superior economic model, and more money means more to be invested in both polish (UI/UX) and marketing. All the technical challenges of decentralized or local-first apps are solvable. They are no harder than the technical challenges of doing cloud at scale. If there w…

Epicenter[1] is attempting to go against the grain here[2]. I'm not sure if it will require one of these SaaS to become a client for this business model to work...

> The long-term direction is for Epicenter to become a foundational data framework for building apps where users truly own and control their own data. In other words, the Epicenter framework becomes an SSO for AI applications. Users use Epicenter to plug into any service, and they'll own their data, choose their models, and replace siloed apps with interoperable alternatives. Developers will use our framework to build highly customized experiences for said users. To pursue that goal seriously, we also need a sustainable model that honors our commitment to open source.

> ...The entire Epicenter project will be available under a copyleft license, making it completely free for anyone building open-source software. On the other hand, if a company or individual wants to incorporate the framework into their closed-source product, they can purchase a license to build with Epicenter without needing to open source their changes and abide by the copyleft terms. This is the model used by Cal.com, dub.sh, MongoDB, etc.

[1]: https://hw.leftium.com/#/item/44942731

[2]: https://github.com/epicenter-md/epicenter/issues/792

Re: Why haven't local-first apps become popular?

#184

Earlier quoted context omitted.

I don't really get "local apps with sync". Sync to what, each other? In most cases there needs to be an always-on central authority (where backup also happens). My point is that "some device sitting alone in a corner with software and data stored on it" model is outdated (this is the "problem", I hope the "why" is obvious). But "local" should live on, just in the form of users owning most of their infrastructure.

Sync through iCloud or through the app manufacturers servers. Most apps I use are real apps that live on my local device. Then some of them sync through iCloud if I want to use sync. This is something I as the user can enable or disable in the app, and it costs me no subscription fee. I think that this is much superior to using fake apps that live on some web server. It comes with great drawbacks even when it is on t…

Meaning total trust with your cloud provider / app manufacturer. That is your choice, I wouldn't do it. Selfhosting is kind of a pain still, but gets easier every year (and for simple file sync that you mention, it's already rather easy).

Re: Why haven't local-first apps become popular?

#185

I think just doing files and then syncing the files with another solution it's okay. For example my local apps: Synthing syncs the files between my computer and phone for Note taking(just markdown and org files) obsidian on my phone, emacs/vim on my PC. Todo and reminders: org mode in emacs (desktop) orgzly on mobile. Password manager: KeePassxc desktop, keepassdx mobile. Calendar: just sync the ics file. Photos: jus…

I second Syncthing, it’s amazing!

Re: Why haven't local-first apps become popular?

#186

IMO, offline read-only is enough of a compromise. How many times are users truly offline, AND want to be able to edit at that time (and deal with the potential conflicts, which by the nature of the operation, won't have a good UX)?

In my case quite a lot of the time. Which is why Google Keep as a web app is useless but the Android version is very useful.

Also I don't understand why so many people on HN are concentrating on the simultaneous editing scenario, for most ordinary people this is actually quite a rare event especially in their private lives. Google Keep on Android seems to work pretty well in his context my family uses it to share shopping lists and other notes very successfully even hough several of us are online only intermittently.

Re: Why haven't local-first apps become popular?

#187
post #39

Apps that let you manipulate artifacts are often local. MS Office, Photoshop, Blender, CAD tools. But it turns out that actually, humans rarely work or live alone, and you can't facilitate communication through a local-first app.

Surely an email client like Thunderbird is local first? Even the email apps on mobile devices work offline and send and receive when the get a connection.

Re: Why haven't local-first apps become popular?

#188

I wonder about the categories of apps for which offline first with potentially infinitely delayed sync provides a better experience and how large those really are. It seems like most of those are apps where I'm creating or working on something by myself and then sharing it later. The online part is almost the nice-to-have. A lot of other apps are either near-real-time-to-real-time communication where I want sending t…

Apart from small software studios with non-SaaS business models, there is just no viable local-first (offline-first with infinitely delayed sync) application category, in the consumer space. Consider military applications with heterogenous and constraint networks, where assets might need to coordinate p2p under adversarial jamming. There might be applications, where AP (choosing Availability and Partion Tolerance, cf CAP theorem) makes sense.

Re: Why haven't local-first apps become popular?

#189

I feel like I'm taking crazy pills. How on Earth could anyone consider the example in #2 "conflict-free"? You haven't removed the conflict, you're just ignored it! Anything can be conflict free in that case. Obviously not every problem will have such an obvious right answer, but given the example the author chose, I don't see how you could accept any solution that doesn't produce "100" as a correct result.

I also think this is a place where CRDTs in general got stuck on the name "Conflict-Free" for way too long assuming it was fate that if they worked hard enough they find the magic data structures to eliminate conflicts altogether but real life data is a lot more more complicated than that and real life expectations of data semantics that a data type itself can't encode. I think we are just now getting to the point of…

I remember like 10 years ago seeing some people getting really excited by CRDTs. I was deeply confused about how the software would magically know what the correct thing to do would be when 2 people made edits that directly conflicted with each other…

You can’t know what to do without talking to the people involved, as they have to decide what makes sense for end goal. It’s mostly a social / collective action problem, not a purely technical one.

Re: Why haven't local-first apps become popular?

#190
post #85

Earlier quoted context omitted.

> There's no easy way to keep sync, either. Look at CAP theorem. You can decide which leg you can do without, but you can't solve the distributed computing "problem". Best is just be aware of what tradeoff you're making. Git has largely solved asynchronous decentralized collaboration, but it requires file formats that are ideally as human understandable as machine-readable, or at least diffable/mergable in a way wher…

I feel like git set back mainstream acceptance of copy-and-merge workflows possibly forever. The merge workflow is not inherently complicated or convoluted. It's just that git is. When dvcses came out there were three contendors: darcs, mercurial and git. I evaluated all three and found darcs was the most intuitive but it was very slow. Git was a confused mess, and hg was a great compromise between fast and having a…

Ah, I miss hg. Another cool aspect is that because it was written in Python and available as a library, I was able to write a straightforward distributed wiki based on hg in a single Python script. So much fun.
Post reply on HN