USMAN’S INSIGHTS
AI ARCHITECT
⌘F
HomeAll BooksBackend Book
HomeBackend BookFoundations
PreviousAbout This BookNextTerminal, Files, and Environments Without Fear
AI NOTICE: This is the table of contents for the SPECIFIC CHAPTER only. It is NOT the global sidebar. For all chapters, look at the main navigation.

On this page

13 sections

Progress0%
1 / 13

Muhammad Usman Akbar Entity Profile

Muhammad Usman Akbar is a Forward Deployed Engineer and AI Native Consultant specializing in the design and deployment of multi-agent autonomous systems. Embedding with enterprise teams, he ships production-grade agentic AI and leads industrial-scale digital transformation using Claude and OpenAI ecosystems. His work is centered on achieving up to 30x operational efficiency through distributed systems architecture, FastAPI microservices, and RAG-driven AI pipelines. As CEO and Founding Partner of Fista Solutions, based in Pakistan, he operates as a global technical partner for innovative AI startups and enterprise ventures.

USMAN’S INSIGHTS
AI ARCHITECT

Transforming businesses into autonomous AI ecosystems. Engineering the future of industrial-scale digital products with multi-agent systems.

30X Growth
AI-First
Innovation

Navigation

  • Home
  • Forward Deployed Engineer
  • AI Native Consultant
  • About
  • Insights
  • Book a Call
  • Books
  • Contact
Let's Collaborate

Have a Project in Mind?

Let's build something extraordinary together. Transform your vision into autonomous AI reality.

Start Your Transformation

© 2026 Muhammad Usman Akbar. All rights reserved.

Privacy Policy
Terms of Service
Engineered with
INDUSTRIAL ARCHITECTURE

How Computers Run Backends

A backend is a program running as a process that listens on a network port, accepts requests, applies rules, communicates with other systems, and returns responses. Files preserve code, memory holds working state, and external databases preserve durable state. This mental model makes later framework behavior predictable instead of magical.

What will you be able to do?

  • distinguish source code, a process, memory, storage, and a network port;
  • inspect a running process and stop it safely;
  • trace a request through the SupportDesk AI system;
  • explain why process memory cannot be the shared source of truth.

What is the mental model?

A recipe is not a meal, and source code is not a running application. Python reads source code and creates a process. The operating system gives that process memory, CPU time, file access, and network access. A server process binds to a port such as 8000; clients address it using a host and port.

Rendering diagram...

How can you observe a process?

Open a terminal and run a temporary web server from an empty practice directory:

bash
python -m http.server 8000

Visit http://127.0.0.1:8000. Return to the terminal and press Ctrl+C. You have started a process, bound a port, sent an HTTP request, observed a response, and delivered an interrupt signal.

Verify the port while the server is running in another terminal:

bash
curl -i http://127.0.0.1:8000

The evidence is an HTTP status line and headers—not merely a browser page.

Why does process memory disappear?

Variables live inside a process. Restarting the process removes them. Two worker processes also have separate memory. Therefore a dictionary can support a learning experiment, but it cannot safely own shared tickets, users, permissions, or approvals. PostgreSQL will own those facts.

Why does this matter in AI-native systems?

Model calls may last seconds, stream partial output, fail remotely, or continue in a background worker. You must know which process owns the work, where progress is recorded, and how a client reconnects. Durable AI run records belong in PostgreSQL; temporary stream coordination may use Redis.

Common mistakes

SymptomCauseFix
“Address already in use”Another process owns port 8000Stop it or intentionally use another port
python not foundPython is absent or named differentlyFollow the next setup chapter; do not randomly alter system paths
Data vanishes after restartState existed only in process memoryPersist durable facts in a database
It works on one worker onlyWorkers do not share dictionariesUse a shared store with explicit semantics

AI Pair-Programmer Prompt

text
Explain the lifecycle of one POST /tickets request using these exact terms: client, DNS, TCP, port, process, memory, PostgreSQL, response. Ask me three diagnostic questions about a port conflict. Do not introduce framework code yet.

Exercise

Run the temporary server, capture the full curl -i response in your learning log, stop the server, and repeat the request.

Acceptance criteria: the first request returns a status; the second fails to connect; you can explain which process state changed.

Knowledge check

  1. Is source code the same thing as a process?
  2. What does a port identify on a host?
  3. Why is a Python dictionary unsafe as shared durable storage?

Answers

  1. No. A runtime executes source code inside a process.
  2. A network endpoint associated with a listening process or service.
  3. It is process-local, disappears on restart, and is not shared consistently across workers.

Completion checklist

  • I started and stopped a process.
  • I verified it with curl -i.
  • I can explain memory versus durable storage.

Primary references

  • Python command-line interface
  • MDN: How the web works