Live data from Hacker News

Linear sent me down a local-first rabbit hole

bytemash.net

191–200 of 228 posts

Re: Linear sent me down a local-first rabbit hole

#191

ElectricSQL and TanStack DB are great, but I wonder why they focus so much on local first for the web over other platforms, as in, I see mobile being the primary local first use case since you may not always have internet. In contrast, typically if you're using a web browser to any capacity, you'll have internet. Also the former technologies are local first in theory but without conflict resolution they can break dow…

I think this is a fascinating and deep question, that I ponder often.

I don't feel like I know all the answers, but as the creator of Replicache and Zero here is why I feel a pull to the web and not mobile:

- All the normal reasons the web is great – short feedback loop, no gatekeepers, etc. I just prefer to build for the web.

- The web is where desktop/productivity software happens. I want productivity software that is instant. The web has many, many advantages and is the undisputed home of desktop software now, but ever since we went to the web the interaction performance has tanked. The reason is because all software (including desktop) is client/server now and the latency shows up all over the place. I want to fix that, in particular.

- These systems require deep smarts on the client – they are essentially distributed databases, and they need to run that engine client-side. So there is the question of what language to implement in. You would think that C++/Rust -> WASM would be obvious but there are really significant downsides that pull people to doing more and more in the client's native language. So you often feel like you need to choose one of those native languages to start with. JS has the most reach. It's most at home on the desktop web, but it also reaches mobile via RN.

- For the same reason as prev, the complex productivity apps that are often targeted by sync engines are often themselves written using mainly web tech on mobile. Because they are complex client-side systems and they need to pick a single impl language.

Re: Linear sent me down a local-first rabbit hole

#192
post #68

Man why arent couchdb / pouchdb not listed? Still works like a charm!

"Works like a charm" / "not listed" does not really do it justice, its much worse. All of the mentioned "solutions" will inevitably lose data on conflicts one way or another and i am not aware of anything from that school of thought, that has full control over conflict resolution as couchdb / pouchdb does. Apparently vibe coding crdt folks do not value data safety over some more developer ergonomics. It is an tradeoff to make for your own hobby projects if you are honest about it but i don't understand how this is just completely ignored in every single one of these posts.

Re: Linear sent me down a local-first rabbit hole

#193
post #73

Earlier quoted context omitted.

Those are theoretical numbers for a small elite. Real world numbers for most of the planet are orders of magnitude worse.

it is my actual numbers from my house in the Philadelphia suburbs right now, 80 miles away from the EWR data center outside NYC. Feel free to double them, you’re still inside the 60hz frame budget with better than e-sports latency edit: I am 80 miles from EWR not 200

update, Friday evening now and my RTT to EWR is now 8.5ms (4.2 each way), up from 6 point something this morning.

From Philadelphia suburbs to my actual Fly app in:

EWR 8.5ms (NYC)

SJC 75ms (California)

CDG 86ms (France, cross atlantic)

GRU 126.2 (Brazil)

HKG 225.3 (Hong Kong)

Re: Linear sent me down a local-first rabbit hole

#194

> Using Zero is another option, it has many similarities to Electric, while also directly supporting mutations. The core differentiator of Zero is actually query-driven sync. We apparently need to make this more clear. You build your app out of queries. You don't have to decide or configure what to sync up front. You can sync as much, or as little as you want, just by deciding which queries to run. If Zero does not h…

[deleted]

Re: Linear sent me down a local-first rabbit hole

#195

I remember being literally 12 when google docs was launched, which featured real-time sync, and a collaborative cursor. I remember thinking that this is how all web experience will be in the future, at the time 'cloud computing' was the buzzword - I (incorrectly) thought realtime collaboration was the very definition of cloud computing. And then it just... never happened. 20 years went by, and most web products are s…

The speed of light is rather unaccommodating.

We run into human-perceptible relativistic limits in latency. Light takes 56ms to travel half the earth's circumference, and our signals are often worse off. They don't travel in an idealized straight path, get converted to electrons and radio waves, and have to hop through more and more hoops like load balancers and DDOS protections.

