Recent Trends
Open in the Padhaiko app9.1 DevOps and continuous deployment pipelines
DevOps
DevOps is a set of cultural philosophies, engineering practices, and automated tools that unify Software Development (Dev) and IT Operations (Ops) to shorten the systems development lifecycle while delivering features, fixes, and updates reliably and continuously.
The CALMS Framework & DevOps Infinity Loop
DevOps adoption rests on five pillars (CALMS): Culture (shared ownership, blameless postmortems), Automation (build, test, deploy), Lean (small batch sizes), Measurement (telemetry, DORA metrics), and Sharing (transparent docs and runbooks).
+--> [ Plan ] --> [ Code ] --> [ Build ] --> [ Test ] --+
| |
+-- [ Monitor ] <-- [ Operate ] <-- [ Deploy ] <-- [ Release ]Continuous Delivery vs. Continuous Deployment
| Aspect | Continuous Delivery | Continuous Deployment |
|---|---|---|
| Automation Scope | Automates build, tests, and staging verification so code is always deployable | Automates every step all the way into live production |
| Production Gate | Requires an explicit manual human approval button/click to release | Zero manual gate—any commit passing the automated pipeline ships to users |
| Risk Profile & Fit | Preferred for regulated finance, healthcare, or business-coordinated launches | Ideal for mature SaaS platforms with comprehensive automated tests and telemetry |
Four DORA Metrics of DevOps Performance
- Deployment Frequency: How often an organization successfully releases to production.
- Lead Time for Changes: Time elapsed from a code commit to running successfully in production.
- Change Failure Rate (CFR): Percentage of deployments causing a production degradation or rollback.
- Mean Time to Recovery (MTTR): How long it takes to restore service after a production failure.
9.2 Continuous integration/continuous delivery (CI/CD) in modern projects
A modern CI/CD pipeline converts every code push into a repeatable, auditable sequence of automated quality gates before software reaches users.
[ Git Push / PR ]
|
v
[ 1. Build & Lint ] ----> [ 2. Unit & Static Security Scan (SAST) ]
|
v
[ 4. Staging Deploy & Integration/E2E Tests ] <--- [ 3. Package Container Image ]
|
v
[ 5. Production Release Strategy: Rolling / Blue-Green / Canary ]Zero-Downtime Production Deployment Strategies
| Strategy | Mechanism | Key Advantage |
|---|---|---|
| Rolling Deployment | Gradually replaces old application instances with new ones in small batches | Zero extra standby cluster cost; simple recovery |
| Blue–Green Deployment | Maintains two identical environments (Blue = live, Green = new version); router switches traffic atomically | Instant rollback by flipping traffic router back to Blue |
| Canary Release | Routes a tiny fraction of live traffic (e.g., ) to the new version while monitoring error rates/latency before full rollout | Limits blast radius if an unforeseen production defect occurs |
9.3 Cloud-native, microservices architectures and infrastructure as code (IaC)
Cloud-Native and Containerization
Cloud-native applications are designed specifically to exploit cloud elasticity, resilience, and managed services—commonly packaging services into lightweight, portable containers (e.g., Docker) orchestrated across clusters (e.g., Kubernetes) with automated health checks, horizontal auto-scaling, and centralized observability (logs, metrics, distributed traces).
Monolithic vs. Microservices Architecture
| Aspect | Monolithic Architecture | Microservices Architecture |
|---|---|---|
| Structure | Single unified deployable unit containing UI, business logic, and data access | Suite of small, independently deployable services organized around business capabilities |
| Scaling | Must scale the entire application together even if one module is busy | Scales hot services (e.g., search or billing) independently |
| Fault Isolation | A memory leak or unhandled crash in one module can bring down the whole process | Faults remain isolated to one service if timeouts and circuit breakers are used |
| Operational Complexity | Simple local debugging, testing, and single-artifact deployment | Requires distributed tracing, service discovery, API gateways, and eventual consistency |
Infrastructure as Code (IaC)
Infrastructure as Code (IaC)
Infrastructure as Code (IaC) is the practice of provisioning, configuring, and managing servers, networks, databases, and cloud permissions using version-controlled machine-readable definition files rather than manual click-through console setup.
- Declarative vs. Imperative IaC: Declarative tools (e.g., Terraform, CloudFormation) specify the desired end state ("ensure 3 web servers and 1 PostgreSQL DB exist"), whereas imperative scripts list step-by-step commands.
- Idempotency & Drift Prevention: Applying the same declarative IaC configuration repeatedly produces the exact same infrastructure state, preventing "configuration drift" between development, staging, and production.
resource "cloud_container_service" "api" {
name = "enct352-grades-api"
replicas = 3
cpu_limit = "500m"
memory_limit = "512Mi"
environment = "production"
}9.4 AI-assisted software development
Modern software teams integrate Large Language Models (LLMs) and specialized AI developer tools across the SDLC:
| SDLC Activity | AI Capabilities | Engineering Risks & Safeguards |
|---|---|---|
| Requirements & Design | Summarizing interview transcripts, drafting initial user stories, suggesting edge cases | Risk of generic or domain-wrong assumptions; requires stakeholder validation |
| Coding & Refactoring | In-IDE autocomplete, boilerplate synthesis, legacy language translation, docstrings | Hallucinated APIs, subtle security vulnerabilities, license compliance; requires strict code review |
| Testing & QA | Generating unit tests, boundary inputs, and mock fixtures from function specs | Tests may mirror buggy code if generated from implementation instead of specs; verify with coverage & mutation checks |
| Debugging & Ops | Explaining stack traces, correlating log anomalies, drafting remediation runbooks | Never blindly execute AI-suggested production commands or paste secrets/PII into external tools |
9.5 Low-code/no-code, green software engineering
Low-Code / No-Code (LCNC) Platforms
- No-Code Platforms: Enable non-programmers (citizen developers) to assemble forms, workflows, and dashboards purely via drag-and-drop visual builders without writing syntax.
- Low-Code Platforms: Combine visual drag-and-drop workflows with hooks for custom code/APIs, accelerating internal business tools and MVP prototypes.
- Trade-Offs: Drastically faster delivery and lower upfront cost, balanced against vendor lock-in, constrained customization for complex algorithms, and governance/security shadow-IT risks.
Green Software Engineering
Green Software Engineering
Green Software Engineering is the discipline of designing, building, and operating software systems to minimize greenhouse gas (carbon) emissions and energy consumption across hardware and cloud infrastructure.
Three core principles of Green Software Engineering (Green Software Foundation):
- Energy Efficiency: Write algorithms, database queries, and binaries that accomplish work using minimal CPU cycles, memory, and network transfers (right-sizing VMs, avoiding polling loops, caching).
- Hardware Efficiency (Embodied Carbon): Extend hardware lifespan and maximize server utilization rather than running idle, over-provisioned machines.
- Carbon Awareness: Shift flexible batch jobs (e.g., ML training, nightly analytics) to times or cloud regions powered by cleaner renewable electricity (lower grid carbon intensity).
Software Carbon Intensity (SCI) Formula
The Green Software Foundation quantifies a software system's emissions rate using Software Carbon Intensity ():
where:
- = energy consumed by the software system (),
- = location-based marginal carbon intensity of electricity (),
- = embodied emissions allocated to the software's share of hardware manufacturing (),
- = functional unit (e.g., per API requests, per active user, or per training run).
Worked Examples
9.1
An e-commerce platform handles live requests per second and runs a Canary Release for a new checkout service:
- During Phase 1, the load balancer routes of traffic to the canary cluster and keeps on the stable cluster. Compute the requests per second handled by each cluster.
- Suppose the new version introduces a memory bug spotted after of monitoring, and an automated rollback restores full stability in . Express the Mean Time to Recovery () in hours, and explain how Canary deployment reduced user impact compared to an all-at-once deployment.
Part 1 — Traffic Split Across Canary and Stable Clusters:
- Canary traffic ():
- Stable traffic ():
Part 2 — and Blast-Radius Reduction:
Instead of exposing of shoppers () to the buggy checkout, only () were affected before telemetry triggered an automated rollback.
- Canary cluster handles while the stable cluster handles .
- (), and the Canary release capped the failure blast radius to only of live traffic.
9.2
A nightly data-analytics batch job processes million records per run. Originally it runs on a legacy unoptimized script in a coal-heavy region:
- Energy consumed:
- Grid carbon intensity:
- Embodied hardware emissions allocated to the run:
After refactoring inefficient SQL queries (energy efficiency) and scheduling the job in a hydro-powered region (carbon awareness), energy drops to and grid intensity drops to (with unchanged). Compute the Software Carbon Intensity () in per million records before and after optimization, and find the percentage reduction.
Compute Initial : Using :
Compute Optimized :
Compute Percentage Carbon Reduction:
dropped from to per million records—a carbon intensity reduction.
9.3
How to Answer a Past Exam Question: "Compare Monolithic and Microservices architectures, and explain how Infrastructure as Code (IaC) supports modern CI/CD pipelines."
1. Contrast Monolith vs. Microservices Across Four Axes: Compare Deployment unit (single vs. multiple independent services), Scaling (whole app vs. per-service), Fault isolation (shared process vs. isolated boundaries), and Operational complexity (simple local runs vs. distributed networking, tracing, and data consistency).
2. Link IaC to CI/CD Pipelines: Explain that IaC defines servers, containers, networks, and permissions declaratively in Git alongside application code—enabling CI/CD pipelines to spin up identical, reproducible staging and production environments automatically without manual configuration drift.
An ideal exam answer contrasts Monolith vs. Microservices across deployment, scaling, fault isolation, and operational overhead, and explains how version-controlled, idempotent IaC lets CI/CD pipelines provision consistent, drift-free cloud environments automatically.
Exercises
Practice Exercises — Recent Trends in Software Engineering
Define DevOps and the CALMS pillars. Distinguish clearly between Continuous Integration (CI), Continuous Delivery, and Continuous Deployment, and list the four DORA metrics.
DevOps & CALMS: DevOps integrates development and operations through Culture, Automation, Lean flow, Measurement, and Sharing across the continuous Plan–Code–Build–Test–Release–Deploy–Operate–Monitor cycle.
CI vs. Continuous Delivery vs. Continuous Deployment & DORA Metrics:
- CI: Frequent merges verified automatically by build and test suites.
- Continuous Delivery: Code is always production-ready after automated checks, awaiting a manual release approval.
- Continuous Deployment: Every commit passing automated checks deploys automatically to production with zero manual gate.
- Four DORA Metrics: Deployment Frequency, Lead Time for Changes, Change Failure Rate (CFR), and Mean Time to Recovery (MTTR).
DevOps unifies Dev and Ops via CALMS. CI automates build/test per commit, Continuous Delivery keeps code releasable pending manual approval, and Continuous Deployment releases to production fully automatically—all measured by Deployment Frequency, Lead Time, CFR, and MTTR.
Compare Rolling, Blue–Green, and Canary deployment strategies in modern CI/CD pipelines, stating one key benefit and one scenario suited to each.
Three Deployment Strategies:
- Rolling: Replaces instances incrementally in batches; requires no duplicate idle cluster and fits standard stateless updates.
- Blue–Green: Keeps an identical standby environment (Green) alongside live (Blue) and flips router traffic atomically; enables instant zero-downtime rollback for high-stakes releases.
- Canary: Routes a small percentage of real traffic to the new release first to observe real telemetry; ideal for catching subtle production issues with minimal blast radius.
Rolling updates instances in batches (low resource overhead); Blue–Green switches traffic between two full environments (instant rollback); Canary exposes a small traffic slice first (minimal blast radius under real load).
Explain Cloud-Native Microservices and Infrastructure as Code (IaC). Contrast Monolithic and Microservices architectures and explain why idempotency matters in IaC.
Cloud-Native Microservices & Monolith Comparison: Cloud-native microservices decompose an application into small, containerized, independently deployable and scalable services—trading the operational simplicity of a monolith for independent scaling, polyglot flexibility, and fault isolation.
IaC and Idempotency: IaC manages cloud resources via versioned declarative definitions. Idempotency guarantees that running an IaC script once or ten times yields the exact same desired infrastructure state without duplicating servers or causing configuration drift.
Microservices trade a monolith's deployment simplicity for independent scaling and fault isolation. IaC defines infrastructure as versioned code, where idempotency ensures repeated deployments converge to the same consistent state without configuration drift.
Discuss AI-assisted software development across coding, testing, and debugging, along with three key risks engineers must guard against. Also compare Low-Code/No-Code (LCNC) platforms against traditional custom coding.
AI-Assisted Development & Three Risks: AI tools accelerate boilerplate coding, unit test drafting, refactoring, and log/stack-trace analysis. Three major risks: (1) Hallucinated APIs or subtle logic bugs, (2) Insecure code or leaking proprietary secrets/PII to external models, and (3) Automation complacency skipping human code review and spec-based testing.
LCNC vs. Custom Coding: LCNC platforms enable rapid visual assembly of standard forms/workflows by citizen developers, whereas traditional coding provides complete algorithmic control, performance tuning, and freedom from platform vendor lock-in.
AI assists coding, test generation, and debugging, provided teams guard against hallucinations, security/privacy leaks, and skipped reviews. LCNC accelerates standard internal apps visually, while custom coding remains essential for complex logic, performance, and avoiding vendor lock-in.
- Define Green Software Engineering and state its three core principles (energy efficiency, hardware efficiency, carbon awareness).
- A cloud video-transcoding pipeline processes hours of video per batch using on a grid with carbon intensity and allocated embodied carbon . After optimizing codec threads () and shifting execution to a cleaner off-peak window (, ), compute the Software Carbon Intensity () per video hour before and after optimization and the percentage reduction.
Part 1 — Green Software Engineering Principles: Green software engineering minimizes carbon emissions through energy efficiency (doing more with fewer watt-hours), hardware efficiency (maximizing utilization and extending device life to amortize embodied carbon), and carbon awareness (running flexible workloads when/where grid electricity is cleanest).
Part 2 — Before and After Optimization:
- Green software engineering minimizes emissions via energy efficiency, hardware efficiency, and carbon awareness.
- drops from to per video hour, achieving a reduction.