Local-First Software Is Easier to Scale

175 pointsposted 7 months ago
by chilipepperhott

29 Comments

gritzko

7 months ago

Local first apps have some peculiar technical features, yes. I worked on CRDTs from maybe 2008 and in 2012 we made a collaborative editor. Local first, all data on the client, syncing by WebSocket. I remember when we debugged it we once had a problem resetting a document. It kept reappearing. The guilty was an iPad laying on the table face down. It synced all the data back. That was seriously different from e.g. Evernote that was losing data all the time. In our system, intentionally purging was really difficult.

Once we ran two weeks with a "poisoned" document that was crushing any server it was uploaded to. The user kept the tab open just working like nothing was happening. Then, we found the bug, but in theory we may have made the entire cluster restart all the time. Apart from electricity consumption, that would hardly change anything. The load and syncing time would be worse, but not by much.

With local-first, everything keeps working even without the server.

Here is the 2012 engine, by the way:

https://github.com/gritzko/citrea-model

361994752

7 months ago

It's amazing to me how we called "box-product" now has a fancy new name "local-first". "Box product" is quite well understood. It has a lot of benefits, but also the business model is harder to get right comparing to cloud services. For opensource projects, that will not be a problem tho.

plorkyeran

7 months ago

I'm old enough to have bought software boxes in stores and I've never heard the term "box-product".

9283409232

7 months ago

Lot of young people don't know what a box product is. You're showing your age.

NoTranslationL

7 months ago

I purposely did not set up any infrastructure for my iOS app Reflect and made it local-first [0]. I did it so that I could make the app completely private but it’s come with the wonderful side effect that the product is easily horizontally scalable. The only overhead I have for more users is a busier discord channel and so far that community growth has felt very rewarding.

[0] https://apps.apple.com/us/app/reflect-track-anything/id64638...

mkagenius

7 months ago

Three clear advantages of a local first software:

1. No network latency, you do not have to send anything across the atlantic.

2. Your get privacy.

3. Its free, you do not need to pay any SaaS business.

An additional would be, the scale being built-in. Every person has their own setup. One central agency doesn't have to take care of all.

Chris_Newton

7 months ago

IMHO, this overlooks probably the biggest advantage of all: software you can buy once and run locally is predictable.

While the modern world of mobile devices and near-permanent fast and reliable connectivity has brought some real advantages, it has also brought the ability for software developers to ruthlessly exploit their users in ways no-one would have dreamt of 20 or 30 years ago. Often these are pitched as if they are for the user’s benefit — a UI “enhancement” here, an “improved” feature there, a bit of casual spying “to help us improve our software and share only with carefully selected partners”, a subscription model that “avoids the big up-front cost everyone used to pay” (or some questionable logic about “CAPEX vs OPEX” for business software), our startup has been bought by a competitor but all the customers who chose our product specifically to avoid that competitor’s inferior alternative have nothing to worry about because they have no ulterior motive and will continue developing it just the way we have so far.

The truth we all know but don’t want to talk about is that many of the modern trends in software have been widely adopted because they make things easier and/or more profitable for software developers at the direct expense of the user’s experience and/or bank account.

ebiester

7 months ago

And if you’re willing to pay $195 for the package and upgrades of $50 each time the OS breaks the app, we are good. And as long as this software doesn’t have to sync across mobile and desktop. And as long as this is single user software.

Then sure.

echelon

7 months ago

This entire paradigm gets turned on its head with AI. I tried to do this with purely local compute, and it's a bad play. We don't have good edge compute yet.

1. A lot of good models require an amount of VRAM that is only present in data center GPUs.

2. For models which can run locally (Flux, etc.), you get dramatically different performance between top of line cards and older GPUs. Then you have to serve different models with different sampling techniques to different hardware classes.

3. GPU hardware is expensive and most consumers don't have GPUs. You'll severely limit your TAM if you require a GPU.

4. Mac support is horrible, which alienates half of your potential customers.

It's best to follow the Cursor model where the data center is a necessary evil and the local software is an adapter and visualizer of the local file system.

Brian_K_White

7 months ago

I think you missed the most important thing, more than any of those, if there is no service, then the service cannot delete or deny access to your data.

And related, if there is no service, then the service cannot fail to secure your data.

No possibility of a billing or login error, where you lose access to your stuff because they just think your're not current or valid when you are.

No possibility of losing access because the internet is down or your current location is geo blocked etc.

No possibility of your account being killed because they scanned the data and decided it contained child porn or pirated movies or software or cad files to make guns or hate speech etc.

