이원자 탄소 2022. 3. 9. 13:08
728x90

Client-server architecture

  • World Wide Web (WWW) uses the client-server architecture
    • Clients obtain service from a centralized server
    • Server waits for client requests and make response

The OSI network model

  • communication between clients and servers can be seen in multiple layers
    • Abstraction è reducing complexity of problems to smaller ones
    • Division of labour

THE OSI NETWORK MODEL

 

Communication protocols

  • Clear definition of steps is needed for two computers to communicate
    • rules
    • syntax
    • semantics
    • synchronization of communication
    • error recovery methods
  • There are protocols for every layer in the networking model
  • The internet engineering Task force (IETF) develops and promotes voluntary internet standards

MAC and IP addresses

  • Mac address (layer2): locating a piece of communication device on a local network
  • IP address(layer3): identifying a network interface in networks
    • IPv4 (32-bit) vs IPv6 (128-bit)
    • Public addresses vs private addresses
      • Private addresses limit datagrams to be sent within local network only
      • e.g., 192.168.1.123 is only meaningful within a local network
  • The ARP table on a device maintains the correspondence between MAC addresses and IP addresses within a local network

TCP VS UDP

  • Layer 4 protocols: ensuring reliability of data transmission
  • Transmission control protocols (TCP)
    • Handshakes to establish a connection
    • Built in system to check for errors
    • Guarantee for data order and completeness
    • Good for HTTPSs, HTTP etc. 
  • User Datagram Protocols (UDP_
    • connectionless -> reducing the overhead of computation (time)
    • Extensive error checking and recovery not required
    • Good for: video conferencing, media streaming etc

Communicating over ports 

  • In networking, connections are made on ports of a network device
  • Each port is "listen to" served by one piece of software server
  • Well known ports: 0-1023 (Http:80, Https:443)
  • Registered ports: 1024-49151
  • Private ports:49152-65535

Socket

  • In network programming, a network socket is an endpoint for communication
  • socket=transport protocol+IP address+port number
  • Implementation depends on the programming language/environment

Localhost

  • It is also possible to have both ends of communication only on one computer
    • Although it is in the same computer, this way allows communication to still go through network layers in the OS
  • Usually identified in the computer as "localhost" or 127.0.0.1

Hypertext transfer protocol

  • HTTP - hypertext transfer protocol
  • Communication is initiated by a client 
    • a client sends a HTTP request to a server
    • the server returns a HTTP response to the client 
  • It is stateless
    • every request is treated as an independent request
    • the protocol itself does not offer any means to relate two separate request
  • HTTP/1.1 — 1997, HTTP/2 — 2015, HTTP/3 — expired draft (2020)

 

HTTP clients 

  • Web client (“user-agent”): a software communicating with the web server over HTTP or HTTPS
    • web browsers: for end-user experience
      • html/css rendering
      • js execution
      • web technologies
    • web crawlers/ search engines
    • programmatic interfaces

HTTP servers

  • Web server: handling requests for web documents with http/https, supporting server-side scripts
    • apache (was still the first last yr!)
    • nginx
    • Microsoft ISS
    • node.js
  • Web caching
    • forward/reverse proxies
    • Content delivery networks(CDN)

 

728x90