Web Technology Flashcards Preview

General > Web Technology > Flashcards

Flashcards in Web Technology Deck (44):
1

internet

  • physical connect of all the computers that are joined together across the world

2

world wide web

  • the web pages (html pages) stored and shared on the internet
  • just one type of data on the internet
  • distinct from emails, instant message, ftp, etc.

3

buffer

  • temporary holding place for data
  • data is usually being moved from one place to another
  • intentionally limited in size

4

URL

  • naming scheme for web addresses

8 parts

  1. protocol/schema
  2. subdomain
  3. domain name
  4. top-level domain
  5. port
  6. path
  7. query
  8. fragment/anchor

5

doctype

  • a tag added to the top of an HTML document
  • is not itself html, but instruction to browser
  • used to indicate which version of HTML is being used
  • HTML 5:

6

stream

  • pieces of data are delivered over time
  • together, they comprise one item
    • ex: video

7

pipe

  • mechanism for sending data from one stream to another

8

environment variables

  • global variables specific to the environment (server) where code resides
  • different servers have different environment variables based on their settings

9

serialize

  • convert an object into a structured text format
  • this format can be sorted in a file or transferred across the internet
  • ex: converting to JSON, csv, XML, etc.

10

character set

  • a mapping of characters to numbers
  • ex: ascii

11

code point

  • the number used to represent a letter in a particular character set

12

character encoding

  • the number of bits used to represent a code point in a character set
  • ex: UTF-8 uses 8 bits to represent unicode

13

tcp/ip

  • also know as internet protocol suite
  • term for common protocols used in internet communcation
  • tcp/ip often groups together because they are so interconnected
  • routable protocol

4 Layers

[4] Application

  • defines how information is structured
  • http/ftp/smtp

[3] Transport

  • oversees the connection
  • tcp/udp

[2] Internet

  • responsible for addressing, packaging and routing
  • IP (et al.)

[1] Network Access Layer

  • hardware
  • ethernet, wifi, etc.

14

ip (address)

  • internet protocol
  • protocol defining how computers are named on the internet
  • ip addresses
    • store information about the address of the device itself, and the subnet it belongs to

15

private ip address

  • internal private address defined within a private network
  • home or business generally shares one public ip address
  • within the network, each device receives a private ip address
  • there are ranges of IP addresses designated for private IPs (192.168.X.Y)
  • these are never given out on the public internet

16

sockets

  • an endpoint in a two-way connection between two computers on a  network
  • pairing of a specific IP and port

17

routable/non-routable protocol

  • routable protocol
    • network protocol in which data can be passed between subnetworks (thorugh a router)
    • allows a newtork can be divided in multiple subnetworks
  • non-routable protocol
    • data cannot pass through a router
    • data can only be shared within a subnet

18

transport protocols

  • tcp/udp
  • protocol that defines how information is sent over the internet (how computers communicate)
  • distinct from http, ftp etc, which defines how the information is structured
  • operating systems have the ability to use tcp/udp
  • protocols also allow one computer to forge mutliple connections (using separate ports)

Works by:

  • spliting information into pieces (packets)
  • sending individual packets between computers

19

TCP

  • Transmission Control Protocol
  • the preeminent transport protocol for the internet
  • connection based (requires connection to be established before data can be sent)
    • 3-way handshake
    • allows for delivery acknowledgement
  • tcp will arrange packets in order (packets are numbered)
  • provides error detection
  • bigger overhead than udp
  • resends data when package goes missing
  • provides congestion-control
    • delay transmission of data when network is congested
    • but this might be a problem for real-time communication as tcp might delay transmission intentionally
  • use when
    • data loss can't be tolerated
    • data needs to be inorder
    • require delivery acknowledgements

20

