April 2018, Budapest
Layer | Function | Example |
---|---|---|
Application (7) | Network services for end user applications | DNS, SMTP, HTTP, FTP |
Presentation (6) | Data representation and encryption | HTML, JPEG, MP3, AVI
SSL, TLS |
Session (5) | Establishes/ends connections between two hosts | TCP, SIP, RTP, NetBIOS |
Transport (4) | End-to-end connections and reliability (error handling) | TCP, UDP |
Network (3) | Path determination and logical addressing (IP) | Routers, Layer 3 Switches |
Data Link (2) | Physical addressing (MAC) of data packets | Switches |
Physical (1) | Transmission of data over a physical medium | Cables, Hubs, Wifi |
Object
Serialized data
Message
Communication
REST
HTML
TCP
IP
Abstraction
Client - Server computing model
Request - Response paradigm
Stateless protocol
Client
HTTP request
HTTP response
Server
Client
HTTP request
Application
Server
Application
Request-Line: HTTP Method + URI + Protocol Version
GET /index.php HTTP/1.1
Headers
Accept: text/html
Accept-Encoding: gzip,deflate
Message Body: optional
Client
Application
Server
Application
Status-Line: Protocol Version + HTTP Status Code
HTTP/1.1 200 OK
HTTP/1.1 301 Moved Permanently
Headers
Content-Type: text/html
Message Body: optional
HTTP response
HTTP request
Mostly nothing, just enjoy!
Fiddler
Charles
Wireshark
}
HTTP traffic
Network traffic
… with proper design, the features come cheaply.
This approach is arduous, but continues to succeed.
Dennis Ritchie
Web application
index.php
products.php
order.php
contact.php
Client
Database
Web application
index.php
products.php
order.php
contact.php
Client
Model
View
Database
MVC web application
Client
Database
ViewModel
Controller
Model
View
request
execute
update
(push)
response
query / persist
Front Controller
routes
RESTful service
Desktop client
(Windows, C#)
Console client
(Linux, C++)
Web client
(Browser, HTML)
Database
Web client
(Browser, JavaScript)
XML
JSON
JSON
HTML
Fiddler
Charles
Postman
RESTClient
Insomnia
Authenticate
Add product to basket
Checkout
Pay
Complete order
Web application
Bank
Client
Browser
Client may make ANY request in
ANY order
Client
Create controller instance
Create model instance
Execute tasks
Create view instance
Create response
Delete controller, model, view instances
HTTP request
HTTP response