The Pendulum Swings Back

I saw this post:

And I was reminded of a talk @BruceTate gave several years ago about how the pendulum swings back and forth. In the days of the mainframe all the horse power was on the server. Then PC’s came along and users started getting some power locally. Then we moved to client/server and everything was on the back end again etc etc. By the way Bruce I do apologize if I’m mangling your ideas–it’s been a while since you gave that talk and I’m going off memory.

The thing is, some apps are simply a better user experience local and some apps are simply better hosted off of a server. Dictating that all apps must be one or the other is poor engineering.

3 Likes

Or more likely “Marketing-first software” :wink:

Somewhat tangentially, Chris being upfront about LiveView not being right for all situations from the get-go was one of the many things that impressed me about it.

1 Like

We can do local first with Phoenix…

There was a talk yesterday about ElectricSql at Code BEAM America

6 Likes

It is not incompatible to use local first with liveview, we can use both

Oh wow, was not aware of phx_sync. Personally, I would like to avoid offline/local first for the rest of my career if I can :sweat_smile: But it’s really great there’s been progress in this area!

While it is historically accurate to say that the pendulum has been swinging back and forth, and that the reasons for that are mostly well-understood (mostly related to the power of the client and/or the server machines really), I feel that this ignores what is actually a good idea and/or pragmatic to do.

IMO most people in many apps, barring social networks or just very social apps like chats, 99% of the time interact with computers in their own mini universe. They would be completely fine if the app stored their changes in a local SQLite instance that lives in a WASM runtime in the browser, for example. And syncs all changes, say, once every two minutes. And have browser capabilities that clearly state “if this tab is closed, sync this DB to this server endpoint and don’t give up until it’s done”, invisibly from the user – they can close their tab and move on with life.

Many people in smaller organizations (and/or more closed ones but still with a lot of customers) have explored very similar ideas btw, and they found them working crushingly well.

Of course, as you yourself said, it seriously depends on the app – of course. But even something like an e-commerce website where you browse products, add favorites, put stuff in a cart, order, pay etc. can work just fine with mostly local access. I mean, not like most e-stores change their inventory 20 times every day… syncing stuff once every 2 to 120 minutes is going to serve nearly everyone just fine, 99% of the time.

Alas, the tech zeitgeist moved to the path of least resistance, as it always does because, you know, the companies need interns that are paid 10x less than a senior. :slight_smile:

5 Likes

The package has been released yesterday, it’s really fresh

We can use postgresql in the browser too :slight_smile:

No need to switch to sqlite

6 Likes

Ha, very nice. Nothing is perfect though, of course the kids will choose TypeScript and feel they are rocket scientists but oh well, we can’t have it all.

I am bookmarking this. I have an idea or two that needs a DB like that.

Oh wow, I hadn’t clicked the link. This looks generally really great, even outside of offline-first scenarios.

Local-First web applications are basically what should have been written as native applications. However, due to the fact that most people’s computer are not computers anymore, but walled gardens controlled by mega corporations, developers have to do this ****.

8 Likes

Hi all!

I really didn’t expect this much reaction to this. :slight_smile:

I was just reminded of Bruce Tate’s talk and just wanted to point out the similarity. Bruce is a sharp guy and I was just impressed by the fact that he called it years ago.

Personally I’ve been in corporate environments where “everything has to be a web app” and I think that’s an ignorant approach. Yes, lots of things work well as web apps but the Golden Hammer syndrome for web apps is sort extremely short-sighted.

Just my opinion of course.

1 Like