Closed swyxio closed 2 years ago
Great stuff -- I love it.
Really like the notion from Patrick Mckenzie of how easy it will be to get a tutorial environment spun up. Great to think about. Same could be true for bug reproduction in your repository -- "Click here for environment to reproduce"
Yep, I've been thinking this for a while, especially since working at Webiny. Before I joined the company, their engineers realised they had 2 routes: try to emulate AWS' services locally with a bunch of containers (like, a lot of them), or embrace the cloud. They chose the latter, and even blogged about it https://www.webiny.com/blog/local-development-is-dying-and-it-s-for-the-better
Localhost? More like Local-ghost!
title: The End of Localhost subtitle: All the Cloud's A Staging Env, and All the Laptops Merely Clients canonical_url: https://dx.tips/the-end-of-localhost published: true
Dev environments should be cattle, not pets. It looks likely that most development will not be done on
localhost
in future.Make the ultimate developer experience wishlist for the average rich-country developer in 2030:
You will notice that most of these items enable (even require) you to run things "live" on the cloud, not
localhost
.Perhaps most importantly, the time wasted fixing bugs between dev and prod environments goes from 1-4 hours a week down to 0, if you can simply eliminate the discrepancy between dev and prod.
To paraphrase Bob Metcalfe, if the browser reduced operating systems to "a poorly debugged set of device drivers", then the cloud is reducing the dev machine to a poorly debugged set of environment mocks.
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1654705265316/mTPjVacfU.png align="center")
That's it, that's the blogpost. The rest of this article is working out subpoints, examples, trends, and anecdata.
But I Need To Code on a Plane?
Maybe stop flying so much. Or get a good audiobook and rest your eyes. Maybe even talk to your neighbor! (if they seem social)
The "Future is Just Not Evenly Distributed" Argument
Many Bigcos who have invested in their developer productivity already work entirely in the cloud. This will be news to some of you, and old hat to others, so I didn't know how much emphasis to place on this.
But to my knowledge, this is the first time anyone has collected public info about Bigco dev environments in one place:
The standard response to bringing up a bunch of Bigcos is "sure, but does it work for my small team?"
The answer is invariably "maybe yes, but also probably not in this current form", because most of these moves were done after sizable internal investment and take advantage of lots of proprietary infrastructure. However, as this tech commoditizes, we'll see more and more of it spread out as we find commonalities among audience subsets.
The obvious first part of commoditizing preview environments has already been done - one of Netlify's early innovations was making deploy previews for frontend projects ubiquitous. Virtually every docs site now uses some form of deploy preview system, and Jamstack apps can also use them for their release process (example). With database branching becoming increasingly common, this workflow will make its way further and further up the stack. Let's look at this stack next...
Jobs to Be Done of Localhost
In my original tweet calling out this trend I actually conflated different usages of local development (as Anil Dash observed):
Conveniently, they are all under attack (did i miss any? please let me know):
So no matter what you're doing in
localhost
, there's probably a well-funded startup or Amazon/Microsoft tool that does it better in the cloud.The Inevitability Argument
One of the ironic tensions of humanity is that we say we want free will, privacy, self sufficiency and decentralization, but our actions tend toward the hive mind, convenience, interdependence and central infrastructure. My theory for this is that social psychology, economics and technology are very powerful centralizing forces.
To argue against
localhost
eventually going the way of the Dodo is to do the developer equivalent of asserting that most people want to run their own generators or grow their own food.The Outer vs Inner Loop Argument
You might argue that developers take so much pride in their tools that they will go out of their way to be self sufficient in them. And yet:
I will grant that there's a difference between "We use CircleCI" and "Let's kill localhost". The term of art the industry has adopted to describe this difference in dev tooling is the Dev "Outer Loop" vs "Inner Loop" - the Outer Loop taking the git commit as the atomic unit of developer productivity, and the Inner Loop being all the developer activity that happens between commits.
So, to use those terms - we're fine with the cloud taking the slow Outer Loop, but people are concerned about network latency affecting the much faster Inner Loop.
The degree to which the cloud can eat the Inner Loop is probably a question of reliability and latency - we are more than happy to hand over slow activities that take minutes, but nobody will tolerate 300ms latencies to see the result of a keystroke.
The Potential of Edge Compute
Ultralow latency is the domain of edge compute, and likely the final frontier of how the cloud can eat that "last mile" of the developer Inner Loop.
Anil Dash, CEO of Glitch, put it best:
Cloudflare folks working on Cloudflare workers also agree:
While not as low-latency, serverless folks like Tim Wagner (creator of AWS Lambda), Emrah Samdan (PM @ Serverless.com), and Tudor Golubenco (CTO Xata) also have a lot of sympathy with this because of how easy it is to provision/scale serverless resources.
Pushback: It's Still Not Good Enough
Don't get overexcited here. My caution on judging this movement with today's technology is that for this to succeed, provisioning must feel so cheap as to be "throwaway" - even a latency of 10 seconds to spin up a preview environment is too long for me, though your mileage may vary.
It takes a second to deploy a frontend preview with Netlify Drop and ~10 seconds with the Netlify CLI, but I still habitually use localhost for development because my iteration cycle is in milliseconds. I can and have moved part of that workflow to remote tools like Codesandbox, Gitpod and Stackblitz, but none of them are fully capable of replicating the full set of dependencies that I need for fullstack development. In fact, after one particularly bad livestream, I resolved to always use Netlify Dev (the Netlify local dev solution I used to work on) because the iteration loop of git-push-and-wait-for-deploy was so agonizingly slow (I had the same pain with AWS Amplify).
Other similar sentiments:
But surely you can see that the latency question is a question of letting the Moore's law equivalent of cloud commoditizing infrastructure take its course. If it's not good enough today, then wait 5 years and check back again.
Other Notable responses
People have very extreme:
Dan Abramov predicted this happens in 5 years, not 10.
Paul Biggar sees a few drivers:
Patrick Mckenzie says:
Further Reading