Chapter 2: Application layer Flashcards
How do you create a network application?
Write programs/software that will run on different/multiple end systems and communicate over networks.
Describe the server side in a client-server architecture
Always-on host. Permanent and fixed IP address
Describe the client side in a client-server architecture
Contact & communicate with servers. May be intermittently connected. May have dynamic IP addresses.
Do clients communicate directly with each other?
No!
Describe the Peer-to-Peer (P2P) architecture
No always-on server. End systems communicate directly. Peers are intermittently connected and change IP addresses. Have self-scalability.
Self-scalability
New peers bring new service capacity, as well as new service demands
Process
Program running within a host / end system
How do processes in different hosts communicate?
By exchanging messages
Describe client and server processes
Client processes initiate communication. Server processes wait to be contacted.
What is unique about the processes in P2P architectures?
They can be both client and server processes
What do we call the interface between the process and the computer network?
The socket / Application programming interface (API)
How does a socket work (use the door analogy)?
The sending process (NOT the socket) pushes the message out the door.
It relies on the transport infrastructure (like TCP/IP) on the other side of the door to deliver the message to the receiving process’s socket.
Two sockets are involved in the communication: one on the sending side and one on the receiving side. Both acting as endpoints.
Why do we need sockets?
They provide a standardized way for processes to send and receive data over a network.
How do we adress processes?
By using an identifier including both IP address and port numbers associated with the process on the host
What transport services are available to applications?
Reliable data transfer, timing, throughput and security
Transmission Control Protocol (TCP) service
Reliable data transfer service that is connection-oriented; has the client and server exchange transport-layer control information with each other before the application-level messages begin to flow. Provides flow and congestion control
Flow control
Sender won’t overwhelm receiver
Congestion control
Throttle sending process when network overloaded between sender and receiver
User Datagram Protocol service (UDP)
Unreliable data transfer service that circumvent’s TCP’s congestion control mechanisms and packet overheads
What does an application layer protocol define?
How an application’s processes, running on different end systems, communicate with each other
What are the 4 things that the application-layer protocol defines?
- Types of messages exchanged
- Message syntax
- Message semantics
- Rules for when and how processes send & respond to messages
Message syntax
What fields in messages and how fields are delineated
Message semantics
Meaning of information in fields
How do we secure TCP?
By implementing a Transport Layer Security (TLS) socket / API in the application layer that provides encrypted TCP connections
What do Web pages consist of?
Objects and a base HTML-file including several referenced objects, each addressable by a URL
What is the HyperText Transfer Protocol (HTTP)?
The Web’s application layer protocol. Uses a client-server architecture.
What transport protocol does HTTP use?
TCP (Tranmission Control Protocol)
What does it mean that HTTP is a stateless protocol?
That the server maintains no information about past client requests
Describe a non-persistent HTTP connection
TCP connection is opened, then closed when the TCP is certain that the client has received the response message intact. At most one object can be sent over TCP connection.
Describe a persistent HTTP connection
TCP connection is opened, then closed. Multiple objects can be sendt over a single TCP connection (pipelining)
What is the response time for a non-persistent HTTP connection?
2RTT + file transmission time
Round-Trip Time (RTT)
Time for a small packet to travel from client to server and back to the client.
Describe HTTP1.1
Persistent HTTP where:
Server leaves connection open after sending response
Subsequent HTTP messages sent over open connection
Client sends requests as soon as it encounters a referenced object
What are the two types of HTTP messages?
Request and response.
What are the types of HTTP request messages:
POST, GET, HEAD, PUT and DELETE
POST method
Sends user input from client to server in entity body of the request message
GET method
Sends user input in URL field of request message
HEAD method
Requests headers that would be returned if specified URL is requested with a HTTP GET method
PUT method
Completely replaces file that exists at a specified URL with content in entity body of POST HTTP request message
DELETE method
Allows a user / application to delete an object on a web server
How do we maintain user/server state?
Web sites and client browsers use cookies to maintain state between transactions
A stateful protocol
Client makes two changes to X, or none at all. If the network connection / client crashes in the middle of the changes the state oriented object is locked, unless handled by protocol.
Are HTTP requests dependent or independent of each other?
Independent
What are the four components of cookie techology?
- Cookie header line in the HTTP response message
- Cookie header line in the next HTTP request message
- Cookie file kept on users host / end system, managed by user’s browser
- Back end database at Web site
How is state kept by using cookies?
With protocol endpoints and with cookies; HTTP messages carry state