◀
Engineering
- Basic principles of Engineering:
- Reproducibility (do the same thing more than once),
- Measurability (define what is same),
- Portability (as a result of the above),
- Standardization (formal or industrial),
- Documentation (what else is needed for reproducibility),
- Organization (no randomness).
- Apply these principles in Software Engineering.
Computer networks
- Systems for transmitting data between computers
- Layered architecture (different approaches):
- Physical level – hardware, wires, wireless
- Logical level:
- Network organization and topology
- Addressing and communication protocols
- Application level:
- Services and applications offered to end-users
Client-Server
- Client-Server is a relation between two subjects.
- Server is passive (serves), fulfills client requests.
- The relation can be observed on many levels:
- Relation between entire Systems,
- Relation between application parts, computer processes.
- Examples:
- Web Browser is a client to a Web Server,
- Web Server is a client to a Database Server,
- Web Browser is a server to an end user,
- Computer is a server to an end user.
- Opposite: P2P architecture.
Computer networks
- Need a communication protocol (set of rules).
- In applications we are not interested in the physical layer.
- A computer network from an application viewpoint:

Internet protocols
- Most networks use protocols from the TCP/IP protocol suite.
- Internet is every network using the TCP/IP protocol suite.
- The Internet vs. internet vs. intranet
- IP (Internet Protocol) – A basic transmission protocol (packets).
- TCP (Transmission Control Protocol) – A reliable protocol.
- UDP (User Datagram Protocol) – An unreliable protocol.
- Dozens of protocols for network services (DNS, DHCP, HTTP, SMTP, SSH, …).
- Internet standards are marked as RFC (industry standards).
Internet Addresses
- Hardware address (MAC address) – unusable in the application layer:
- Assigned by the device manufacturer,
- Reasonably worldwide unique.
- Logical address (IP Address) – most important for transmission:
- Assigned by the network administrator,
- Respects topology of the network and can be used to find the physical device location.
- Name address (Domain Name) – used by end-users only:
- Assigned through DNS (service/server/system),
- Must be translated (M:N) to an IP Address for transmission.
Addressing hosts
- For communication between two hosts, the logical addresses of both devices must be known.
- Domain names must be translated to logical addresses.
- One host may run multiple applications, a socket must be used to distinguish between them.
- For communication between applications, both the source and destination socket must be known.
- Socket = IP Address + Port.
- Port is a numeric identifier of the application (1-65535).
Internet Network Services
- Network Services are various applications offered to the end-users of the internet network
- Each service has a network protocol (and therefore the port) assigned to it:
- Destination ports are well-known,
- Source ports are ephemeral.
Connection example
- HTTP protocol uses port 80:
apache.exe TCP server:80 server:0 LISTENING
opera.exe TCP pc19:4307 server:80 ESTABLISHED
apache.exe TCP server:80 pc19:4307 ESTABLISHED
- URL (Uniform Resource Locator) is used by many services.
protocol://user:password@address:port/path?query
protocol
– a registered protocol name (required),
user
and password
– optional credentials (discouraged),
address
– either an IP address or a name address of the destination host (required),
port
– a socket port (required),
path
– a directory to the actual requested file,
query
– name-value
pairs optionally supplied to the requested file.
WWW Service
- WWW (World Wide Web) Service is a system for providing linked text documents.
- The service offers access to published documents – web pages.
- Web pages can be:
- static – must be manually changed on the server,
- dynamic – generated by an application on the web server.
- WWW service uses the HTTP (Hyper-text transfer) protocol for transmitting the
web pages.
- Web pages are usually created using the HTML language.
HTTP Protocol
- HTTP is a stateless protocol:
- Communication is split into transactions,
- Each transaction creates a new HTTP connection,
- Together with terminating the transaction, all state information is lost:
- Theoretically this prevents someone from logging in, but there is a way around this.
- Requests from a single client are isolated on the server and they are difficult to be connected together.
- HTTP is a text protocol.
HTTP Transaction
- An HTTP Transaction is composed of the steps:
- Establish a connection (client),
- Send a request (client),
- Send a response (server),
- Terminate the connection (server).
- Both the request and the response consist of headers and body.
- An HTTP Transaction fulfills a single HTTP request.
- Many HTTP transactions are required to load a single page.
HTTP Transactions

Checkpoint
- What is the difference between the web and the internet?
- How many different TCP/IP protocols do you use in a day?
- How many HTTP request have you sent during reading these slides?
- What use is an unreliable protocol?
- Is it more important to know the protocol or the port?
- Is it possible to download a page without creating a socket?
- Can you visit a page by knowing just the MAC address of the server?
- Can a server be a client?