Client-Server vs Peer-to-Peer

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

In the client-server model's request-response loop, which action is initiated by the client?

  • Transmitting data
  • Splitting functionality of a web site
  • Initiating a request to a server (correct)
  • Responding to a request

In a peer-to-peer network, a node can only act as either a client or a server, but not both simultaneously.

False (B)

What is the primary difference between the client-server model and the peer-to-peer model in terms of computer functionality?

functional roles

A single web server acting as an application or database server can typically handle only a few ______ requests a second.

<p>hundred</p> Signup and view all the answers

Match these architectures with their descriptions:

<p>Client-Server Model = A distinct request-response interaction where the client initiates requests. Peer-to-Peer Model = Each node can send and receive directly, acting as both a client and a server. Server Farm = Multiple servers working together to handle high request loads.</p> Signup and view all the answers

Why do popular websites typically use multiple servers instead of a single server machine?

<p>To handle a high volume of requests (C)</p> Signup and view all the answers

A server farm includes cows

<p>False (B)</p> Signup and view all the answers

In real-world web hosting, what are typically split between different types of servers?

<p>functionality</p> Signup and view all the answers

Which of the following best describes the relationship between the Internet and the World Wide Web (WWW)?

<p>The WWW is a subset of the Internet, utilizing it to provide a specific service. (A)</p> Signup and view all the answers

The ARPANET network was initially open to public use and commercial activities from its inception.

<p>False (B)</p> Signup and view all the answers

What was the primary purpose of the ARPANET network in its early stages?

<p>academic and scientific purposes</p> Signup and view all the answers

The suite of protocols that allowed for the unification of disparate networks is known as ______.

<p>TCP/IP</p> Signup and view all the answers

What key development facilitated the growth and unification of different networks into what would become the Internet?

<p>The adoption of the TCP/IP communication model (C)</p> Signup and view all the answers

Match the following terms with their description:

<p>Internet = A global network connecting devices worldwide. World Wide Web (WWW) = A collection of interconnected documents and resources accessed via the Internet. ARPANET = An early packet switching network and the predecessor of the Internet. TCP/IP = A suite of communication protocols used to interconnect network devices on the Internet.</p> Signup and view all the answers

Which of the following statements accurately describes the evolution of networks in the United States around 1981?

<p>New networks began adopting TCP/IP, while older networks were transitioned to it. (A)</p> Signup and view all the answers

Which entity initially funded and controlled the ARPANET network?

<p>The United States government (C)</p> Signup and view all the answers

Which of the following technologies are more prevalent in corporate intranets compared to the public internet?

<p>ASP.NET, JSP, SharePoint (D)</p> Signup and view all the answers

A static website changes its content based on user interactions and database information.

<p>False (B)</p> Signup and view all the answers

What was the common term in the 1990s for the person responsible for creating and maintaining a website?

<p>webmaster</p> Signup and view all the answers

Early websites, often referred to as ______ web sites, consisted only of HTML pages.

<p>static</p> Signup and view all the answers

What is a key characteristic that differentiates dynamic websites from static websites?

<p>Dynamic websites use server-side programs to generate content. (A)</p> Signup and view all the answers

Creating a static website in the early days of the web required extensive knowledge of server-side programming languages.

<p>False (B)</p> Signup and view all the answers

Match the following web functionalities with the type of website that typically uses them:

<p>Displaying the same content to all users = Static Web Site Reading content from databases = Dynamic Web Site Interfacing with enterprise computer systems = Dynamic Web Site Outputting HTML generated by server-side programs = Dynamic Web Site</p> Signup and view all the answers

Which of the following tasks can be performed by server-based programs in dynamic websites?

<p>Reading content from databases and communicating with financial institutions. (C)</p> Signup and view all the answers

What is the primary purpose of using a server farm?

<p>To distribute incoming requests and prevent overload. (D)</p> Signup and view all the answers

Using a server farm solely provides failover redundancy.

<p>False (B)</p> Signup and view all the answers

In a server farm, how are servers and hard drives typically arranged to save space?

<p>stacked in server racks</p> Signup and view all the answers

Server farms are commonly located in specialized facilities called ______.

<p>data centers</p> Signup and view all the answers