UDP

  • User Datagram Protocol
  • a transport layer protocol, similar to TCP
  • lightweight, but less reliable
  • has smaller packet size
  • connectionless (don't have to create a connection first)
  • does not arrange packets in order
  • has error-detection, but does not try to recover when error occurs
  • no compensation for lost packages
  • use when:
    • some loss can be tolerated
    • ex: video conferencing
    • also, local networks (less risky)

21

HTTP

  • hypertext transfer protocol
  • protocol for structuring data 
  • stateless, every request is indepdent of previous requests
  • aquire state through sessions/cookies

Consists of:

  1. Request line/Status line
    • GET file_name HTTP/version
  2. Headers
    • name/value pairs
  3. [space]
  4. Body (html, image, file, css, JSON)

22

HTTP persistence

  • also called HTTP keep-alive, or HTTP connection reuse
  • when a single TCP connection is kept open, and used for multiple requests/responses
  • as opposed to creating a new connection every time a new request is made
  • often used in conjunction wtih pipelining
  • persistent connections + pipelining is defult in HTTP 1.1

23

HTTP pipelining

  • when multiple HTTP requests are sent via the same connection, at the same time, without waiting for responses
  • especially useful for high latency connections (like satellite internet)
  • often used in conjunction with HTTP persistence
  • persistent connections + pipelining is defult in HTTP 1.1

24

MIME Type

  • Multipurpose Internet Mail Extensions
  • standard for specifying type of data being sent
  • originally for specifycing kind of attachment in email
  • included in an http request via the 'Content-Type' header
  • Examples:
    • applicaiton/json
    • text/html
    • image/jpeg

25

port

  • when computer receives a packet, port indicates which application a computer should send a packet to
  • Can assign an application to any port we want
  • ex:
    • http requests use port 80
    • https uses port 443

26

port forwarding

  • configuring a router in order to make a computer in the subnet accessible to from the internet
  • port forwarding redirects traffic requests through admissable ports to a specific computer in local network
  • ex: router will forward incoming traffic on port 80 to a specific server/computer
  • useful to circumvent default gateways that set up firewalls on incoming connections

27

dhcp

  • Dynamic Host Configuration Protocol
  • dynamically assigns basic network information to each computer in subnet
    • assigns ip address
    • assigns subnet mask
    • assign default gateway
    • assign DNS servers
  • usually built into small home/business router
  • keeps track of which computer has which IP address
  • gives each comptuer a lease time
    • lease on how long computer is allowed to "own" IP address

28

NAT

  • Network Address Translation
  • remaps private IPs in a subnet to the public IP of the default gateway while packet in en route
  • when information arrives from outside to default gateway, NAT knows which internal client to send response to
  • removes the need for every device to need a unique IP

29

visiting a website

12 Steps

  1. Type in domain name
  2. Browser does domain name lookup using DNS resolution
  3. Browser translates human-readable name into an IP
  4. Client creates a connection to server using 3-way handshake
  5. Send HTTP request with a command (get this file) in the form of packets (virtual envelope)
    1. To: destination IP address
    2. From: sender's IP address
  6. Computer sends packet to default gateway, then it starts travelling from router to router
    • Might go through as many as 30 routers
  7. Google get envelope
  8. Sees message, and looks for requested file (index.html/index.php)
  9. Makes a new envelope with file, flips to/from
  10. Client gets envelope with HTML/CSS/JS
  11. Browser interprets it

 

 

 

 

 

    1. Large institution and ISP have DNS servers
      • Harvard does
      • Optimum does
    2. If institution (small college campus) doesn't have address in DNS server
    3. Hierarchy of DNS system
      1. From local DNS server, maybe on a campus
      2. To an ISP
    4. If no one in hierarchy of DNS knows, there are route servers
    5. Route servers are distributed across continents
      1. They know who to ask
  1. Once computer figures out where to send request, it constructs HTTP message
  2.  

 

    1. ISP has default gateway (aka router)
      1. Routers know how to get from A-B, or know who to send it to next
      2.  
  1. Looks in internal network for IP address
  2. Gives request to default gateway, which sends it on its way
  3.  

 

Sends packets in groups

Groups get progressively larger

30

3-way handshake

  • method used in TCP/IP to create a connection between a client/host and a server

3 steps

  1. The client requests a connection by sending a SYN (synchronize) message to the server
  2. The server acknowledges this request by sending SYN-ACK (acknowledge) back to the client
  3. The client responds with an ACK, and the connection is established

31

root servers

  • authoritative servers administered by IANA (Internet Assigned Numbers Authority)
  • hold dns information about top-level domains (.com, .org, .uk)

32

dns

  • Domain Name System/Servers
  • system that maps domain names to ip addresses
  • configured within computer, a router, and on ISP servers
  • when website is visited, IP is usually cached locally DNS caches IP
  • if website IP isn't cached upon request, resolves IP using DNS resolution

33

dns resolution/hierarchy

  • process by which DNS is resolved

Steps

  1. Computer checks hosts file and browser's DNS cache
  2. Then request is sent to default gateway, which checks its cache
  3. Then request is sent to dns resolver, usually ISP; also checks its cache
  4. Resolver sends request to root DNS server, who responds to resolver with IP of top-level DNS server
  5. Resolver sends request to top-level DNS server, which responds to resolver with IP of nameservers for the particular website
  6. Resolver sends request to nameserver, which response with IP for the particular website
  7. Resolver sends response to client

34

router

  • a network device that connects subnetworks to other subnetworks

35

default gatway

  • router that connects your subnetwork to the larger internet

36

subnet mask

  • number that tells you what part of ip address is network identifier, and which part is device identifier
  • a bitmask where 1s indicate parts of IP corresponding to network, and 0s indicate part corresponding to device
  • when mask is applied to IP address using bitwise AND, return the routing prefix

37

hub

  • network device that connects mutliple computers
  • replicates all incoming bits of data for each interface indiscriminately
  • wasteful with bandwidth
  • individual client will ignore packet if it's not addressed to it

38

switch

  • a network device that distributes data to different computers within the same subnet
  • like hub, but sends data directly to right computer
  • home routers usually have built in switches

39

OSI model

  • Open Systems Interconnection model
  • standardizes communication between networks
  • just a model that describes how networks should work
  • ordered by levels of abstraction
  • (from bottom) Please Do Not Take Salami Pizza Away

7 Layers

  1. Physical
    • Hardware, all the physical stuff (cables, etc.)
  2. Data link
    • Layer where packets are encoded/decoded into bits
  3. Network
    • Handles routing
    • Determines if packet has arrived, or sends it to next router
    • IP
  4. Transport
    • Evaluates incoming/outgoing data
    • Ex: request timing, delivery acknowledgements, error-checking etc.
    • TCP/UDP
  5. Session
    • Manages connection between client and server
  6. Presentation
    • Layer where operating system is on
    • Converts data from application to network format
    • May configure data (compress, encrypt)
  7. Application
    • Layer that user is actually interacting with
    • Email, Chrome, Network printers, etc.

40

idempotent

  • an operation, the result of which doesn't change by doing it mutliple times
  • especially in the context of HTTP methods
  • ex: absolute value, GET, PUT, DELETE, but not POST

41

cookie

  • small piece of data associated with a particular website stored in the browser
  • used to remember stateful data and record browsing behavior
  • a single key, value pair, but you can fudge it by putting more data in the value
  • must be <4KB, (in practice, much smaller)
  • browers imposes limit of 20 cookies per website
  • a single cookie is only linked to 1 domain
  • accessible from any window
  • works with older browsers (HTML4)
  • cookie is stored on browser and server
  • cookie information is sent to server with every request
  • delete by setting to a past date
  • use cases:
    • authentication
    • other information that both browser and server need

Steps

  1. User visits website
  2. Server sends back data and cookie
  3. Client stores cookie
  4. Next time, client requests data with cookie

42

localstorage

  • special storage object built into window
  • used, like cookies, to track state
  • has higher capacity than cookies (10mb)
  • consists of key, value pairs
  • only works with HTML5
  • never expires, but can removed by client
  • only stored in browser, not on server
  • useful for storing larger amounts of data on client side

43

sessionstorage

  • special storage objet buil into window
  • has higher capacity than cookies (5mb)
  • very similar to local storage, except that it’s tied to the tab
  • consists of key, value pairs
  • only works with HTML5
  • only accessible from tab of creation
  • expires on tab close
  • only stored in browser

44

user agent

  • a string that gets passed along to a website via an HTTP header
  • used to optimize experience for the user
  • consists of
    • browser/version
    • device details
    • operating system
    • platform used by browser