Presentation 14: Web Search Simulation

Thanks to Paul Chisholm for the idea

In this presentation we will see how fast web search is implemented: we will first created sample web pages, then we'll have crawlers(fetchers) collect these pages, sorters( indexers) sort them and searchers (servers ) retrieve the information.

Preparation

1. Sticky notes labeled A-Z

2. 2-4 blank sheets of paper per child, pencils

3. black board

4. Computer or a projector is a plus

Presentation

1. Google

We are going to talk about Google today. Who knows what Google is?

Have kids offer their answers

You use Google to search for the information. Let's try it!

Go to google search page or image search and search for cat or dog or whatever else. If some kids know how to do it, have them demonstrate for others if there are several computers in a class.

2. Where is Google looking for information?

Today we are going to talk about how search works. But first let's talk about what is being searched.

Well, Google searches web pages on the internet. The internet is called World Wide Web. Why is it a web?

Have kids offer answers

It's a web because web pages are connected with each other through links. 

Draw a web on the board with each node being a square representing a web page

There are millions and millions (2016 - 4.5B pages) of web pages on the internet. To look for the information on all of them it may take very very long time. 

Let's try to play web search. First let's create web pages

3. Creating web pages 

Instead of web pages we'll use real paper pages. We are going to create web pages about different animals. What animals do we know?

Get kids to answer and list a number of animals on the blackboard so that kids don't get stuck.

Distribute empty pages – a couple per person.

First a web page has a name. In your case it will be the name of the animal.

Draw a sample web page

Then it either has a picture of an animal, a description or both. You can pick animals from this list and create your web page about them. Do not put more than one animal on the same web page. Do not use two sides of the sheet.

Have kids create a couple of pages about animals.

4. Inefficient web search 

Ok, so let's say we created the web pages. Great!

Now we are going to see what it's like to do a web search. I need a volunteer.

Choose one person and have her search for all pages about cats.  Each page stays with a student.

Time her search. It took about 4 minutes for over 20 kids. While the volunteer is searching invite some other kids to search for other stuff but don't time them.

(The volunteer comes back with the pages about cats)

Ok, so the web search for cats took us 4 minutes! Imagine if you asked Google to search for cats and it would take it 4 minutes to come up with the answer! You would never use it anymore! And there are not 20, but millions and millions of web pages out there!

So, what is Google doing that makes the search so much faster? Here is the story:

5. How efficient web search works

There are several parts of Google web search. If you think of it as a theater performance, there several actors. For example, in the search for cat, there was a single actor – searcher, who was doing the whole job. But Google has many actors who play different roles. Note, these “actors” are NOT people, they are programs running on computers.

Crawlers

First, there are Crawlers. 

Draw a picture of a Crawler – a crawling creature with a basket on its back

A crawler crawls the web like a spider, from a page to a page, and collects all the information, which it puts in a basket. There are many crawlers, who crawl the web all the time, day and night, day and night. What do they do with this information? They bring it to Sorters.

Sorters

Let's talk about Sorters now. 

Draw a picture of a sorter – a creature with “ABC” hat.

Sorters do very similar job as you do for your homework when you need to put words in the ABC order. They get the pages from the crawlers and alphabetize them. There are many Sorters, one Sorter responsible for each letter of the alphabet. For example, the words “Cat” and “Crab” will come to the Sorter “C” who will put the pages in order. “Cat”, then “Crab”

Searchers

Once the information is sorted it will be much easier to search it. To do this job there are Searchers.

Draw a searcher – a creature with a rectangular box on its head where the search query is typed.

 Searchers are the programs that talk to you when you search on google. You tell the searcher: please find me information about cats, and searcher runs to the sorter “C” asks it to give it all the information about “Cats” and brings it back to the user. There are a lot of Searchers – each one serves one user.

6. Simulating efficient web search 

We are going to play the web search now. First we need a special place for sorters, where all our pages will be sorted in the right order. 

Find a large table or a flat surface and place stickies from A-Z. Allocate third of the group to be responsible for a few letters each so that the whole alphabet is covered.

Now we need crawlers.

Get another third of the class to be crawlers. 

Note, all web pages made by kids are still all over the place. You can either leave them there or spread them all over the floor.

Here is what crawlers do: you pick a few web pages, run to the sorters and ask them to put these web pages in the right pile, in the order.

Have crawlers and sorters do the job.

Now we have all information about web pages and it is ordered. Let's see how fast we can search the web now!

Choose the same volunteer and  time her getting all the information about cats, time the search again.

You see how fast it is now to search for the information! That's exactly what Google does, and that's why it works so fast.

Have the rest of the kids be searchers. Ask them to find information about different animals. Kids will likely gather pages and bring them to you. Once they do that, ask them to bring the pages back to put them in place.

Ask to search for an animal that is likely not among the web pages, liger, for example (a mix of tiger and lion)

Sometimes Google can not find the exact match. It would still find the relative matches. For example, what are the relative matches for liger? Tiger, Lion, cat.

7. Recap

Let's recap. 

What is Google? (Provides web search) 

Where is the information located that Google is searches for? (web pages) 

What is a slow way to search? (just go from a web page to a web page)

What are the actors for the fast search? (crawlers, sorters and searchers)

What do crawlers do? (collect web page information and give them to sorters)

What do sorters do ?(sort the pages in abc order)

What do searchers do? (ask sorters to  give them the information that user is asking)