Why do large web sites often use mirrored data centers?

<p>To prevent potential site downtimes. (D)</p> Signup and view all the answers

Most web companies own and manage their own data centers.

<p>False (B)</p> Signup and view all the answers

What is the function of load balancers in a server farm?

<p>To distribute incoming requests to available machines. (C)</p> Signup and view all the answers

Match the term to its description:

<p>Server Farm = A cluster of machines that distributes incoming requests. Load Balancer = A router that distributes incoming requests to available machines. Data Center = A facility that houses server farms. Server Rack = A structure on which multiple servers and hard drives are stacked.</p> Signup and view all the answers

What is a common practice among large commercial web hosting companies like GoDaddy, Blue Host, and Dreamhost regarding website hosting?

<p>Hosting hundreds or thousands of sites on a single machine or mirrored across several servers. (C)</p> Signup and view all the answers

The primary hardware component of the Internet that most users directly interact with is located within regional network hubs.

<p>False (B)</p> Signup and view all the answers

Explain the role of regional network hubs in the process of an ISP delivering internet packets to other networks.

<p>ISPs often pass internet packets through one or more regional network hubs to reach other networks. These hubs act as intermediate points for routing traffic.</p> Signup and view all the answers

International internet communication often relies on undersea _______ _______ cables to transmit data across oceans.

<p>fiber optic</p> Signup and view all the answers

Why is the Domain Name System (DNS) neccessary?

<p>Human beings do not enjoy having to recall long IP addresses (C)</p> Signup and view all the answers

What role does the Domain Name System (DNS) primarily serve in web communication?

<p>Translating domain names into IP addresses. (A)</p> Signup and view all the answers

A second-level domain (SLD) is more general than a top-level domain (TLD).

<p>False (B)</p> Signup and view all the answers

In the context of URLs, what is the main purpose of the query string?

<p>pass information from the client to the server</p> Signup and view all the answers

The process by which software discovers the numeric IP address associated with a domain name is known as address ______.

<p>resolution</p> Signup and view all the answers

In a URL, what character is used to delimit key-value pairs in a query string?

<p>&amp; (C)</p> Signup and view all the answers

The protocol component within a URL specifies the domain of the resource.

<p>False (B)</p> Signup and view all the answers

Consider the URL: http://www.example.com/path/to/resource?param1=value1&param2=value2#section. Which part represents the query string?

<p><code>param1=value1&amp;param2=value2</code> (C)</p> Signup and view all the answers

Match the following URL components with their descriptions:

<p>Protocol = Specifies how to access the resource (e.g., HTTP, HTTPS) Domain = The address of the server hosting the resource Path = The location of the specific resource on the server Query String = Parameters passed from the client to the server</p> Signup and view all the answers

Flashcards

Internet

A global network of interconnected networks using standardized protocols to enable communication between billions of devices.

World Wide Web (WWW)

A collection of linked documents and resources accessed via the Internet using HTTP. It's a subset of the Internet.

ARPANET

A packet switching network created by the US Department of Defense in the 1960s, considered an ancestor of the Internet.

TCP/IP

A suite of communication protocols used to interconnect network devices on the Internet.

Signup and view all the flashcards

Protocols

A set of rules governing how devices on a network exchange data, ensuring compatibility and reliable communication.

Signup and view all the flashcards

Static Web Sites

Websites with content that remains the same for all users.

Signup and view all the flashcards

Webmaster

Someone responsible for creating and supporting a website, especially in the 1990s.

Signup and view all the flashcards

Dynamic Web Sites

Websites where content is generated by server-side programs, often using databases.

Signup and view all the flashcards

Server-Side Programs

Server-based programs that generate content dynamically.

Signup and view all the flashcards

HTML Markup

A common language used to create static websites

Signup and view all the flashcards

Dynamic Content Generation

Use programs running on web servers to generate content dynamically

Signup and view all the flashcards

Server farm goal

Distribute incoming requests between clusters of machines to prevent overload.

Signup and view all the flashcards

Load balancers

Special routers that distribute incoming requests to available machines in a server farm.

Signup and view all the flashcards

Failover redundancy

Using multiple servers to ensure availability if one server fails.

