lectures.alex.balgavy.eu

Lecture notes from university.
git clone git://git.alex.balgavy.eu/lectures.alex.balgavy.eu.git
Log | Files | Refs | Submodules

Application.md (3347B)


      1 +++
      2 title = "Application"
      3 +++
      4 
      5 # Application
      6 DNS — Domain Name System
      7 
      8 - high-level names
      9 - namespace, hierarchical addressing
     10 - managed by ICANN
     11 - top-level domains (com, edu, me, ch, etc.) with subdomains
     12 - query name servers to translate name address to IP address
     13 - domains have associated DNS database resource records
     14 - example with recursive and iterative queries:
     15 
     16     1. A asks for rooster.vu.nl
     17     2. Machine queries local name server, which does recursive query
     18 
     19         1. Query root name server for rooster.vu.nl, replies with address of .nl name server
     20 
     21         2. Query .nl name server for rooster.vu.nl, replies with address of vu.nl name server
     22 
     23         3. Query vu.nl name server for rooster.vu.nl, replies with IP address of rooster.vu.nl
     24 
     25     3. Return IP address to browser
     26 
     27 DHCP
     28 
     29 - MAC addresses are built into NICs, but not IP addresses
     30 - a machine sends DHCP DISCOVER to DHCP server asking for an IP, the server replies with a DHCP OFFER and an available address
     31 
     32 Email (SMTP protocol)
     33 
     34 - message contains
     35     - envelope: transport info, priority, security level, and more. encapsulates whole message, get it to correct recipient
     36     - header: control info for user agents
     37     - body: for human recipient
     38 - message formats
     39     - RFC 5322: basic ASCII messages
     40     - MIME (extensions)
     41         - adds content type and other headers to allow stuff other than plaintext
     42         - e.g. text/html, application/javascript, multipart
     43         - to encode binary into ASCII (only thing supported by mail servers), use base64 encoding
     44         - lmao this design, it’s like you add more duct tape to attach new features
     45 - message transfer
     46     - mail submission uses SMTP with AUTH extension
     47     - message transfer between mail transfer agents uses SMTP, only one hop
     48         - message transfer agent queries name server for IP of second message transfer agent
     49         - then sends to that IP address using SMTP
     50     - final delivery with IMAP or POP3
     51         - POP3 — mail is downloaded, also not as secure
     52         - IMAP — mail remains on the server, large improvements over POP3
     53 
     54 Worldwide Web (HTTP protocol)
     55 
     56 - uses persistent connection with multiple HTTP requests over same TCP connection
     57 - does not use IP addresses with ports, but URLs
     58 - also uses MIME types (parses text/html, sends other MIME types to a specific app or plugin)
     59 
     60 CDNs (Content Delivery Networks)
     61 
     62 - a type of caching to increase system
     63 
     64 Peer-to-peer
     65 
     66 - users create own infrastructure by connecting to each other
     67 - BitTorrent is very popular example — get torrent file, get peers from tracker, then trade chunks with peers
     68 - distributed hash tables
     69     - can decentralise the tracker part of BitTorrent, with a small amount of info to store per node
     70     - example — Chord
     71         - ring of 2m places
     72         - every place can hold a user
     73         - compute your location in ring using hash(IP)
     74         - peers for torrent t are stored at user successor(hash(t))
     75 
     76 Streaming (audio/video)
     77 
     78 - analog-to-digital converter produces digital audio from analog signal by sampling
     79 - digital audio compression can be lossy or lossless
     80 - digital video compression — e.g. JPEG changes RGB to YCbCr (Y is luminance, CbCr are chrominances), MPEG compresses over a sequence of frames with Image and Predictive/Bidirectional frames
     81 - and a lot of extra stuff