Edge Computing: What Runs Where
Module 2 · Moving to the Edge

Edge Computing: What Runs Where

Moving the movie app onto a phone turns the device into part of the system. Learn what edge computing is, the latency–capability spectrum from device to cloud, why work moves to the edge, and why anything shipped to a device should be treated as public.

Same Story, New Device

The user story gains two words:

As a movie enthusiast using a mobile device, I want to search and browse a list of movies with details such as title, genre, and year, so that I can easily find information about movies I’m interested in while on the go.

“While on the go” changes the engineering. A phone has a smaller screen, a touch interface, a battery, and a network connection that can be fast, slow, or gone. It’s also a real computer — and that’s the idea behind edge computing.

GitHub repo Codespaces dev env User Mobile app React Native · Expo CHANGED
Module 2: the frontend becomes a mobile app. The search still runs entirely on the device. Highlighted in red: what's new or changed in this module.

What Edge Computing Means

Edge computing means processing data close to where it’s produced or used — on the device itself, or on infrastructure near it — instead of sending everything to a distant, centralized data center.

“The edge” isn’t one place. It’s a spectrum:

Devicephone · laptop · sensorruns the UI, filters locallyNear edgegateways · edge serversCDN locations near usersCloud regionlarge data centersdatabases · heavy computelower latency · works offline · more privatemore compute and storage · shared data · easier to update

Moving left buys speed, independence, and privacy. Moving right buys power, shared data, and central control. Real systems split work across the whole spectrum, and a large part of architecture is deciding what runs where.


Why Push Work to the Edge

ReasonWhat it means for the movie app
LatencyFiltering on the phone responds instantly — no network round trip per keystroke
BandwidthSending results once and filtering locally uses less data than asking a server each time
ResilienceAlready-loaded movies stay searchable in a tunnel or on a plane
PrivacyData that never leaves the device can’t leak in transit or from a server breach
CostEvery request a device handles itself is one the provider doesn’t pay to serve

Edge computing becomes essential in industrial sensors, vehicles, cameras, and retail — places where a round trip to the cloud is too slow, too expensive, or too unreliable. A phone app is the most familiar example of the same idea.

What the Edge Costs You

The edge isn’t free:

  • Limited resources. Phones have less memory, storage, and processing power than servers, and every computation costs battery.
  • Harder updates. A server is updated once; an app lives on millions of devices running different versions.
  • Fragmentation. Different operating systems, screen sizes, and hardware all have to work.
  • Physical exposure. Users — and attackers — hold the device in their hands.

That last point is the security lesson of this module.


Client-Side vs. Server-Side

Two terms you’ll use constantly from here on:

  • Client-side code runs on the user’s device — the browser or the phone app.
  • Server-side code runs on machines you control.

The defining property of client-side code is that the user can see it and change it. Web code can be read in browser developer tools. Mobile app bundles can be unpacked and inspected. Network traffic from a device can be intercepted by the device’s owner. You can make this harder, but you can’t make it impossible.

That leads to a rule that shapes the rest of this course’s architecture: anything that must stay secret, or any decision that must be trusted, belongs on a server.

⚠️ Common Pitfall: Hiding Secrets in the App Bundle

Common mistake: putting a database password, a paid API key, or admin logic inside the mobile app because “users can’t see the code.”

They can. Anything shipped to a device — including values loaded from build-time environment variables — ends up inside the bundle and can be extracted. Treat client-side configuration as public. If the app needs to use a secret, the app should call your server, and the server uses the secret on its behalf. This is one of the main reasons the app gets a backend in Module 3.

🧠 Knowledge Check

1. Which statement best defines edge computing?

2. The movie app filters search results on the phone instead of asking a server on each keystroke. Which benefit is MOST direct?

3. A developer stores a paid API key in the mobile app's environment config so it's 'not in the source code.' What's the problem?

4. Which is a genuine cost of moving work to the edge?


Up Next

The next lesson looks at the toolkit that gets the same React ideas onto a phone — React Native and Expo — and the development loop that connects a cloud workspace to the device in your hand.