The evolution of web development is characterized by how requests enter a program, how programs persist in memory, and how resources are reused. This evolution is divided into three main stages:
- CGI (Common Gateway Interface): The starting point where the Web Server forks a new process for every request to execute a script.
- Containerization (FastCGI / Servlets): Introduction of long-running processes or containers using thread pools to handle requests, reducing the overhead of process creation.
- Application as Server: The application, framework, and runtime are bundled together (e.g., Spring Boot, Gin), where the application itself acts as the server.
# Stage 1: CGI
Web Server → fork process → execute script → stdout return
# Stage 2: Containerization
Web Server → Long-running process/container → thread pool
# Stage 3: Application as Server
Application = Web Server + Framework + Runtime