Signup and view all the flashcards

Server racks

Stack servers and hard drives vertically to save space.

Signup and view all the flashcards

Data centers

Specialized buildings that house server farms.

Signup and view all the flashcards

Redundant data centers

Mirrored data centers in different locations.

Signup and view all the flashcards

Third-party data center

Leasing server space from a third-party company.

Signup and view all the flashcards

Shared hosting

A single server hosting multiple websites.

Signup and view all the flashcards

Commercial Web Hosting

Companies that host hundreds or thousands of websites on single or mirrored servers.

Signup and view all the flashcards

Internet Hardware (Home)

Hardware component of the internet we experience at home.

Signup and view all the flashcards

Routers

Direct traffic between networks by using routing tables.

Signup and view all the flashcards

ISP's Role

Passes internet packet requests to other networks via regional hubs.

Signup and view all the flashcards

Domain Name System (DNS)

Translates domain names to IP addresses, making the internet user-friendly.

Signup and view all the flashcards

Request-Response Loop

The basic communication loop in the client-server model where the client sends a request to the server, and the server responds with data.

Signup and view all the flashcards

Peer-to-Peer (P2P) Model

A network model where each computer has equivalent capabilities and can act as both a client and a server.

Signup and view all the flashcards

Client-Server Model

The client initiates a request to a server and gets a response that could include some resource like an HTML file, an image or some other data.

Signup and view all the flashcards

Server

A computer or system that provides resources, data, services, or programs to clients over a network.

Signup and view all the flashcards

Multiple Servers

Splitting the functionality of a web site between several different types of server.

Signup and view all the flashcards

Replication of Servers

Multiple instances of each server to support a website.

Signup and view all the flashcards

Server URL

Clients make requests for resources from a URL; to the client, the server is a single machine.

Signup and view all the flashcards

Server Farm

A group of networked servers working together to handle a large volume of requests.

Signup and view all the flashcards

Top-Level Domain (TLD)

The most general part of a domain, like '.com' or '.org'.

Signup and view all the flashcards

Second-Level Domain (SLD)

The part of the domain name directly before the TLD (e.g., 'funwebdev' in 'funwebdev.com').

Signup and view all the flashcards

Address Resolution

The process of finding the IP address associated with a domain name.

Signup and view all the flashcards

Uniform Resource Locator (URL)

A standard way to refer to resources on the web.

Signup and view all the flashcards

Protocol (in URL)

Specifies the protocol used to access the resource (e.g., 'http' or 'https').

Signup and view all the flashcards

Domain (in URL)

Specifies the domain name of the server hosting the resource.

Signup and view all the flashcards

Query String

A way to pass information from the client to the server in a URL, using key-value pairs.

Signup and view all the flashcards

Study Notes

Definitions and History

  • The World Wide Web is what most people think of in relation to "the internet", but it is only a subset of it

Short History of the Internet

  • The early ARPANET network was funded and controlled by the United States government
  • It was used exclusively for academic and scientific purposes
  • The early network started with a few connected campuses in 1969 and grew to a few hundred by the early 1980s.
  • In 1981 new networks adopted the the TCP/IP (Transmission Control Protocol / Internet Protocol)

Tim Berners-Lee

  • The invention of the WWW is usually attributed to the British Tim Berners-Lee
  • British Tim Berners-Lee, along with the Belgian Robert Cailliau, published a proposal in 1990 for a hypertext system while both were working in in Switzerland.

Core Features of the Web

  • Shortly after that initial proposal Berners-Lee developed the main features of the web:
  • A URL to uniquely identify a resource on the WWW.
  • The HTTP protocol to describe how requests and responses operate.
  • Software that responds to HTTP requests, known as web server software.
  • HTML to publish documents.
  • Browsers that make HTTP requests from URLs and that can display the HTML it receives.

Intranet

  • An "intranet" refers to an internet network that is local to an organization or business
  • Intranet resources are often private, so only employees or authorized external parties have access
  • The "Internet" is a broader term that encompasses both private (intranet) and public networked resources
  • Intranets are typically protected from unauthorized external access via security feature such as firewalls or private IP ranges
  • It is difficult to get an accurate gauge of web pages that exist within Intranets, but some estimate that almost half of all web resources are hidden in private intranets.
  • Awareness of intranets is important when one considers market usage of different web technologies
  • On the public internet, PHP, MySQL, and WordPress are dominant
  • In corporate intranets, other technologies such as ASP.NET, JSP, SharePoint, Oracle, SAP, and IBM WebSphere, are just as important

