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.
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:
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
| Reason | What it means for the movie app |
|---|---|
| Latency | Filtering on the phone responds instantly — no network round trip per keystroke |
| Bandwidth | Sending results once and filtering locally uses less data than asking a server each time |
| Resilience | Already-loaded movies stay searchable in a tunnel or on a plane |
| Privacy | Data that never leaves the device can’t leak in transit or from a server breach |
| Cost | Every 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 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.
1. Which statement best defines edge computing?
Edge computing moves processing toward the device or nearby infrastructure, trading central power for lower latency, resilience, and privacy.
2. The movie app filters search results on the phone instead of asking a server on each keystroke. Which benefit is MOST direct?
Local filtering skips a network round trip per keystroke, so results update instantly.
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?
Client-side configuration ends up on the device. Secrets belong on a server that the app calls.
4. Which is a genuine cost of moving work to the edge?
Server code is updated once; edge code lives on every device, which makes rollouts and fragmentation real concerns.
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.