Distributed Computing

The primary objective of this module is to introduce students to some of the basic distributed computing concepts through projects that appeal to young learners, especially to girls. At the same time, this first module introduces students to NetsBlox and its distributed computing abstractions that will lay the foundation for subsequent modules. The focus is on using online services to access STEAM data sources and services to create engaging projects. A unit each on climate change, the arts (movies, music, and museum collections), and public health/medicine shows the breadth of computing applications. To analyze and visualize the data, students work with Google Maps and gnuplot — services already available within NetsBlox — and learn key concepts of data structures, lists and matrices. As noted before, these real-world and diverse data sources and application areas have the potential to activate girls’ interest in computing through their own current interests in high school. In the second half of the module, message passing is used to introduce basic computer networking concepts such as addressing, latency, communication protocols, etc. with projects such as a chat room, mesh networking, a shared whiteboard and/or simple multi-player games.

Table of Contents

Unit 0: Framing and Orientation to Distributed Computing

Estimated Duration

One 45-50 minute period

Lesson Summary

In this brief intro lesson, students will brainstorm and discuss how Distributed Computing is part of our daily lives. They will be introduced to fundamental ideas related to Distributed Computing (DC). They will create NetsBlox accounts in preparation for Unit 1.

Learning Objectives

Connect DC to students’ lives to motivate learning of this module.

Vocabulary

Distributed Computing (DC), Remote Procedure Call (RPC), Message Passing, Heterogeneity, Latency, Concurrency, Transparency, Security, Privacy,  Scalability, Resiliency

Lesson Resources
Additional Resources

Unit 1: Intro to NetsBlox, the GoogleMaps service, and the Weather Service

Estimate Duration

1-2 (45-50 min) periods

Lesson Summary

In this lesson, students will be introduces to the Services in NetsBlox (specifically GoogleMaps and Weather).

Learning Objectives

TSW understand what an RPC custom block does and how it can be used to access the Google Maps and weather service. TSW be able to use RPCs to create a map with weather information

Vocabulary

Distributed Computing (DC), Remote Procedure Call (RPC), Network Latency

Services / RPCs
Weather App
Project Extension Ideas

Urge students to come up with their own ideas. Here are some examples:

  • Translate to language of the region
  • Give choice of Centigrade or Fahrenheit
  • Display multiple temperature indicators on the map
  • Temperatures at locations of interest
  • "Which place is hotter?" guessing game
  • Store or Service locator for your community

Unit 2: Managing Lists and the MovieDB Service

Estimated Duration

2-3 (45-50 min) periods

Lesson Summary

In this lesson, students will be Introduced to lists and gain more experience with Remote  Procedure Calls (RPCs)  Students will learn how to create applications that display images of lead cast members in popular movies, movie posters, and additional information about cast members using TheMovieDatabase (TMDb).

Learning Objectives

After this lesson, students will be able to:

  • Create and manipulated lists
  • Explain the difference between lists and primitive values
  • Understand the need for unique identifiers
Vocabulary

Array/List, Element, Iterate/Iteration, Index, Primitive Value, Remote Procedure Call (RPC), Unique Identifier, Service

Services / RPCs
Slides
Activities
  • Walkthrough (in slides):  Create a list of 10 random numbers between 1 and 100
  • Practice (in slides):  Find the largest number in a list
  • Activity 1:  MovieDB Poster
  • Activity 2:  MovieDB CastShow
  • Activity 3:  Extend MovieDB project
Project Code (Teacher Reference)
Teacher Step-by-step Training Videos
Teacher Resources
Additional Resources
Project Extension Ideas

Urge students to come up with their own ideas. Here are some examples:

  • Larger grid of images (using cloning)
  • Movie trivia quiz game
  • Learn more about a favorite actor/actress (date of birth, biography, filmograph, etc.)
  • Create actor/actress guessing game as shown on Ellen’s Game of Games (“Hot Hands”)
  • How many movies did both X and Y act in?

Unit 3: Plotting and Climate Change App

Estimated Duration5 (45-50 min) periods
Lesson Summary

In this unit students will be introduced to a NetsBlox supported charting service called Chart which uses the gnuplot open source charting app. The charting service will allow students to create custom charts and graphs using two remote procedure calls (RPCs). Students will also be introduced to more useful ways of getting and storing collections of related data through the use of multidimensional lists/arrays.

Learning Objectives

