Compute Environments & Deployment
Premise. Software executes in compute environments with different capabilities and constraints. Engineering requires understanding those constraints, representing how software components are assigned to computing resources, and controlling the process by which an implementation becomes a running system.
A room reservation service runs successfully on a developer's laptop. Its HTTP endpoints respond correctly, and its tests pass. Now students across campus must use it. The application needs a reachable address, sufficient computing resources, a predictable runtime, and a way to install updates. The source code need not change for the engineering problem to change. The implementation depended on an environment all along; deployment makes those dependencies consequential.
The word deployment sometimes means only copying software into production. Here it covers selecting an execution environment, describing the intended arrangement, preparing a deployable artifact, and controlling its release. The activities are related but distinct: a suitable environment does not guarantee a correct installation, and a correct installation does not establish that the system will behave acceptably in production.
Structure of this unit¶
We first compare the environments in which software executes, then build a deployment model for the reservation service and use it to weigh design alternatives. The second half turns to build and runtime environments, continuous integration and delivery, and the release strategies that limit what a defective change can cost.
Modeling an execution environment¶
An execution environment supplies the resources and services on which a program depends. An environment model sets what the application requires against what a candidate environment provides.
| Application requirement | Environment capability |
|---|---|
| Compatible runtime | Installed runtime and dependencies |
| Sufficient memory | Available RAM |
| Network reachability | Addressable endpoint and routing |
| Persistent data | Suitable storage service |
| Availability target | Operational capacity and recovery mechanisms |
A row matches only when the capability satisfies the requirement. Similarly named is not the same as sufficient: a machine with RAM installed may have none free, and an addressable endpoint behind a closed firewall routes nothing. Check the version, the quantity, and the reachability rather than the label.
A deployment model then represents the software components, the nodes on which they execute, the communication paths between them, and the environmental assumptions that matter to the decision. A resource model adds quantitative requirements, such as a memory ceiling or an expected concurrent workload.
These models are purposeful reductions. A diagram of browser, application server, and database may settle a question about network communication and say nothing about whether a controller meets a real-time deadline. Identify the property to be decided, then choose a representation that exposes it.
The familiar execution categories describe different dimensions. Embedded, mobile, desktop, and server name settings with characteristic constraints; cloud names a way of obtaining and operating computing services. Processes, containers, and virtual machines are execution mechanisms rather than settings. No label settles a deployment by itself: a mobile application may use a cloud backend, and a cloud application may run inside containers.
Note. A container isolates processes while sharing the host kernel; a virtual machine runs a guest operating system of its own. The lecture does not develop the distinction further.
For the reservation service, several arrangements satisfy different requirements, and they differ in where the interface, the business logic, and the persistent state execute. A local installation keeps all three on one machine. A client-server arrangement puts the interface on each user's device and gives a shared server both the logic and the reservation state. A web application separates all three: a browser, an application server carrying no reservation state of its own, and a database service holding that state.
Each split buys something and costs something. The local installation suits a receptionist working without a network, and nobody else sees the reservations. The client-server arrangement gives every user one shared view and makes the network a dependency of ordinary work. Separating the application server from the database lets the operator add or replace application servers without touching reservation data, and makes the database the one component whose failure stops the service. Availability, access, cost, privacy, and maintenance decide among these, not a preference for a platform.
From a deployment model to a running system¶
A deployment model describes an intended arrangement; the deployment process produces and installs an implementation of it. Four steps carry source code to a running system:
- Declare inputs and dependencies.
- Build an artifact in a controlled environment.
- Deploy with declared configuration.
- Verify behavior in the target environment.
Verification earns its own step because the build environment and the runtime environment differ in dependencies, configuration, credentials, and reachable services. A program can compile and still fail to start, because its runtime lacks a library or cannot reach a service it needs. Declared configuration, pinned dependencies, reproducible builds, and infrastructure as code make those assumptions inspectable. They reduce variation; they do not eliminate it.
Continuous integration (CI) integrates proposed changes and runs automated checks. Continuous delivery keeps an accepted artifact ready for release; continuous deployment ships artifacts that satisfy the configured criteria without waiting for a person. A pipeline encodes part of the engineering process as an executable model: the stages a change passes through, and the checks that must succeed. Required checks serve as admission gates, and they provide evidence about selected properties rather than proof that every operational condition is safe.
Release management addresses a further decision: when and to whom should an accepted change become available? Each strategy controls a different dimension of exposure, and each pays for the control it buys.
| Strategy | Controls | Principal limitation |
|---|---|---|
| Blue-green | Which environment receives traffic | Shared state complicates rollback |
| Canary | Fraction of users or requests exposed | Limited exposure may not reveal rare defects |
| Feature flags | Which functionality is enabled | Flag combinations increase testing complexity |
The strategies differ; the release decision does not:
- Collect evidence.
- Apply admission policy.
- Select exposure strategy.
- Monitor and accept or roll back.
The fourth step is what makes the third worth doing. A canary nobody watches exposes a fraction of users to a defect and reports nothing back.
To practice this, see Lab 1.
Evidence and control¶
The deployment problem follows the Act III engineering method. We identify environmental requirements, represent them in deployment and resource models, compare alternatives, and obtain evidence from builds, tests, deployment checks, and runtime observations. Alignment then connects an obligation to a control: a configuration validator rejects missing settings, a pipeline gate blocks an untested artifact, a release policy requires staged exposure. Observations after deployment may still reveal an assumption the model omitted.
The reservation service can now run somewhere other than the developer's laptop. The topology figure named a database service without saying what it guarantees, and that gap is the next unit's subject: what happens to reservations when a process stops, and what happens when several users change shared state at once. Answering either requires a model of stored information and of the guarantees the system managing it provides.
Labs¶
Lab 1 — The Release Factory¶
The release decision, run as a pipeline you parameterize. You set the build and test lanes, the release slots, the defect and flaky-test rates, and the monitoring quality, then choose a canary share and soak time or a blue-green verification, and read back all four delivery metrics: deployment frequency, lead time, change failure rate, and time to restore. The engine is seeded, so each run reproduces and a change in the numbers is a change you caused. Turn the monitoring quality down and watch the canary stop reporting. The exposure control still works; nothing comes back to act on. That is the fourth step failing while the third still looks healthy.
Exercises¶
Exercise 1 — Choose a deployment, then draw it¶
Eight minutes in pairs, in two phases. The reservation service must serve 500 concurrent users through university authentication at 99.9% availability, with centralized updates, limited engineering staff and a limited operating budget. Three arrangements are on the table — a local installation on each machine that uses it, one self-hosted server your team operates, or a managed service someone else operates.
Phase A, three minutes: choose an option and name the single requirement that decided it. Phase B, five minutes: draw the topology and show where state lives. Then name the evidence that would justify your arrangement. The deciding requirement, not the preference, is what has to carry the choice.
Exercise 2 — Choose a release strategy¶
Six minutes, think-pair-share, answered in order. A new release changes how reservations are validated; the build passes, but a defect could permit double-booking. Choose blue-green, canary or a feature flag; say what evidence is required before you expose anyone; and say what observation would trigger rollback, and how fast.
The fourth question is the one that bites. Every version writes to the same reservation database, so a canary serving five percent of requests still writes to shared state, and a few defective writes double-book reservations for everyone. Exposure control is not invariant preservation — which is where the next unit, Data Management, begins.
Materials¶
- Lecture slides — Compute Environments & Deployment — source (PPTX)
Readings¶
Pipelines as admission gates
- Winters, Manshreck, and Wright, Software Engineering at Google, Chapters 23–24: "Continuous Integration" and "Continuous Delivery" (2020). Read these two chapters as one assignment. They explain how continuous integration and delivery pipelines help teams build, test, and release software while controlling the risks of change. Focus on the relationship between automated checks, reproducible builds, and release confidence. The details of Google's internal infrastructure are less important than the engineering problems its practices address. Full citation: Titus Winters et al., Software Engineering at Google: Lessons Learned from Programming Over Time (O’Reilly Media, 2020), Chapters 23–24.
Deploying where you cannot reach the machine
- Memfault, "OTA Updates for Embedded Linux Devices". Embedded devices may be deployed in locations where engineers cannot physically access them. Updating their software therefore requires a mechanism that can tolerate interrupted downloads, failed installations, and unexpected restarts. Focus on how an update is packaged, installed, verified, and recovered or rolled back. Compare these constraints with deploying a web service, where the operator generally controls the server environment. Full citation: Memfault, OTA for Embedded Linux Devices: A Practical Introduction, Interrupt (Memfault engineering blog), n.d., https://interrupt.memfault.com/blog/ota-for-embedded-linux-devices.
When the platform owns the last mile
- Android Developers, "Android App Bundle Overview". Mobile applications are distributed through a platform that manages packaging and delivery to heterogeneous devices. Read for the distinction between the artifact developers produce (an Android App Bundle) and the APKs installed on devices. Focus on how this arrangement handles device-specific configurations and what control the developer retains over distribution. The implementation details of individual bundle modules are less important. Full citation: Android Developers, Android App Bundle Overview, Android developer documentation, n.d., https://developer.android.com/guide/app-bundle.
Earlier reading revisited
- DORA, "Software Delivery Metrics: The Four Keys", previously assigned in Unit 03, Teamwork. First read for how an organization measures software delivery performance; reread it against the release machinery of this unit: deployment frequency and lead time for changes describe the pipeline you have just built, while change failure rate and time to restore service describe what a release strategy is for. Those last two return in the Operations unit, where the subject is keeping a deployed system healthy rather than getting a change into it. Which of the four would a canary release improve, and which could it make worse? Full citation: DORA, “Software Delivery Metrics: The Four Keys,” DORA, accessed September 25, 2026, https://dora.dev/guides/dora-metrics/.
If you skipped this reading in Teamwork, read it now.