Open lesson

Mission: defend the new data path

Command palette

This mission workspace keeps code and notes in this browser tab. Export them before closing it. Running code is practice, not an automatic grade for the mission.

Brief

Choose an architecture for changed throughput, delay, availability, security, and cost constraints.

Imani displays a new deadline for the hearing. Voss mocks streaming costs; Noor reminds everyone a fast but unverifiable system is useless. Mara gives you both plans and asks for a reasoned choice. The hearing is near in the story; the exercise has no timer.

Your mission

  1. Write five constraints with their units.
  2. Check batch and stream against each.
  3. Choose one and explain why the other fails.
  4. Name two tests or risks to follow.

How to check your work

  • 10,000/day, ten minutes, 99%, access, 30 units.
  • Batch fails delay; stream meets fictional values.
  • Stream selected for this need, not as a universal winner.
  • Recovery, provenance, rights, or actual cost to verify.

Course example

requirements={"events_per_day":10000,"max_delay_minutes":10,
              "min_availability":0.99,"max_cost_units":30}
options={
 "nightly_batch":{"capacity":20000,"delay":1440,"availability":0.995,"cost":8,"access_checked":True},
 "continuous_flow":{"capacity":15000,"delay":4,"availability":0.992,"cost":24,"access_checked":True},
}
def fits(plan):
 return (plan["capacity"]>=requirements["events_per_day"]
  and plan["delay"]<=requirements["max_delay_minutes"]
  and plan["availability"]>=requirements["min_availability"]
  and plan["cost"]<=requirements["max_cost_units"]
  and plan["access_checked"])
for name,plan in options.items(): print(name,fits(plan))
print("chosen","continuous_flow")

Code

Use Tab to leave the editor. Ctrl+Enter runs the source. The lines beginning with # are task reminders. Python ignores them. Write your code beneath them.

Python console

Loading laboratory…

Explore Python or SQL here; this is not an operating-system shell.

This is a disposable browser experiment. The code run here is not recorded as a completed mission.

Each command starts a fresh disposable worker: it runs a captured copy of your current source, then your command with the lesson fixtures. Changes are discarded afterward. Commands never save source or award XP. Ctrl+Enter executes the command.

Virtual workspace files

Source and declarative assets are readable here without JavaScript. Python input files are created at runtime; SQL setup initializes the disposable database.

source.py

Current editor source. Inspection shows your current edits.

# Write five constraints with their units.
# Check batch and stream against each.
# Choose one and explain why the other fails.
# Name two tests or risks to follow.

exemple.py

Declarative lesson asset; this is not a file created in the Python filesystem.

requirements={"events_per_day":10000,"max_delay_minutes":10,
              "min_availability":0.99,"max_cost_units":30}
options={
 "nightly_batch":{"capacity":20000,"delay":1440,"availability":0.995,"cost":8,"access_checked":True},
 "continuous_flow":{"capacity":15000,"delay":4,"availability":0.992,"cost":24,"access_checked":True},
}
def fits(plan):
 return (plan["capacity"]>=requirements["events_per_day"]
  and plan["delay"]<=requirements["max_delay_minutes"]
  and plan["availability"]>=requirements["min_availability"]
  and plan["cost"]<=requirements["max_cost_units"]
  and plan["access_checked"])
for name,plan in options.items(): print(name,fits(plan))
print("chosen","continuous_flow")