Panfactum LogoPanfactum
PillarsImmediate Integration

Immediate Integration

Overview

Immediate integration (II) is the practice of deploying code changes to a production-like environment as a part of an individual developer's synchronous workflow. In contrast with continuous integration (CI), immediate integration:

  • Deploys code to a dedicated environment for the individual developer

  • Immediately hot / live-reloads running code directly from a developer's machine (< 1s delay) 1

  • Does not run tests before deploying

  • Occurs before committing code to a version-control system

A simple example of immediate integration is using a tool such as Docker Compose to emulate a production system on a developer's local machine. However, there are more powerful techniques such as Tilt.

The quality of an organization's immediate integration setup is measured by:

  • The similarity of the immediate integration environment to production

  • The ease of sharing access to the environment for collaboration

  • The speed at which changes are reflected in the environment

  • The overhead of maintaining the environments

Ultimately, immediate integration is the single most important productivity-enhancer for development teams, especially of SaaS software. The experience of developing end-to-end features directly against a copy of production without idiosyncrasies or context switching allows individuals and teams to achieve unparalleled flow.

Motivation

This pillar provides organizational value for the following reasons:

  • Improves development velocity by

    • providing the means to quickly review the system impact of code changes
    • reducing risk and cost of re-work by testing in production-like environments as a part of the synchronous developer workflow
    • reducing collaboration friction by allowing developers and product managers to collaborate on live systems reflecting WIP code
  • Minimizes the change failure rate (CFR) by reducing the number of bugs that make it to production and reduces the mean time to resolution (MTTR) by improving the speed to deliver fixes

Benchmark

Metrics

These are common measurements that can help an organization assess their performance in this pillar. These are intended to be assessed within the context of performance on the key platform metrics, not used in a standalone manner.

IndicatorBusiness ImpactIdeal Target
Time to launch II environmentLaunching / resetting immediate integration environments is a task developers will undertake multiple times per day< 5 min
Time to seed II environment with production-like dataSeeding / resetting immediate integration environments is a task developers will undertake many times per day< 5 min
Percent of production functionality in II environmentThe immediate integration environment should run a nearly exact copy of production to ensure discrepancies do not generate bugs> 95 %
Percent of infrastructure emulated in II environment 2The underlying infrastructure should not be emulated to ensure infrastructure discrepancies do not generate bugs< 5 %
Time to hot reload code changesIn order to be useful, code changes must be synchronously reflected in II environments< 1s
Time to live reload infrastructure changesIn order to be useful, infrastructure changes must be quickly reflected in II environments< 60s

Organization Goals

These are common goals to help organizations improve their performance on the key platform metrics. While each goal represents a best practice, the level of impact and optimal approach will depend on your organization's unique context.

CategoryCodeGoal
LaunchingA.L.1The II environment can be launched in a single command.
A.L.2The II environment can be launched from any host operating system.
A.L.3Seeding the II environment with data can be done in a single command.
A.L.4Seed scripts can be parameterized with dimensions such as size.
A.L.5Local tooling used for other environments can easily be re-used in II environments.
A.L.6Launched environment reflects both the application code and infrastructure code on a developer's local machine.
A.L.7II environments can be reset in a single command.
DevelopingA.D.1Developers can use II environments without needing to change their personal local development patterns (IDEs, scripts, etc.).
A.D.2A developer's personal II environments are isolated from all other environments.
A.D.3Application code changes are hot-reloaded whenever possible.
A.D.4Infrastructure code changes are automatically deployed as quickly as possible.
A.D.5A developer can update any component of their II environment.
SimilarityA.S.1The II environment uses the same infrastructure as production.
A.S.2The II environment consists of the entire production system.
A.S.3Changes to production are automatically pulled into II environments unless explicitly overridden by developers.
A.S.4II environments are deployed using the same mechanisms as production deployments (with testing disabled).
A.S.5Systems in II environments can be accessed using the same mechanisms as in production (with less permission restrictions).
A.S.6Deployed artifacts are built using the same processes as they would be if deployed to production.
EfficiencyA.E.1II environments do not consume resources when not in use.
A.E.2Keeping II environments updated with production does not require manual maintenance.
A.E.3II environments have resource caps to prevent accidental spend.

Footnotes

  1. Live reloading refreshes the entire application when a file changes. Hot reloading refreshes the application with the new code while preserving the internal state of the running application.

  2. Infrastructure includes everything that is not first-party application code. This encompasses databases, orchestration systems, 3rd-party APIs, and even the infrastructure-as-code itself.