Application Layer Flashcards
What are the attributes of the client server model?
Server: Always on host, handles requests and has a permanent address.
Clients: Communicate with the server and intermittently connect. Have dynamic IPs and don’t with one another directly
What are the attributes of Peer-to-peer networks?
No always-on server.
End systems directly communicate and request/give services from/to peers
Peers intermittently connect and change IP
What are the advantages of peer-to-peer networks?
Self scalability as each node must give resources to get resources
Can circumvent barriers such as laws on distribution of data, disaster scenarios.
Resilient.
How do sockets work?
Client creates and binds a socket in a process
Client initiates communication and server identifies process sending to by responding to socket.
Messages received are passed to the correct process by via the binding of port/process by OS.
IP + Port = addressable socket.
What are the main attributes of HTTP
Allows for the request of objects via urls.
Client sends requests and server responds with objects
Uses TCP, client creates socket to server. TCP connection goes until objects transmitted and then is closed.
Stateless
What is the difference between persistent and non-persistent HTTP?
Persistent: Multiple objects are sent over TCP connection before it is closed, removing RTT of TCP packets
Non-persistent: At most one object sent over TCP connection, need to create new TCP connection for every object.
What are the HTTP methods?
Post: Send form data to URL
GET: request objects from url
Conditional GET: Send the data iff the data in cache isn’t up to date.
Head: Get header but no payload.
Put: Upload file in entity body to path specified in URL
Delete: Delete file @ url
Response codes appear in the first server to client transmission, list them.
200: Ok
301: Moved permanently
400: Bad request
404: Not found
505: HTTP version not supported.
What are the five main components of a cookie?
Header line of HTTP response message
Cookie header line in next HTTP request message
Cookie file kept on user’s host and is managed by the browser
Back end database at web site to correlate cookie’s with user details
State maintained at user side over mutliple sessions
What can cookies be used for?
Authorisation
Shopping carts
Recommendations
User session state (email over multiple pages etc..)
What is a Proxy?
A proxy is a web cache that deals with client requests without contacting origin server of content.
Browser set to web accesses via cache, browser then sends all requests to the proxy.
How do proxies benefit networks?
If data in proxy, sent to satisfy request. Else it’s requested from origin server and returned
Reduces traffic on access link as only cache requests from origin servers and cached data is sent.
Reduced response time, content closer to user.
What are the three major components of email?
User agents
Mail servers
SMTP
What is a user agent?
Mail reader, such as outlook, that can be used by the user to send and retrieve emails via the mail server.
What is a mail server?
Mailbox containing incoming messages for the user, and has a queue of outgoing messages
Can have mail-server to mail-server communication via SMTP
What is SMTP?
Simple Mail Transfer Protocol,
uses TCP for reliability.
Three phases of transfer:
Handshaking
Transfer of message
Closure
Command/Response interactions
Users persistent connections.
Must be in 7-bit ASCII
What are the differences between SMTP and HTTP
SMTP: Push, HTTP: Pull
HTTP: Each object encapsulated in its own response message, SMTP: send multiple objects in multipart message
Why create a network app?
Programs running on different end systems should be able to
Communicate over a network
Can propagate data if we can connect multiple hosts, allowing for rapid development.
What does the app layer protocol define?
Type of message exchanged
Request/Response
Message syntax, what fields are in messages and their lengths
Message semantics
Rules for when and how processes send and respond to messages
How do we decide on what Transport protocol to use when designing an application protocol?
Integrity
- Does loss affect the app?
Timing
- How much delay is tolerated?
Throughput
- Minimum amount of throughput required to be effective
Security
- Encryption, data integrity
What’s the structure of a http packet?
method, URL, version, header lines in the form: header field name | | value | cr | lf entity body
What other mail access protocols are used?
POP
IMAP
HTTP