Student will:

  • Explore ways of charting data using the Chart service
  • Create a custom chart/graph to plot real-world data
  • Understand that a list/array can be used to store a collection of data to be used in a program
  • Build upon prior knowledge of distributed computing through the use of RPCs to get real-world plottable data from other NetsBlox services, such as MovieDB, Science, and Maps introduced in prior lessons.
  • Apply understanding of lists/arrays to store and access information to be plotted
  • Evaluate whether the graph created accurately represents the data set chosen to plot/graph
Vocabulary

Remote Procedure Call (RPC), Data Structure, Multi-dimensional List/Array, Indexed Variable, Element

Services / RPCs
  • Chart (specifically the “draw” RPC)
Activities
  • Understanding multi-dimensional lists/arrays
  • Intro to basic plotting with the NetsBlox Chart service
  • Plotting with NetsBlox using CO2 data
  • Create your own graph using other RPCs in NetsBlox
Resources
Other Example Projects
Additional Resources

Unit 4: Message Passing and Distributed Animation

Lesson Summary

In this lesson, students will be introduced to message passing and related networking abstractions in NetsBlox (specifically, the room and roles).

Learning Objectives

Students will be able to:

  • Explain the difference between messages and events, both in terms of the use od the network and the data payload
  • Demonstrate the ability to use message passing for basic communication in a NetsBlox application
Vocabulary

Room, Role, Message, Message Type, Event

Activities
Animation Extension Ideas

Urge students to come up with their own extensions, but here are some examples:

  • Add another role to the project so it runs across 3+ screens
  • Enable the animation to change directions so it can be sent back to the previous screen
  • Enable multiple animations simultaneously (using cloning)
Teacher Resources
Student Resources without code)

Unit 5: Collaborative Whiteboard

Lesson Summary

In this lesson, the students will create custom messages and will be able to create a collaborative whiteboard application where two users can draw on each other’s stage.

Learning Objectives

Students should:

  • Gain more experience with message passing
  • Be able to reason about the impact of protocol design on the granularity/smoothness of collaboration
  • Gain more experience reasoning about the impact of design decisions in a distributed setting on the resultant application
Vocabulary

Room, Role, Message, Message Types, Custom Messages, Latency, Concurrency

Activities
Teacher Resources
Student Resources

Unit 6: Mesh Networks

Lesson Summary

In this lesson, students will create an application where users can message each other without a central server by passing messages among peers. Each peer in the network can send messages, receive messages, or simply pass messages along.

Learning Objectives

Students will:

  • Create an application where students can pass messages through a mesh network
  • Understand peer-to-peer and client-server network architectures and be able to tell the limits and benefits of each
  • Experience what happens to messages in the network as changes are made and nodes are faulty
Vocabulary

Nodes, Fault-Tolerance, Peer-to-Peer Networking, Redundancy, Resiliency

Activities
  • Mesh Network Lab
  • Written Activity: Identify uses of Mesh Networks in Everyday Life
Teacher Resources
Additional Resources

Unit 7: Dynamic Chat Room

Estimated Duration

2-3 Days

Lesson Summary

In this lesson, students will be introduced to a new way to write a distributed program.  Instead of using multiple roles, it will use multiple instances of the client program, all communicating with the server program using project to project message passing.

Learning Objectives

Students will be able to:

  • Pass data to another project using the rolename@projectname@username syntax
  • Establish a basic communication protocol
Vocabulary

Message Passing, Protocol, Global Address, Role, Project

Activities
Teacher Resources
Student Resources

Unit 8: Individual or Team Project

Estimated Duration

45 minutes x 5 – 10 days

Lesson Summary

In this project, students will come up with a project to work on for the entire unit (5-10 days, depending on scheduling), either as an individual or in teams of 2-4. Project ideas should be related to distributed computing and can use pieces and concepts from previous lessons. Note that students are not limited to only concepts that have been covered previously.

Project Ideas

This is meant to be a creative unit where students come up with their own project concepts, but if students are struggling for ideas, here is a list of example directions:

  • Turn-based games. The NPlayer service (demo) in NetsBlox makes it easy to set up distributed, multiplayer turn-based games that use message passing between projects to control the game state (the NPlayer service simply handles turn order, but not other aspects of the game logic). Students are free to come up with what kind of game to make, but we provide the 21 Pebbles game as an example. Starter Project. Step-by-Step Guide. Completed Project.
  • Make your own service.
  • Animation-based games.
Student Resources