How the Web Works
Mark Fontenot, PhD
Northeastern University
How the Web Works - Client/Server Model
Network/Internet
IP4 Address: 192.168.0.56
Unique to this computer on its network (and perhaps on the public internet as well)
S
E
R
V
E
R
IP4 Address: 142.250.80.46
Listening on Port 80
Client
Server
Client and Server
3-Tier Software Architecture
From AWS Documentation on Software Architecture
3-Tier Software Architecture
From AWS Documentation on Software Architecture
Possibly (Usually) Different Systems
AppSmith Python Flask MySQL
Flask is an unopinionated framework used to build web applications, including REST APIs.
Basics of Web Request/Response Cycle - 1
1. Enter the URL in the browser
Basics of Web Request/Response Cycle - 2
1. Enter the URL in the browser
2. DNS Service converts domain name into IP address.
D
N
S
northeastern.edu
155.33.17.68
Basics of Web Request/Response Cycle - 3
1. Enter the URL in the browser
2. DNS Service converts domain name into IP address.
D
N
S
northeastern.edu
155.33.17.68
3. Browser sends a request to server at�155.33.17.68:80 (or port 443)
W
E
B
S
E
R
V
E
R
Server at IPv4: 155.33.17.68 -
Web Server “Listening” on Port 80 and 443 for HTTP/HTTPS request
Basics of Web Request/Response Cycle - 4
1. Enter the URL in the browser
2. DNS Service converts domain name into IP address.
D
N
S
northeastern.edu
155.33.17.68
3. Browser sends a request to server at�155.33.17.68:80 (or port 443)
W
E
B
S
E
R
V
E
R
Server at IPv4: 155.33.17.68 -
Web Server “Listening” on Port 80 and 443 for HTTP/HTTPS request
4. Web Server gathers all necessary info to respond to the request, including possibly querying a database.
DBMS
Server at IPv4: 155.33.17.128 -
MySQL “Listening” on Port 3306 for a connection
Basics of Web Request/Response Cycle - 5
1. Enter the URL in the browser
2. DNS Service converts domain name into IP address.
D
N
S
northeastern.edu
155.33.17.68
3. Browser sends a request to server at�155.33.17.68:80 (or port 443)
W
E
B
S
E
R
V
E
R
Server at IPv4: 155.33.17.68 -
Web Server “Listening” on Port 80 and 443 for HTTP/HTTPS request
4. Web Server gathers all necessary info to respond to the request, including possibly querying a database.
DBMS
5. Web Server sends response back to browser with info it collected and resumes waiting for next request
Server at IPv4: 155.33.17.128 -
MySQL “Listening” on Port 3306 for a connection
Basics of Web Request/Response Cycle - 5
1. Enter the URL in the browser
2. DNS Service converts domain name into IP address.
D
N
S
northeastern.edu
155.33.17.68
3. Browser sends a request to server at�155.33.17.68:80 (or port 443)
W
E
B
S
E
R
V
E
R
Server at IPv4: 155.33.17.68 -
Web Server “Listening” on Port 80 and 443 for HTTP/HTTPS request
4. Web Server gathers all necessary info to respond to the request, including possibly querying a database.
DBMS
5. Web Server sends response back to browser with info it collected and resumes waiting for next request
Server at IPv4: 155.33.17.128 -
MySQL “Listening” on Port 3306 for a connection
For your project:
Python Flask App Container
MySQL Container
How the Web Works - HTTP Request/Response
Network/Internet
IP4 Address: 192.168.0.56
Unique to this computer on its network (and perhaps on the public internet as well)
S
E
R
V
E
R
IP4 Address: 142.250.80.46
Listening on Port 80
Client
Server
Request
GET /hello.html
Response
Status Code 200, Response headers, & contents of hello.html
HTTP/HTTPS
HTTP/HTTPS Methods (Verbs)
Building a REST API
JSON
Example JSON:
{
“dept”:”CS”,
“num” : 3200,
“instructors”:[“Rachlin”,
“Fontenot”]
}