TNS
VOXPOP
Will JavaScript type annotations kill TypeScript?
The creators of Svelte and Turbo 8 both dropped TS recently saying that "it's not worth it".
Yes: If JavaScript gets type annotations then there's no reason for TypeScript to exist.
0%
No: TypeScript remains the best language for structuring large enterprise applications.
0%
TBD: The existing user base and its corpensource owner means that TypeScript isn’t likely to reach EOL without a putting up a fight.
0%
I hope they both die. I mean, if you really need strong types in the browser then you could leverage WASM and use a real programming language.
0%
I don’t know and I don’t care.
0%
Data / Edge Computing

What the Heck Is the Edge — and Why Should You Care?

Bringing compute to the edge only solves half the problem, especially if you’re making calls to a centralized database somewhere in a far away cluster.
Mar 8th, 2023 10:00am by
Featued image for: What the Heck Is the Edge — and Why Should You Care?

Let’s face it: our industry has a penchant for buzzwords. As people try to differentiate themselves and establish their own relevance, they often try to do this by inventing and capturing terms that may or may not mean something.

I’m old enough to remember when people tried to push things like grid computing and fog computing.

So you would be forgiven for thinking that “the Edge” is just yet another such buzzword. Especially because the term’s confusion is made worse by the fact that:

  • Two different slices of the industry mean two completely different things by “edge.”
  • People often conflate it with serverless — which had its own misconceptions.

In this article, I’ll explain what the edge is and why you should care.

The Definition

Wikipedia defines edge Computing as “a distributed computing paradigm that brings computation and data storage closer to the sources of data. This is expected to improve response times and save bandwidth.”

We spot the reason for the first confusion in this very definition: closer to what? If it brings computation and data storage closer to the sources of data, that is a comparison. If I have a database in us-east-1 and replicate it to us-west-1, is that the “edge?”

The ‘Far Edge’ or ‘Offline Edge’

When we started talking about a product for the edge, an old colleague of mine immediately sent me a message, questioning that what we were doing was not really the edge. This person has been working with “the edge” for years, and when talking to him, the confusion immediately became clear.

Developers working on the Internet of Things (IoT), mobile devices, points of sales or telecom, see “the edge” as something as close as possible to the devices themselves, potentially inside the devices. When they talk about “pushing compute to the edge,” they are likely talking about compute that happens inside the device.

One immediate characteristic of those deployments is that internet connectivity is either slow, intermittent or barely existent (think airplanes, industrial controllers, etc). Compute and storage resources are not just reduced in comparison with the cloud, but they’re severely reduced.

Because of these characteristics, this can be referred to as the “far edge.” A term I personally prefer is “offline edge.” This is the domain where offline-first solutions shine.

The ‘Near Edge’ or ‘Online Edge’ (Web)

I could never convince my friend that there is “another edge;” to this day, he likely just thinks I have no idea what I am talking about. And in all fairness, as far as I know, the IoT folks got there first. So if they want to claim that theirs is the true edge, there’s very little I can do.

But the reality is that there is a growing and strong segment of the industry that uses the term edge to mean something else entirely. Those are web developers, deploying their applications to platforms like Cloudflare, Vercel or Netlify.

While “the cloud” may offer you a region “in Europe,” the edge will offer you multiple cities spread across Europe. Those edge locations are not as powerful and capable as cloud data centers, but they are still data centers. Technically they could be as powerful as any other cloud data center, but this wouldn’t be economical.

The web edge: lowering response times to applications, but still mostly online.

The Missing Piece: The Data Edge

For the IoT edge, each terminal device will bring its own local storage. But for the web edge, things are different. Bringing data to the edge presents its own challenges.

Compute and storage are both present in the definition of edge computing, but they are very different in nature. Compute is nimble and can be easily moved anywhere. Data is heavy and moving it has a cost. Compute is unencumbered by regulations and can happen anywhere. Data is protected and has to be treated differently depending on the jurisdiction.

For this reason, companies targeting the edge have so far focused most of their efforts on compute, like edge functions. But bringing compute to the edge only solves half the problem, especially if you’re making calls to a centralized database somewhere in a faraway cluster. You end up with as much, or potentially more, latency than if you had just hosted all your compute in a traditional centralized cloud-hosted location.

One way that developers move data to the edge is to cache it on end users’ devices. This works well for offline use, but caching and synchronization are hard things to get right, and it doesn’t solve many cases where fast access is required.

These data edge problems are exactly the ones that my company, ChiselStrike, aims to address with Turso, which brings the power of a SQLite-compatible embedded database to the edge. Turso is built on libSQL, an Open Contribution fork of SQLite.

Is Edge the Same as Serverless?

When companies like Vercel, Netlify and Cloudflare talk about the edge, they usually refer to “edge functions.” This leads developers to conflate “edge” and “serverless” as if they were similar or the same. With serverless, although there are servers somewhere, developers don’t think in terms of servers that need to be configured, scaled up or scaled down. They think in terms of functions that get executed — they are just deploying code and expecting the cloud provider to handle the rest.

This paradigm goes very well with edge computing: since we are assuming there are fewer resources available, allowing potentially wasteful general-purpose compute is less enticing. Constraining what the developers can do (through functions and massive multi-tenancy) allows for better utilization and resource packing.

Another reason is historical: those platforms were initially simple content delivery networks (CDNs), handling static assets. Over time, those CDNs started to increase in functionality and become programmable CDNs.

CDNs are gaining functionality, effectively evolving into the edge. The data edge is the next frontier.

But companies like Fly.io are also edge companies, and they operate on a different model. You can deploy a container abstraction with a long-lived application of your choice, and because they make that application available in many regions, they are also an edge player.

Is the Edge “Just X”?

Every time a new term comes along, people get too far in the weeds about whether something is truly “novel” or not. When the cloud was born, lots of people didn’t see the value because it was “just renting servers.” It was not: the ability to rent those servers in seconds instead of weeks and give them back just as easily changed how businesses operated.

I’ll always remember a coworker of mine that didn’t see any value to Slack because “it was just IRC,” and my favorite to this day is still this timeless Hackernews comment about Dropbox:

So is there something really transformative about the online edge? Yes!

Before the online edge, you could build applications that span multiple locations the same way you could have built elastic applications before the cloud: by being painfully precise about geographical provisioning, routing, placement and execution.

What the edge allows you to do now is to code as if none of that matters — as if the world is one — and to set policies about what is allowed to happen where. The edge allows truly global applications to be built transparently, without investing time and money in explicitly setting up and managing a global presence.

The Second Criterion for Relevance

The edge fits the first criterion of whether or not something is “just X” or a new concept that is here to stay: it does transform the way in which developers architect their applications. The second criterion is whether or not it solves a distinct business problem.

And this is a question for you, the reader: do you have a need to build applications that serve multiple locations with low response time? We built Turso on the strong belief that, for many of you, the answer is an unequivocal “yes.” If so, we would love to invite you to connect with me on Twitter and other edge enthusiasts in our Discord community.

Group Created with Sketch.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.