Skip to content

Follow One Request

Run the Follow One Request MicroSim Fullscreen

About This MicroSim

Dana is a member of a dating-safety app. She has uploaded photos of a match and taps "Run checks." This MicroSim follows that one tap as a request. It leaves her browser, crosses the internet, reaches the back-end server, fans out to eight outside checks, and comes back as a response with a status code and JSON.

The trip is split into seven stops. At each stop you pick what happens next from three statements, before the request moves on. The picture shows which machine the member controls and which one the builder controls. That line decides where every check has to live.

Scan number 4821 is made up for the example, as in the chapter.

How to Use

  1. Read the prompt above the picture. The orange outline shows where the request is now.
  2. Pick one of the three statements below the picture. Your first pick counts.
  3. Read the feedback. The correct statement turns green, and the request ticket moves to the next stop.
  4. Press Next stop and repeat through stop 7. The running count shows "Stops correct: n of 7."
  5. Press Replay the whole trip to watch all seven stops in one pass, each with its correct statement as a caption.
  6. After the replay, click any zone or box to read its one-line definition, or click a stop in the list to read why.

Iframe Embed Code

You can add this MicroSim to any web page by adding this to your HTML:

<iframe src="https://arunbatchu.github.io/good-enough-engineering/sims/follow-one-request/main.html"
        height="604px"
        width="100%"
        scrolling="no"></iframe>

Lesson Plan

Learning Objective

One "Run checks" request travels from the browser front end to the back-end server and back. The learner will explain what happens at each of its seven stops, by predicting the correct outcome at 6 of 7 stops.

Bloom level: Understand (explain)

Grade Level

Adult professional (Good Enough Engineering)

Duration

10-15 minutes

Prerequisites

Web application, client and server, browser front end, back-end server, HTTP request, HTTP method, URL, route, API endpoint, JSON and status code. All are from Chapter 2: How a Web App Works.

Activities

  1. Predict (5 min): Work through the seven stops without looking back at the chapter. Say out loud why you picked each statement before you click.
  2. Replay (3 min): Watch the whole trip again. For each stop, name the machine it happens on and who controls that machine.
  3. Explore (5 min): Click the route and the endpoint chips and compare the two definitions. Then click the database and photo storage boxes and note that only the back end reaches them.

Assessment

  • Mastery is 6 of 7 stops correct on the first pick.
  • Ask the learner: "Dana's browser hides other members' scans. Why does the server still check who owns scan 4821?"
  • Ask the learner: "The server crashed and sent a 500. What should the results page show?"

Common Misconceptions

  • The front end runs the checks.
  • Hiding a button in the browser stops the request.
  • The server trusts the scan number the browser sends without checking who owns it.
  • A response with a page drawn on screen means the request worked.

References

  1. An overview of HTTP - MDN Web Docs - How clients and servers exchange requests and responses.
  2. HTTP request methods - MDN Web Docs - What GET, POST, PUT, PATCH and DELETE mean.
  3. Working with JSON - MDN Web Docs - The format of the response body.
  4. Chapter 2: How a Web App Works - Good Enough Engineering - The section "One Order, Start to Finish."