COMP211 Chapter 2 Flashcards

1
Q

What are the possible structures for applications?

A

Client-server or peer-to-peer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe client-server architecture

A
Server = always-on host w/ permanent IP address (consider data centers for scaling)
Client = communicate with server, may be intermittently connected, may have dynamic IP addresses, do not communicate directly with each other
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe P2P (peer-to-peer) architecture

A

No always-on server, arbitrary end systems communicate directly. Peers request service from other peers, provide service in return to other peers (self-scalability - new peers bring new capacity, as well as new service demands). Peers are intermittently connected and change IP addresses.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a process?

A

A program running within a host

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can processes communicate?

A

In the same host, through inter-process communication (defined by OS). In different hosts, by exchanging messages across the network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are client/server processes?

A

Client processes initiate communication

Server processes wait to be contacted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How are processes addressed?

A

Processes have identifiers, including both the IP address and port number associated with the process and host.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does the application-layer protocol define?

A
  • types of messages exchanged (e.g. request/response)
  • message syntax (e.g. what fields in message & how fields deliniated)
  • message semantics (meaning of information in fields)
  • rules (for when and how processes send & respond to messages)
  • open protocols (defined in RFCs, allows for interoperability)
  • proprietary protocols (e.g. Skype)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What transport service does an app need?

A

Data integrity, minimum throughput, timing, security

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What services does TCP provide?

A
  • reliable transport between sending & receiving process
  • flow control (sender won’t overwhelm receiver)
  • congestion control (throttle sender when network overloaded)
  • does not provide timing, minimum throughput guarantee, security
  • connection-oriented (setup required between client and server processes)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What services does UDP provide?

A
  • unreliable data transfer between sending and receiving process
  • does not provide reliability, flow control, timing, throughput guarantee, secutiry, connection setup
  • really fckin fast
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What security measures do TCP and UDP take?

A

None. No encryption, cleartext passwords sent into socket to traverse Internet unencrypted.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is HTTP?

A

Hypertext Transfer Protocol, the WWW’s application layer protocol, working on a client-server model where the client is a browser and the server is a web server. HTTP uses TCP and maintains no information about past client requests (it’s “stateless”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How does non-persistent HTTP differ from persistent HTTP?

A

Non-Persistent: At most one object sent over TCP connection, connection then closed. Downloading multiple objects requires multiple connections.
Persistent: Multiple objects can be sent over a single TCP connection between a client and server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is RTT (Round-Trip Time)?

A

Time taken for a small packet to travel from client to server and back

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How long is a non-persistent HTTP transaction?

A

2RTT + file transfer time per object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What are some features of non-persistent HTTP?

A

OS overhead for each TCP connection, browsers often open parallel TCP connections to fetch referenced objects.

18
Q

What are the time requirements for a persistent HTTP transaction?

A

As little as 1RTT + file transfer for all the referenced objects

19
Q

What are the features of persistent HTTP?

A

Server leaves connection open after sending response, subsequent HTTP messages between same client/server sent over open connection, client sends requests as soon as it encounters a referenced object

20
Q

What are the components of cookies?

A

1 cookie header line of HTTP response message
2 cookie header line in next HTTP request message
3 cookie file kept on user’s host, managed by user’s browser
4 back-end database at website

21
Q

What are some uses of cookies?

A

Authorisation, shopping carts, recommendations, user session state

22
Q

What is web caching?

A

A proxy server acts as a cache, with objects retrieved from the origin server without having to involve it. If the cache contains the requested object, it returns that object. If not, it requests the object form the origin server and then returns it.

23
Q

Why use web caching?

A

Reduces response time for client requests, reduces traffic on an institution’s access link, internet dense with caches (enables poor content providers to effectively deliver content)

24
Q

What are the three major components of email?

A

User agents, mail servers, SMTP (simple mail transfer protocol)

25
Q

What is a user agent in the context of emails?

A

A mail reader capable of composing, editing and reading mail messages

26
Q

What are the components of a mail server?

A

Mailbox (contains incoming messages for user), message queue (a queue of outgoing messages to be sent), SMTP (present between mail servers to send email messages, creates a client to send mail messages and server to receive them)

27
Q

What does SMTP do?

A

Uses TCP to reliably transfer email messages from client to server through port 25.

28
Q

What are the three phases of SMTP transfer?

A

Handshaking (greeting), transfer of messages, closure.

29
Q

Describe SMTP interaction

A

Command-response interaction (like HTTP, FTP), across a persistent connection, with direct transfer from sending server to receiving server, where messages must be in 7-bit ASCII

30
Q

What are some other mail access protocols?

A

POP: Post Office Protocol (ft. authorisation, download)
IMAP: Internet Mail Access Protocol (ft. authorisation, download, manipulation of stored messages on server)
HTTP (used for gmail, Hotmail, Yahoo! etc.)

31
Q

How does POP3 differ to SMTP?

A

Messages are copied on different clients and the protocol remains stateless across sessions.

32
Q

How does IMAP differ to POP3?

A

Keeps all messages on the server, allows user to organise messages in folders and keeps user state across sessions

33
Q

What is DNS (Domain Name System)?

A

A distributed database, implemented in hierarchy of many name servers, which resolves names by translating a host name into its IP address

34
Q

What are some disadvantages of centralising DNS (making it non-distributed)?

A

Single point of failure, traffic volume, distant centralised database, maintenance

35
Q

What domains fall under TLD (top-level domain)?

A

.com, .net, .org, .edu, .aero, jobs, museums, top-level country domains (.uk, .fr, .ca, etc.)

36
Q

What is an authoritative DNS server?

A

Organisation’s own DNS server, providing authoritative hostname to IP mappings for organisation’s named hosts

37
Q

What is a local DNS name server?

A

The first point of contact when host makes a DNS query. Owned by residential/company/university ISP, has local cache of recent name-to-address translation pairs, acts as proxy, forwards queries into hierarchy (though isn’t necessary part of the hierarchy)

38
Q

What is the file distribution equation?

A

The time taken to distribute F to N clients

39
Q

Apply the file distribution equation to a client-server approach

A

DC-S > max{NF/us, F/dmin}
where F = file size, us = server upload capacity, NF/us = time to send N copies, dmin = minimum client download rate, and F/dmin = minimum client download time.

40
Q

Apply the file distribution equation to a peer-to-peer approach

A

DP2P > max{F/us, F/dmin, NF/(us + ui)
where F = file size, N = number of peers, us = server upload capacity, di = peer i download capacity, ui = peer I upload capacity, F/us = time to send 1 copy, dmin = minimum client download rate, F/dmin = minimum client download time, us + ui = max P2P upload rate