##### Activity
# Chat Room Simulation
Inquiry Activity

### Learning Objectives:
- [LO 2.3.1] Use models and simulations to represent phenomena. [P3]
- [LO 6.1.1] Explain the abstractions in the Internet and how the Internet functions. [P3]
- [LO 6.2.1] Explain characteristics of the Internet and the systems built on it. [P5]
- [LO 6.2.2] Explain how the characteristics of the Internet influence the systems built on it. [P4]
- [LO 6.3.1] Identify existing cybersecurity concerns and potential options to address these issues with the Internet and the systems built on it. [P1]

## Overview

In this lesson, students will explore and act out the way in which computers communicate with each other over the internet. They do this by simulating a chat room, in which they must send secure messages to other students in the class. Throughout the activity, the students must develop ways to identify the sender and intended recipient of the message, and also to keep it secure.

This activity will likely span two class periods. Be sure to give the students enough time to brainstorm different problem solving solutions for the later rounds. You will also want to leave enough time to go over the discussion questions.


### What you need:
- Post-it notes, index cards, or small pieces of paper for the messages
- Pens or pencils to write the messages
- YouTube access to play this video https://www.youtube.com/watch?v=AYdF7b3nMto&feature=youtu.be 

Begin by splitting up the students into two groups. One group will be the message senders and the other group will be the recipients. Assign each sender a recipient to give a message to without informing the recipient.

Have the students all stand up and tell the senders to deliver their message to the recipients. After the messages have been delivered, ask the recipients if they know what the message was and who it came from. Ask them how they knew this - at this point it should be obvious; the sender told them the message and they know who the sender was since they saw and heard them.

For the second round, assign new senders and recipients. Put post-it notes and writing utensils somewhere in view for the students. Instruct the senders to deliver their messages to the recipients, but this time without talking. The students may write or mime their message, encourage creative solutions.

After the messages have been delivered, ask the recipients how they know what the message said and who the sender was. They will likely respond saying that they could read the message and see who the person was who gave it to them.

Repeat the whole process again for a third round, but this time break the students up into three different groups:senders, recipients, and routers. The routers’ job is to deliver the message from a sender to the recipient.

Recipients must keep their eyes closed or put their heads on their desks while the routers deliver messages to them. In addition, the senders must determine how they will deliver the message via the router and ensure that the recipients know who the message came from. Most of them will likely write the recipient’s name and their own name on the message (i.e. “To Dave … From, Jane”).

Once the messages have been delivered, ask the routers how they knew who to deliver the messages to. Then ask the recipients how they knew who the message was from.

For the fourth round, the students should repeat the process from round 3, but this time the senders are limited to sending only 8 characters at a time, and the message must be longer than 8 characters so the senders must send their message in different pieces, and figure out how to make the message reconstructable.

Instruct the senders to break the message up into pieces of no more than 8 characters. In addition, they need a way to tell the recipient how many pieces of the message there are and the order of the pieces. This allows the recipient to fully reconstruct the message, even though it is delivered in pieces. If necessary, allow the senders to work together in order to develop a system that allows them to number the pieces.

Have the senders give the pieces of the message to the router to be delivered to the recipient one by one. Once the recipients have received the entire message, have a quick discussion on how they were able to assemble the messages. Ask the senders about the protocols they developed to see if students came up with different methods.

At this point, you can also encourage the students to think about ways in which they can limit the length of their messages. For example, instead of saying “To Dave...from Jane” with each message, perhaps the class could have a system in which each student is assigned a number. Then the recipient’s number could be at the beginning of the message and the sender’s number could be at the end. Naturally, this would reduce the number of characters in the message, and thus the number of packets that need to be sent.

In the fifth and final round, have the students repeat the process one more time. In this round, however, tell the students that there is now a potential security breach in the chat room. In order to deliver the messages securely, the students have to devise a way for the senders to encrypt the messages and the recipients to decrypt and read them.

The best way to do this is for the sender to work with the recipient to develop a code together. Then the sender can use the code to encrypt the message and the recipient can use it to decrypt the message. If students need help coming up with encryption methods, you can suggest cipher shifts (where the entire alphabet is shifted by a certain number) or replacing letters with numbers that they are mapped to.

Once the sender and recipient have decided on an encryption/decryption method, the senders should write the encrypted message in pieces (up to 8 characters at a time) and give the pieces to the router to deliver to the recipient. After the messages have been delivered, ask the students to describe their encryption methods. Have a short class discussion about the different methods students chose and which ones may be more secure than others.

After the final round, show the video above to give students a better sense of how transfers actually occur over the internet. Then spend at least ten minutes leading a class discussion with the following questions. Encourage the students to think about the video and the chat room simulation as you go through each question.


### Discussion Questions:
- How did the chat room simulation represent the way in which information is transferred via the Internet? What details were abstracted in the simulation?
- Describe how the Internet transfers information from one device to another. 
- Why is data transferred in packets? How does this reflect on the characteristics of the Internet?
- Describe how you manipulated information in order to encrypt it. How does this compare to ways in which computers do it?
- How do systems built on the Internet, such as chat rooms, reflect the characteristics of the Internet?

### Assessment Questions:
- How is the internet fault tolerant? [EK 6.2.2B]
- Why is it important to have shared protocols? [EK 6.2.2D]
- What is the purpose of TCP/IP? [EK 6.2.2G]
