Misc Flashcards

Miscellaneous topics on web technologies

1
Q

What is a Stateless Protocol?

A
  • a communications protocol in which no information is retained by either sender or receiver
    • meaning that each is unaware of the state of the other
    • the sender transmits a packet to the receiver and does not expect an acknowledgment of receipt
    • e.g. a UDP connectionless session is a stateless connection because the system doesn’t maintain information about the session during its life
  • a stateless protocol does not require the server to retain session information or status about each communicating partner for the duration of multiple requests
  • in contrast, a protocol that requires keeping of the internal state on the server is known as a stateful protocol
    • thus, a TCP connection-oriented session is a ‘stateful’ connection because both systems maintain information about the session itself during its life
  • examples of stateless protocols include the Internet Protocol (IP), which is the foundation for the Internet, and the Hypertext Transfer Protocol (HTTP), which is the foundation of data communication for the World Wide Web
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Media Types

A
  • the Accept and Content-Type HTTP headers can be used to describe the content being sent or requested within an HTTP request
  • the client may set Accept to application/json if it is requesting a response in JSON
  • conversely, when sending data, setting the Content-Type to application/xml tells the client that the data being sent in the request is XML
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does idempotent in the context of REST mean?

A
  • clients can make that same call/ operation repeatedly while producing the same result
    • in other words, making multiple identical requests has the same effect as making a single request
    • note that while idempotent operations produce the same result on the server (no side effects), the response itself may not be the same (e.g. a resource’s state may change between requests)
  • PUT and DELETE methods are defined to be idempotent
    • there is a caveat on DELETE: The problem with DELETE, which if successful would normally return a 200 (OK) or 204 (No Content), will often return a 404 (Not Found) on subsequent calls, unless the service is configured to “mark” resources for deletion without actually deleting themh
    • owever, the state on the server is the same after each DELETE call, but the response is different.
  • GET, HEAD, OPTIONS and TRACE methods are defined as safe, meaning they are only intended for retrieving data
  • this makes them idempotent as well since multiple, identical requests will behave the same
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

State what is meant by the term ‘layering protocols’

A
  • Dividing the complex task of networking into smaller, simpler tasks
  • The hardware and/or software for each layer has a defined responsibility.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Explain how packet switching works, stating the names of the protocols used

A
  • TCP splits the data into packets
  • IP routes the packets between routers from source to destination
  • Each packet can take a different route
  • TCP sequences the packets when they arrive at their destination
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the TCP/IP stack?

A
  • A suite of protocols that describes how data is sent over a network
  • Not just a model
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Four layers of the TCP/IP stack?

A

— Application

  • communication and reception of data, makes sure data in correct format

— Transport

  • responsible for providing constant flow

— Network (Access Layer)

  • provides links to transmit datagrams across different networks
  • In TCP/ IP Stack, the Network Access Layer can encompass the functions of all three lower layers of the OSI reference Model (Network, Data Link, and Physical)

— Link

  • Passing Datagrams to local and physical network
  • Allows network hardware Independence therefore allowing it to operate over any transmission medium such as copper wire, optical fibre etc.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Describe the 7 layers of the OSI

A

— Application

  • Network aware applications. what the user interacts with (email, web browsing etc)

— Presentation

  • converts data between formats required for different applications + transmission over network
  • Eg: Compression, encryption and translation

— Session

  • Controls communication between connected devices
  • Starts connections, manages them and terminates them
  • User login rights, file/folder perms

— Transport

  • Guarantees end to end delivery of data. Make sure data is present and that it gets to destination

— Network

  • Transmits and routes data via shortest possible path across network. Shortest time not distance

— Data Link

  • decides whose turn it is to send/receive data

— Physical

  • Physical properties of network (cable, bit encoding, transfer rates etc)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the OSI and why was it created?

A
  • Open Systems Interconnection evolved to create a standard of communication between different device types
  • Describes protocols that allow devices with different architectures to be linked together so that they can share data and communicate with each other
  • just a model
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does PDU mean?

A

— Protocol Data Unit

  • Term used to describe data on any given layer of the stack

— Application => Data
— Transport => Segment/Datagram
— Internet => Datagram
— Network access layer => Frame/ Bits

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

How do each of the four (TCP) layers identify the source and destination address of data?

A

— Application

  • just data no addressing needed

— Transport

  • Data broken into segments that use ports to identify services

— Internet

  • Devices have a unique IP address, IP datagrams use the IP address to reach correct destination

— Link

  • Ethernet splits packets into frames
  • Frames use MAC address of device to reach it
How well did you know this?
1
Not at all
2
3
4
5
Perfectly