TECHNOLOGY 

Published on
KembaraXtra -Computer Science -World Wide Web
Core Attributes
Distributed
  • Definition: No central authority controls web content.
  • Implications:
    • Anyone can host a web server and publish content.
    • Organizations/countries can block access.
    • Governments can shut down illegal content.
  • Key Point: The web is open and not centrally controlled.
Addressable
  • Definition: Every web resource has a unique address (URL).
  • URL Components:
    • Scheme: Protocol (e.g., HTTP, HTTPS).
    • Authority:
      • Hostname (e.g., travel.example.com).
      • Optional: Username, Port Number.
    • Path: Location of resource on server (like a file system path).
    • Query: Modifies the resource returned (format varies by site).
  • Relative URLs:
    • Omit scheme, hostname, or full path.
    • Interpreted relative to the current context.
  • Practical URL Reading Example:
http://travel.example.com/destinations/carolinas?location=beach
  • Uses HTTP protocol.
  • Server: travel.example.com.
  • Path: /destinations/carolinas.
  • Query: location=beach (shows beach locations).
Linked
  • Definition: Web resources reference each other via hyperlinks.
  • Hyperlinks: One-way references, no permission needed.
  • Hypertext: Documents connected by hyperlinks.
Protocols of the Web
HTTP (HyperText Transfer Protocol)
  • Purpose: Transferring web resources (reading, creating, updating, deleting).
  • Foundation: Based on TCP/IP for reliable data transfer and addressing.
  • Model: Request and response.
    • Client sends an HTTP request.
    • Server replies with an HTTP response.
HTTP Methods (Verbs)
  • GET: Retrieve a resource (no modification).
  • PUT: Create/modify a resource at a specific URL.
  • POST: Create a new resource as a child of an existing URL.
  • DELETE: Remove a resource.
  • Usage:
    • GET is most common (used for browsing and loading resources).
    • Servers often restrict PUT, POST, DELETE.
HTTP Status Codes
  • Format: 3-digit number.
  • Classes:
    • 100s: Informational.
    • 200s: Success.
    • 300s: Redirection.
    • 400s: Client error.
    • 500s: Server error.
  • Examples:
    • 200 OK: Success.
    • 301 Moved Permanently: Redirect to a new URL.
    • 401 Unauthorized: Authentication required.
    • 403 Forbidden: Access denied.
    • 404 Not Found: Resource not found.
    • 500 Internal Server Error: Server-side error.
HTTP Message Format
  • Request:
    • First line: Method URL HTTP/Version (e.g., GET /documents/hello.txt HTTP/1.1).
    • Headers: Additional information.
    • Optional message body.
  • Response:
    • First line: HTTP/Version Status Code Response Phrase (e.g., HTTP/1.1 200 OK).
    • Headers.
    • Optional message body.
HTTPS (HyperText Transfer Protocol Secure)
  • Purpose: Encrypt data transmitted over the internet.
  • Encryption: Encoding data to be unreadable without decryption.
  • Cryptographic Key: Secret sequence of bytes used for encryption/decryption.
  • Encryption Types:
    • Symmetric: Single shared key for both encryption and decryption.
    • Asymmetric:
      • Public key: Encrypts data.
      • Private key: Decrypts data (kept secret).
  • Security:
    • Prevents interception and modification of data.
    • Encrypts the entire HTTP request (URL, headers, body).
  • TLS (Transport Layer Security): Protocol used to encrypt HTTP requests (formerly SSL).
  • HTTPS Handshake:
i.Client hello: Client sends the server the encryption methods it supports.
ii.Server hello: Server selects the encryption methods. The server provides its public key.
iii.The client encrypts a string of bytes with the server's public key, and sends it to the server.
iv.Server decrypts using its private key. Both compute a shared secret key for symmetric encryption.
v.All further data is encrypted using the shared secret key.
The Searchable Web
  • Entry Point: Often accessed through search engines.
  • Search Engines: Non-standard, proprietary systems (e.g. Google). """



Picture
0 Comments