application layer Flashcards

1
Q

Examples of network applications

A
  • e-mail
  • web navigation
  • text messaging
  • remote login
  • P2P file sharing
  • multi-user gaming
  • video streaming
  • voice over IP
  • video conferencing
  • social networking
  • dating apps
  • weather forecasting
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to create a network app?

A
  • write programs (C, Java, Python, …) that:
  • run on (different) end systems
  • communicate over network
  • No need to write software for network-core devices (network-core devices (routers, switches) do not run user applications).
  • application’s architecture (costomizable by app developer) is distinctly different from the network architecture (fixed for app developer)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

2 types of app

A
  • Client-server architecture:
    An always-on end device (server), which responds to the requests of other end devices (clients).
    Clients do not communicate between each other directly.
    a single server isn’t enough we use data centers ( = a virtual server composed of multiple physical servers)
  • Peer-to-peer (P2P) architecture:
    direct communication between pairs of intermittently connected hosts, called peers.
    peers are not owned by the service provider, but devices controlled by users.
    each peer adds service capacity to the system. (pro = scalability, con = security, performances and reliability)
  • hybrid architectures
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what is a process

A

a program that is running within an end system (an app consists of different processes)

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

how do processes communicate

A

exchanging messages across the network

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

process can be… (2 types)

A
  • process that initiates the communication = client
  • process that waits to be contacted to begin the session = server
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what is a socket

A
  • it’s a software interface through which a process sends messages into the network and receive them.
  • They are the interfaces between the application layer and the transport layer.
  • they are also referred to as the Application Programming Interface (API).
  • app developer can choose the transport layer protocol in the socket transport-layer side
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

how does a process willing to send packets to another process can identify it?

A
  • IP address (=address of the host)
  • destination port number
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

transport layer protocols

A
  • TCP (connection oriented, reliable, glow and congestion control, no guarantees on timing, throughput, security)
  • UDP (connectionless, unreliable, no guarantees on reliability, flow control, timing, throughput, security, connection setup)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what is a web page

A
  • consists of a main base HTML which includes several objects
  • objects = HTML file, jpeg, audio file, hyperlinks,…
  • each object is addressable by a URL ( = Uniform Resource Locator)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

application-layer protocol

A
  • HTTP = HyperText Transfer Protocol
  • it’s implemented in two programs: a client program and a server program.
  • defines how Web clients request Web pages from Web servers and how servers transfer Web pages to clients
  • uses TCP as its underlying transport protocol
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

different types of HTTp connections

A
  • persistent (Multiple objects can be sent over a single TCP connection)
  • non persistent (At most one object over a single TCP connection, multiple connections to download multiple objects)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

HTTP request

A
  • it’s ASCII encoded (human readable)
  • it’s a GETrequest
    composed of:
  • request line
  • header lines
  • blank line
  • entity body
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

HTTP statuse codes

A

1xx: information
2xx: success
3xx: redirection (correct request but redirected to another server)
4xx: client error (wrong request)
5xx: server error (internal server failures)

error 3 vuol dire che un sito ha cambiato server quindi io apro sito vecchio e
solitamente nell’entity body ho il link per il nuovo server

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

HTTP is stateless so how app can identify users

A

using cookies
- Cookie is a way to introduce user memory into a stateless protocol

cookies components:
(1) a cookie header line in the HTTP response message;
(2) a cookie header line in the HTTP request message;
(3) a cookie file kept on the user’s end system and
managed by the user’s browser;
(4) a back-end database at the Web site.

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

Web caches (= proxy servers)

A
  • used to satisfy client request without involving the origin server
  • Web cache has its own disk storage where it keeps copies of recently requested objects
  • is a smaller copy of the server located near the clients.
  • purchased and installed by an ISP
  • reduce the response time for a client request.
  • reduce traffic on an institution’s access link to the Internet.
  • reduce Web traffic in the Internet as a whole
  • Creation of a Content Distribution Network (CDN): installation of many geographically distributed caches throughout the Internet, thereby localizing much of the traffic
17
Q

how to solve out of date objects in proxy servers

A

Conditional GET mechanism
(introduce a file in the request message, if the mechanism detect that one content is not updated all the proxy’s have to request the updated content)

18
Q

email components

A
  1. user agents
  2. mail servers
  3. Simple Mail Transfer Protocol (SMTP)
19
Q

email user agent

A
  • Outlook, Thunderbird, Apple Mail, etc.
  • user agent sends the messages written by user to its mail server, where the message is placed in the mail server’s outgoing message queue.
  • When a user wants to read a message, its user agent retrieves the message from his
    mailbox in his mail server.
20
Q

mail server

A
  • Each recipient has a mailbox located in one of the mail server
  • mailbox manages and maintains the messages that have been sent to the user
  • Mail servers notify a user in case of failures in sending (“the email address does not exist”)
21
Q

mail protocol

A
  • SMTP = Simple Mail Transfer Protocol
  • uses TCP to transfer mail from the sender’s mail server to the recipient’s mail server.
  • it has a client and a server side respectively to send and receive emails
  • maily a push protocol
    usually to access received emails we use a pull protocol: POP3, IMAP, HTTP
22
Q

IMAP and POP3 differences

A

troppe, no sbatti

23
Q

Domain Name Systems (DNS)

A
  • used to convert Hostnames (e.g., www.facebook.com, www.google.com) into IP addresses
  • it’s a distributed database implemented in a hierarchy of DNS servers
  • it’s a application-layer protocol that allows hosts to query the distributed database.
  • runs over UDP
  • employed by other application-layer protocols (including HTTP and SMTP)
  • adds an additional delay to the Internet applications that use it
    Additional services:
  • host aliasing
  • mail server aliasing
  • load distribution (to distribute traffic over replicated web servers)

we also have:
- local DNS
- DNS caching

24
Q

video streaming

A
  • A video is a sequence of images being displayed at a constant rate
  • Each image is an array of pixels, with each pixel encoded into a number of bits to represent luminance and color.
  • videos can be compressed
  • Coding: use redundancy within and between images to decrease # bits used to encode image spatial (spatial or temporal coding)
  • Same video, multiple versions through compressions.Users can then decide which version they want to watch according to their bandwidth
  • On the client side, the bytes are collected in an application buffer. Once the number of bytes in this buffer exceeds a predetermined threshold, the client application begins playback
  • challenging due to network variable delays and client interactivity
25
Q

what is DASH

A
  • DASH = Dynamic Adaptive Streaming over HTTP
  • video is encoded into several different versions, each with a different bit rate and,
    correspondingly, a different quality level
  • client dynamically requests chunks of video segments of a few seconds in length depending on the available bandwidth
    -client determines when to request chunk and what encoding rate to reques
26
Q

Content Distribution Networks (CDNs)

A

to stream content to hundreds of
thousands of simultaneous users we need to Store multiple copies of videos at multiple geographically distributed sites (CDN).

A CDN:
* manages servers in multiple geographically distributed locations,
* stores copies of the videos in its servers,
* direct each user request to a CDN location that will provide the best user experience

example:
netflix uses Amazon servers in the Amazon cloud.
Amazon cloud sends all the different copies of most popular Netflix videos to the CDNs to reduce the delay when I want to watch a video