Static Web Sites

  • In the earliest days of the web, a webmaster would publish web pages, and periodically update them.
  • Skills needed to create a web site were pretty basic: one needed knowledge of the HTML markup language and familiarity with editing and creating images.
  • A static web site consists only of HTML pages that look identical for all users at all times.

Dynamic Web Sites

  • Within a few years of the invention of the web, sites began to get more complicated as sites began to use programs running on web servers to generate content dynamically.
  • Dynamic web sites have server-based programs that read content from databases, interface with existing enterprise computer systems, communicate with financial institutions, and then output HTML that are sent back to the users' browsers.
  • Dynamic web pages are created at run-time by a program created by a programmer; this page content can vary for user to user.

Web 2.0 and Beyond

  • Web 2.0 had two meanings, one for users and one for developers.
  • Web 2.0 refers to an interactive experience where users can contribute and consume web content, creating a more user-driven web experience
  • Web 2.0 refers to a change in the paradigm of how dynamic web sites are created
  • Programming logic which previously existed only on the server, began to migrate to the browser, requiring learning Javascript, a programming language that runs in the browser, as well as mastering the rather difficult programming techniques involved in asynchronous communication

Internet Protocols

  • The internet exists because of a suite of interrelated communications protocols.
  • A protocol is a set of rules that partners in communication use when they communicate.

A Layered Architecture

  • The TCP/IP Internet protocols were originally abstracted as a four-layer stack
  • Later abstractions subdivide it further into five or seven layers
  • The earliest and simplest model is the four-layer network model.

Four Layer Network Model

  • The first layer is the Application Layer containing higher protocols that allow applications to interact with the transport layer: HTTP, FTP, POP etc
  • Second is the Transport Layer which ensures transmissions arrive in order and without error: TCP, UDP
  • Third is the Internet Layer which establishes connection, routing, and addressing: IPv4, IPv6
  • The final layer is the Link Layer responsible for physical transmission of raw bits MAC

IP Addresses

  • There are two types of IP Addresses.
  • IPv4 addresses are the IP addresses from the original TCP/IP protocol
  • IPv4 uses 12 numbers, implemented as four 8-bit integers, written with a dot between each integer.
  • Since an unsigned 8-bit integer's maximum value is 255, four integers together can encode approximately 4.2 billion unique IP addresses
  • IPv6 was created to future proof the Internet against theIPv4 4.2 billion limit
  • IPv6, it uses eight 16-bit integers which provides for 2128 unique addresses, over a billion billion times the number in IPv4
  • 16-bit integers are normally written in hexadecimal, due to their longer length.
  • An IP address is generally assigned by a Internet Service Provider (ISP).
  • In organizations, purchasing extra IP addresses from the ISP is not cost effective
  • On a local network, computers can share a single IP address between them.

TCP Packets

  • Messages are broken into packets with a sequence number.
  • For each TCP packet sent, an ACK (acknowledgement) must be received back.
  • The sender will resend any packets that did not get an ACK back.
  • The Message is reassembled from packets and ordered according to their sequence numbers.

Client-Server Model

  • The web is client-server model of communications.
  • In the client-server model, there are two types of actors: clients and servers.
  • The server is a computer agent that is normally active 24 hours a day, 7 days a week (24/7), listening for queries from any client who make a request.
  • client is a computer agent that requests and receives responses from the server, in the form of response codes, images, text files, and other data.
  • Within the client-server model, the request-response loop is the basic mechanism on the server for receiving requests and transmitting data in response.
  • The client initiates a request to a server which creates a response that could include a HTML file, an image or some data.

The Peer-to-Peer Alternative

  • Each computer is functionally identical in a peer-to-peer model
  • Each node can send and receive directly with one another.
  • In the model each peer acts as both a client and server able to upload and download information.

