Unit 3

How the Internet Works

[21.1]

In the MapReduce algorithm, identify whether the following duties/functions belong to the Mapper, Reducer or Manager.

____ Takes a piece of data, processes it, and finds a partial result
____ Combines results together, sends to the reducer
____ Splits up data, sends to mappers, gets results back
____ Takes a set of partial results and combines them together
____ Gets the final result, outputs it
   

[21.2]

What is a router's function?

    A. To analyze the destination of incoming data and choose the best available path to forward it.
    B. To manage user accounts and control who is allowed to access the internet.
    C. To break data into smaller pieces so it can travel more efficiently across the internet.
    D. To translate data into a format that different devices can understand.
    E. To convert domain names into IP addresses.    

[21.3]

Which of the following accurately describes the journey of a website?

    A. DNS receives packets from the browser, assigns them a URL, and forwards them to the closest router for display.
    B. A browser takes a URL, uses DNS to find the website’s IP address, breaks the request into packets, and sends them across the internet to the server.
    C. An IP address asks the browser to create packets, which DNS then sends back as a URL for the website.
    D. A browser sends a URL directly to the website, where DNS converts the packets into an IP address before displaying the page as multiple packets.    
  

[21.4]

Match each term to the correct description. Each description is used once.

    Terms

    Browser
    Protocol
    Distributed computing
    IP address
    Router
    DNS server
    Cloud computing
    Packet
    ISP

    Descriptions

    A. A set of rules that devices follow to communicate over a network
    B. A company that provides users with access to the internet
    C. A small piece of data sent across a network
    D. A device that forwards data toward its destination
    E. Application that receives data from the internet and organizes it into a readable webpage
    F. A system that translates domain names into numerical addresses
    G. Computing that uses many computers working together
    H. A series of numbers that uniquely identifies the computer hosting a website, can be static or dynamic
    I. Computing resources provided over the internet on demand
    

  

[21.5]

Which of the following best describes cloud computing? Select all that apply.

    a. Running all programs on your personal computer
    b. Storing data using computers accessed over the internet
    c. Sending packets directly between routers
    d. Translating URLs into IP addresses
    e. Set of computer that are connected to the internet and can scale at need
    f. Managing local hardware devices, like printers and hard drives
    g. Controlling network traffic by selecting the appropriate path
    
  

[21.6]

True or False

    A. T or F: A router’s main job is to display web pages to users.
    B. T or F: Packets may take different paths across the internet to reach the same destination.
    C. T or F: An IP address works like a mailing address for a device on the internet.
    D. T or F: Protocols describe what data is sent, not how it is communicated.
    E. T or F: A router’s main job is to control the content of websites that users visit.
    
    
  

[21.7] Explain the difference between a browser and an ISP.

[21.8] Data sent over the internet is divided into small pieces called __________ so it can travel efficiently across networks.

[21.9] Describe how DNS servers, IP addresses, and browsers work together when loading a website.

[21.10] What problem does buffering solve for web browsers?

        A. It speeds up your internet connection
        B. It prevents lag by preloading early content while the rest loads
        C. It compresses packets to make them smaller
        D. It stores your passwords for faster login
    

MapReduce Exercises

[MR1] You and your friend group ordered a XXXLarge 32-slice pepperoni pizza. However, both of you are in disagreement over the amount of pepperoni pieces on the pizza.

To settle the disagreement, you decide to count the amount of pepperoni pieces on the pizza using the MapReduce Algorithm. Fill in the following table to plan out the MapReduce Approach:

Mapper Input
Mapper Output
Reducer Input
Reducer Output
Manager Actions

[MR2] Jane has a collection of text files. She wants to count the total amount of times the word “Python” appears in them by using a MapReduce algorithm. She wrote the following potential options for the Mapper, Reducer, and Manager functions for this problem. For each component (Mapper, Reducer, Manager), choose the option that correctly applies the MapReduce algorithm to this problem.

  1. Mapper Input
    1. One file
    2. Text
    3. A list containing the words of all the text files
    4. Something that has the words of one individual file

  2. Mapper Output
    1. Output 1 for every "Python" word seen in the input
    2. A list of all the words in the file
    3. "Python"
    4. An int count of all the instances of "Python" in the file

  3. Reducer Input
    1. Number of words that equal "Python"
    2. The Mapper Results
    3. List of counts of the word "Python" from each mapper input
    4. Count of "Python" overall in the files

  4. Reducer Output
    1. The total count of "Python" words
    2. A list of counts of the word "Python" in files
    3. A final result from partial inputs
    4. A count

  5. Manager Actions
    1. Splits up files to send to each mapper, receives results from mappers, formats the counts to a list of counts to send to the reducer
    2. Splits up files to send to each mapper, receives count results from mappers, sends result to the reducer and prints out reducer output
    3. Splits up files to send to each mapper, receives "Python" count results from mappers, formats the counts to a list of counts to send to the reducer, receives final count from reducer, and then displays it
    4. Splits up files to send to each mapper, receives count results from mappers, sends the count results to the reducer, receives the final count from the reducer and displays it