In many cases latency is worse than it used to be.

Re: Linear sent me down a local-first rabbit hole

#196
post #72

Earlier quoted context omitted.

Back in 2018 I worked for a client that required we used Jira. It was so slow that the project manager set everything up in Excel during our planning meetings. After the meeting she would manually transfer it to Jira. She spent most of her time doing this. Each click in the interface took multiple seconds to respond, so it was impossible to get into a flow.

Looking at the software development today, is as if the pioneers failed to pass on the torch onto the next generation of developers. While I see strict safety/reliability/maintainability concerns as a net positive for the ecosystem, I also find that we are dragged down by deprecated concepts at every step of our way. There's an ever-growing disconnect. On one side we have what hardware offers ways of achieving top pe…

People forget how hostile and small the old Internet felt at times.

Developers of the past weren't afraid to tell a noob (remember that term?) to go read a few books before joining the adults at the table.

Nowadays it seems like devs have swung the other way and are much friendlier to newbs (remember that distinction marking a shift?).

Re: Linear sent me down a local-first rabbit hole

#197

Earlier quoted context omitted.

uh have you ever tried pinging a server in your same city? It's usually substantially <30ms. I'm currently staying at a really shitty hotel that has 5mbps wifi, not to mention I'm surrounded by other rooms, and I can still ping 8.8.8.8 in 20ms. From my home internet, which is /not/ fiber, it's 10ms.

If you've ever used speedtest.net, you've almost certainly been using benchmarking against a server in your own city, or at least as close as your ISPs routing will allow. Ookla servers are often specifically optimized for and sometimes hosted/owned by ISPs to give the best possible speeds. Google's DNS servers use anycast magic to get similar results. Basically no service you actually use outside of very, very large…

if I'm able to ping 8.8.8.8 in 10ms, doesn't that mean that my rtt latency to get out of the docsis-part of the network is 10ms, and that any latency beyond that will be the same regardless of docsis/fiber?

Re: Linear sent me down a local-first rabbit hole

#198

ElectricSQL and TanStack DB are great, but I wonder why they focus so much on local first for the web over other platforms, as in, I see mobile being the primary local first use case since you may not always have internet. In contrast, typically if you're using a web browser to any capacity, you'll have internet. Also the former technologies are local first in theory but without conflict resolution they can break dow…

Mobile has really strong offline-primitives compared to the web.

But the web is primarily where a lot of productivity and collaboration happens; it’s also a more adversarial environment. Syncing state between tabs; dealing with storage eviction. That’s why local first is mostly web based.

Re: Linear sent me down a local-first rabbit hole

#199
post #182
post #69

Earlier quoted context omitted.

You can use the same business logic code on both the client and server. With the Linear approach, the server remains the source of truth.

It’s difficult to ensure that it’s always the same logic when client and server software versions can get out of sync. You can try to force the client to reload whenever the server redeploys, but realistically you’ll probably end up dealing with cases where the client and server logic diverge.

i mean that's life with client computers, you make stuff backwards compatible and you avoid making it too brittle.

Re: Linear sent me down a local-first rabbit hole

#200
post #38
post #32

Earlier quoted context omitted.

That and the paragraph above: > What makes this powerful is that these aren’t just type definitions - they’re live, reactive objects that sync automatically. Is what twigged my AI radar too. LLM’s seem to really love that summarisation pattern of `{X is/isn’t just Y. Pithy concluding remark}`

Fair enough, I thought what I'd originally written for that section was too wordy, so I asked Claude to rewrite it. I'll go a bit lighter on the AI editing next time. Here's most of the original with the code examples omitted: Watching Tuomas' initial talk about Linear's realtime sync, one of the most appealing aspects of their design was the reactive object graph they developed. They've essentially made it possible…

Thanks, I found that version much more engaging and understandable.
Post reply on HN