Server Types

  • Clients make requests for resources from a URL, to the client, the server is a single machine so it is common to split the functionality of a web site between several different types of server like; Data, Application, Email, Web, Media and Authentication servers.
  • Not only are there different types of servers, there is often replication of each of the different server types
  • Globally popular sites such as Facebook receive millions of requests a second.

Server Farms

  • A single web server that is also acting as an application or database server will struggle handle more than a few hundred requests a second
  • The usual strategy for busier sites is to use a server farm.
  • The goal behind server farms is to distribute incoming requests between clusters of machines so that any given web or data server is not excessively overloaded, load balancers are used.
  • it is not uncommon to still use a server farm even if the server can handle the load because it provides redundancy.
  • Server hardware and hard drives are stacked on top of each other in server racks
  • A typical server farm consists of many server racks, each containing many servers .

Data Centers

  • Server farms are typically housed in special facilities called data centers
  • Data centers that prevent the potential for site down times provide mirrored data centers in different parts of the country, or even the world
  • Costs for multiple redundant data centers are quite high, so most web companies lease space from a third-party data center.
  • It is common for a single server machine may host multiple sites
  • Commercial web hosting companies host hundreds or thousands of sites on mirrored servers.

Where is the Internet?

  • Our experience of the hardware is in our homes though Fiber junction boxes, fiber optic cables, ISP head end, Cable modem termination system (CMTS) & Cable modem
  • Your ISP has to pass on your requests for Internet packets to other networks
  • This intermediate step typically involves one or more regional network hubs.
  • Your ISP may have a large national network with optical fiber connecting most of the main cities in the country
  • Some countries have multiple national or regional networks, each with their own optical network.
  • International Internet communication will need to travel underwater in Undersea fiber optic cable.

Routers and Routing Tables

  • The routing table specifies a host of destination networks and sub-networks through which a certain router can connect.
  • Every router on the internet has its own routing table

DNS

  • Instead of IP addresses, we use the Domain Name System (DNS)
  • Domain name address resolution facilitates your request from your computer to the correct one on the other side of the word

Domain Levels

###DNS Address Resolution

  • While domain names are certainly an easier way for users to reference a web site, eventually, your browser needs to know the IP address of the web site in order to request any resources from it.
  • The Domain Name System provides a mechanism for software to discover this numeric IP address.
  • This process is referred to here as address resolution: requesting from the address www.funwebdev.com

Uniform Resource Locators

  • In order to allow clients to request particular resources from the server, a naming mechanism is required so that the client knows how to ask the server for the file.
  • Uniform resource locator (URL): http://www.funwebdev.com/index.php?page=1#article Where protocol is http, domain is www.funwebdev.com, path is /index, Query String is page=1 and Fragment is #article"

Query String

  • They are the way of passing information such as user form input from the client to the server.
  • In URL's they are encoded as key-value pairs delimited by "&" symbols and preceded by the "?" symbol.
  • ie: ?username=john&password=abcdefg

Hypertext Transfer Protocol

  • The Hypertext Transfer Protocol establishes a TCP connection on port 80 (by default).
  • The server waits for the request, and then responds with a response code, headers and an optional message (which can include files).

Web Requests

  • The experience of seeing a single web page is facilitated by the client's browser which requests the initial HTML then parses it to find all the resources from within it, like images, style sheets and scripts.
  • The page is only fully loaded for the user when the files have been retrieved.

HTTP Request Methods

  • The HTTP protocol defines several different types of requests, each with a different intent and characteristics.
  • The most common requests types are GET and POST request, along with the HEAD request.
  • Other requests, such as PUT, DELETE, CONNECT, TRACE and OPTIONS are seldom used.

Web Servers

  • A web server is, nothing more than a computer that responds to HTTP requests.
  • To run a website one must choose an application stack
  • LAMP software stack: Linux OS, Apache web server, MySQL database, and PHP scripting language
  • WISA software stack: Windows OS, IIS web server, SQL Server database, and the ASP.NET server-side development technologies.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

More Like This

Redes Punto a Punto y Peer to Peer
17 questions
Application Layer Architecture Quiz
27 questions
U1
24 questions

U1

OptimalGold avatar
OptimalGold
Use Quizgecko on...
Browser
Browser