Those overlap with free and privacy but the seperate point is not the money or the privacy but the fact that someone else can kill your stuff at any time without warning or recourse.

And someone else can lose your stuff, either directly by having their own servers broken into, or indirectly, by your login credentials getting leaked on your end.

nicce

7 months ago

All of those advantages are also reason why businesses don’t adapt it…

_1tem

7 months ago

Closest thing to true “serverless”: entire MVC app (Django/Rails/Laravel) in the browser with WASM and data persistence by SQLite over CDN.

All the server has to do then is serve binaries, all the business logic is in the client.

gjsman-1000

7 months ago

Brilliant… but now you need to validate that the client did all their business logic correctly without tampering. That alone can be so complex it defeats the point.

bcoates

7 months ago

What's WASM adding here? Without that you're just describing an ordinary SPA+CDN

comma_at

7 months ago

If the problem fits into the limited local resources, if there's no syncing required, no login, no multiplayer, ... Sure, do it. But don't pretend this solves all business cases.

danjl

7 months ago

The reason it's easier to scale local software is that it does not rely on cloud resources. As a result it's cheaper for a startup to distribute local first software since they don't need the infrastructure of a traditional cloud app. The problem is there is no business model for local first software like there is for subscriptions with SaaS. Traditional desktop apps were sold as single purchase items on CDs. That just doesn't work for local first software, since you probably just navigate to a website to get the software.

vimy

7 months ago

You can just charge subscriptions for local first software. No cloud is irrelevant. Only the value to the user matters.

thaumasiotes

7 months ago

> Traditional desktop apps were sold as single purchase items on CDs. That just doesn't work for local first software, since you probably just navigate to a website to get the software.

How does the reason you provide support the idea you provide it in support of? There are an infinite number of things that are sold as single purchases that you buy by just navigating to a website where you make the purchase.

There are an infinite number of things that are sold as single purchases on CDs that you buy by just navigating to a website where you make the purchase.

airstrike

7 months ago

> The problem is there is no business model for local first software like there is for subscriptions with SaaS.

I think this is too broad a stroke to paint with. There's local-first software that still connects to the cloud for additional features. Local-first can enable you to continue to work when offline, but the software can still be more useful when online.

carlosjobim

7 months ago

> Traditional desktop apps were sold as single purchase items on CDs. That just doesn't work for local first software, since you probably just navigate to a website to get the software.

Did I misunderstand this part? A lot of local software is sold as one time purchase downloads.

fmjrey

7 months ago

So many comments are based on different understanding of local-first. For some it means no data on the server, allowing some claim it's better for data privacy (but what about tracking?). For others it means it works offline but data is also on the server and there is some smart syncing (e.g. with CRDT). Others speak of apps requiring no remote data and no network needed, though I find box-product to not be very explicit in describing such category.

Also there does not seem to be any commonly agreed definition for local-first or even offline-first. I would assume the -first suffix means there are other ways but one is favored. So offline-first would mean it works online and offline, while local-first means it stores data locally and also remotely, meaning some syncing happens for any overlapping area. However syncing requires network connection, so is there really a difference between local-first and offline-first?

Personally I would use local-only or offline-only for apps that do not require respectively access to remote data or network, the latter being a subset of the former. With these -only terms in mind, I then see no difference between local-first and offline-first.

samwillis

7 months ago

Local-first is the true server-less and your device is the real "edge".

So much truth to this post.

colesantiago

7 months ago

While local first software might be easier to scale, the financial aspect remains unsolved.

I can see that Harper (The author's software) was acquired by Automattic so I assume that Automattic is paying the author to maintain Harper, effectively subsiding the maintenance costs to keep Harper free.

Not every local first (and open source) software has the opportunity to be supported by a big company.

charcircuit

7 months ago

An alternate article for this traffic spike is "PaaS is Easier to Scale". When the author relies on others to do the hosting and handle the scale the author doesn't have to worry about it. That's why he didn't need to be alerted. He's relying on others for that responsibility.

kylecordes

7 months ago

Local first is easier to scale technically.

Paid hosted software is easier to scale financially.

Without the latter, it's very hard to come up with the money to pay people to build, to support the market, etc.

lazyhideousarom

7 months ago

"Lots of cloud providers like to brag about being able to scale with their users. I like to brag about not having to scale at all."

Bars.

lazyhideousarom

7 months ago

"Lots of cloud providers like to brag about being able to scale with their users. I like to brag about not having to scale at all"

Bars.

kaycey2022

7 months ago

Why local first and not a native application?