Technology Mapping &
External Entities

INFO 153B/253B Backend Web Architecture

Week 12: From Patterns to Decisions

Spring 2026 | UC Berkeley School of Information

Today's Agenda

  • Part 1: Technology Mapping — From building blocks to real tools
  • Part 2: External Entities — The forces that shape every system
  • Demo: Design a photo sharing platform (all 7 building blocks)
  • Exploration: Design a food delivery app
The complete framework: External Entities → Building Blocks → Technologies

Last Week's Foundation

Task Blocks

Service
Worker

Storage Blocks

Key Value Store
Queue
Relational DB
File Store
Vector Database

7 building blocks compose every system. But two questions remain:

  1. How do you choose which technology implements each block?
  2. What drives the decision of which blocks to use?

Part 1

Technology Mapping

Pattern-First Technology Choices

Code Writer

"I need to use Redis because everyone uses Redis"

System Thinker

"I need Key Value Store capabilities — Redis fits this pattern"

  • System thinkers start with the pattern, then evaluate technologies
  • This prevents hype-driven decisions and enables objective comparison
  • When a new technology appears, ask: "Which building block does this implement?"

Building Blocks → Technologies

Building Block Technology Options 253B Choice
Service REST (Flask, FastAPI, Express), GraphQL, gRPC, Serverless (Lambda) Flask
Worker Celery, rq, Bull, Sidekiq, AWS SQS, Airflow rq
Key Value Store Redis, Memcached, DynamoDB, ElastiCache
Queue Kafka, RabbitMQ, SQS, Redis Lists, Google Pub/Sub Redis Queue
Relational DB PostgreSQL, MySQL, SQLite, Aurora, Cloud SQL PostgreSQL
File Store AWS S3, Google Cloud Storage, Azure Blob, MinIO
Vector Database Pinecone, Weaviate, pgvector, ChromaDB, Qdrant

Same patterns, many implementations. The building block stays constant.

One Technology, Multiple Building Blocks

A single technology can implement more than one building block pattern.

Redis

Key Value Store
Queue

PostgreSQL

Relational DB
Vector DB (pgvector)

  • This is powerful and dangerous — it creates the Replacement Trap

The Replacement Trap

Without Building Block Clarity

"We need to replace Redis"

  • Must find one technology that does caching AND queuing
  • Complex evaluation, limited options, unnecessary coupling

With Building Block Clarity

"We need a new Key Value Store for caching AND a new Queue for messaging"

  • Memcached for caching + SQS for queuing
  • Simpler, more focused, easier to optimize
Building block clarity turns a confusing migration into two simple decisions.

Choosing Technologies Systematically

  1. Identify ALL building block patterns needed
    "We need this for caching AND queuing" — that's 2 patterns
  2. Single vs specialized technologies
    One tool for both patterns? Or focused tools for each?
  3. Evaluate performance needs
    Latency, throughput, consistency — for EACH pattern
  4. Consider operational complexity
    Team expertise, maintenance burden, monitoring
  5. Evaluate cost
    Infrastructure, licensing, operational overhead
  6. Plan for evolution
    Can patterns be separated later? What are the migration paths?

Why We Chose the 253B Stack

Building Block We Chose Why (Pattern Reasoning)
Service Flask Simple REST, Python-native, minimal boilerplate
Worker rq Lightweight, Python-native, Redis-backed
Queue Redis Queue Simple FIFO, integrates with rq, good for learning
Relational DB PostgreSQL Industry standard, ACID, rich features, free
  • Every choice was driven by the pattern requirement, then filtered by constraints
  • Different constraints (performance, team, scale) → different technologies, same patterns

Common Technology Selection Mistakes

Technology-first thinking
"Let's use Kubernetes!" — Before asking what building blocks you actually need.
Hype-driven decisions
Choosing Kafka because it's trending when a simple Redis Queue would do.
Over-engineering
Kubernetes for a single Service. Kafka for 100 messages/day.
Under-engineering
One PostgreSQL database for everything — caching, queuing, file metadata, search.
Pattern-driven thinking prevents all of these. Start with requirements, not tools.

Patterns Outlast Technologies

Building Block 2005 2015 2025 Pattern
Service CGI / Servlets REST / Express GraphQL / gRPC Request → Response
Key Value Store Memcached Redis DynamoDB Key → Value
Queue JMS RabbitMQ Kafka / Pulsar FIFO messaging
  • Technologies change every ~5 years. Patterns stay for decades.
  • When the next new tool appears, ask: "Which building block pattern does this implement?"
  • You'll be able to evaluate it instantly.

Pattern → Technology in Action

Business Need Building Block Technology Options
Fast user session storage Key Value Store Redis (in-memory) / DynamoDB (managed) / localStorage (client)
Background email sending Worker Celery (Python) / SQS+Lambda (cloud) / rq (simple)
API for mobile app Service REST (simple) / GraphQL (flexible) / gRPC (performance)
"Find similar products" Vector Database Pinecone (managed) / pgvector (familiar) / Weaviate (open-source)
  • Same pattern, different technologies based on constraints
  • Requirements first → Pattern → Technology filtered by team, cost, scale

Technology Mapping: Key Insights

  1. Pattern first, technology second — always
  2. One technology can serve multiple building blocks — be aware of this
  3. The Replacement Trap — building block clarity prevents confused migrations
  4. Use the 6-step framework — systematic decisions, not gut feelings
  5. Technologies change; patterns don't — invest in pattern knowledge
You now know HOW to pick technologies.
Next: what DRIVES the decision of which building blocks to use?

Part 2

External Entities: The Forces That Shape Systems

The Missing Piece

You know the 7 building blocks. You know how to map them to technologies.

But what tells you WHICH building blocks to use?
  • Building blocks are your tools
  • External entities are the job requirements that tell you which tools you need
  • You don't implement external entities — you respond to them

The 3 External Entities

User

Human interactions
Response expectations
Scale patterns
Content creation

External Service

Third-party APIs
Failure patterns
Rate limits
Cost per call

Time

Scheduled tasks
Recurring automation
Expiring data
Business cycles

Every system responds to at least one, usually all three.

System thinkers analyze external entities first, then choose building blocks.

User The Human Force

  • Response time: Users expect <200ms for UI, <3s for heavy operations
  • Real-time needs: Instant messaging, live updates, notifications
  • Scale patterns: Peak hours, concurrent users, viral growth
  • Content types: Text, images, videos, documents they create and consume
253B connection: Every HTTP request to your Flask API is driven by the User entity.
Users expect fast responses → that's why your Service must be quick → that's why heavy work goes to Workers.
  • User expectations drove your Service + Worker split in Week 8
  • User data needs drove your Relational Database choice in Week 7

External Service The Integration Force

  • Failure patterns: Services go down, rate limits hit, timeouts occur
  • Performance variability: Response times fluctuate unpredictably
  • Data requirements: Authentication, transformation, error handling
  • Cost implications: Per-call pricing, batch optimization
Real-world examples: Stripe (payments), SendGrid (email), OpenAI/Claude (AI), Twilio (SMS)
  • External Services are unreliable by nature — they will fail
  • This drives the Worker + Queue pattern for resilient integration
  • Rate limits drive Key Value Store caching to reduce API calls

Time The Relentless Force

  • Scheduled tasks: Daily reports, weekly cleanups, monthly billing
  • Recurring automation: Backups, monitoring, data sync
  • Expiring data: Session tokens, temporary files, cache invalidation
  • Business cycles: Peak hours, seasonal patterns, deadlines
253B connection: Assignment 2's due date reminders are driven by the Time entity.
"If task due within 24 hours, send reminder" — Time drove that Worker + Queue pattern.
  • Time is the only entity that's truly external — it's physics
  • Midnight happens whether your system is ready or not
  • Time requirements drive Worker scheduling and automation patterns

How Entities Drive Building Block Selection

Requirement Driven By Building Block(s)
Fast page loads User Service + Key Value Store (caching)
Retry failed API calls External Service Worker + Queue (retry pattern)
Daily sales report Time Worker (scheduled)
User uploads photos User Service + File Store
Reduce Stripe API calls External Service Key Value Store (cache results)
Expire session tokens Time Key Value Store (TTL)

The Complete System Design Framework

User External Service Time

drive requirements

Service Worker KV Store Queue Relational DB File Store Vector DB

implemented by

Flask • rq • Redis • PostgreSQL • S3 • Pinecone • ...

Entities → Building Blocks → Technologies

External Entities in the AI Era

User Entity Evolves

  • 2010s: Humans via browsers
  • 2020s: Systems via APIs
  • Now: AI agents calling your Service

The pattern stays the same: auth, rate limits, responses

External Service Evolves

  • 2010s: Stripe, Twilio
  • 2020s: OpenAI, Claude APIs
  • Future: Autonomous agent services

The pattern stays the same: retry, rate limit, cache

WHO is on the other side changes. The interface patterns never do.
This is what makes building block thinking AI-proof.

Why This Matters for Your Career

Your Role How This Helps
Product Manager Speak the same language as your engineering team. Understand why "just add this feature" might need a new building block.
Designer / Researcher Understand what's technically feasible. "Real-time updates" means a different architecture than "daily reports."
Software Engineer Justify technical decisions with requirements, not preference. Stand out in design interviews.
Data Scientist / Analyst Understand where your data lives and why. Know what's easy to query vs what needs a pipeline.
Anyone in Tech Users, services, and timelines are how business stakeholders already think. This framework bridges tech and business.
  • You don't need to build these systems to benefit from understanding them
  • The people who understand how systems work make better decisions in every role

Key Takeaways

  1. Pattern first, technology second — building blocks guide technology choices
  2. Watch for the Replacement Trap — one technology can serve multiple patterns
  3. 3 external entities drive all requirements — User, External Service, Time
  4. The complete framework: Entities → Building Blocks → Technologies
  5. This thinking is AI-proof — patterns stay constant regardless of who's on the other end
You now have the complete system design vocabulary:
7 building blocks + 3 external entities + technology mapping

Demo

Designing a Photo Sharing Platform

Demo: Photo Sharing Platform

Let's design Instagram-style photo sharing using the complete framework...

Step 1: Identify External Entities

User

Upload photos
Browse feed
Search content

External Service

Push notifications
CDN for images

Time

Daily digest emails
Cache expiration
Content moderation

(Live demo — draw this step by step on the board)

All 7 Building Blocks in Action

Requirement Entity Building Block Technology
Handle upload & feed requests User Service Flask / FastAPI
Process thumbnails & filters Time Worker Celery / rq
Cache popular feeds User Key Value Store Redis
Coordinate background jobs User Queue Kafka / SQS
Store user profiles & relationships User Relational DB PostgreSQL
Store actual photo files User File Store AWS S3
"Find similar photos" User Vector Database Pinecone / pgvector

One system, all 7 building blocks, driven by 3 external entities.

In-Class Exploration

Design a Food Delivery App

Your Task: Design a Food Delivery App

Scenario: Design the backend for a food delivery service (like DoorDash / Uber Eats).

The 6 Requirements

  1. Customers browse restaurant menus and place orders
  2. Restaurants receive and confirm or reject orders in real-time
  3. Drivers are matched to orders and their location is tracked on a live map
  4. Payment is processed through a third-party service (Stripe)
  5. Push notifications sent for order status updates (confirmed, picked up, delivered)
  6. Weekly sales reports generated for restaurant partners

Exploration Steps

  1. Identify external entities — who/what interacts with this system?
  2. Map requirements to entities — which entity drives each requirement?
  3. Select building blocks — which blocks satisfy each requirement?
  4. Draw the system diagram — show entities, blocks, and data flow
  5. Map technologies — which tech would you choose for each block?
Template: Google Drawings Template
File → Make a Copy, then start designing!

Time: ~40 minutes | Individual work

Hints: Think in Entities First

External Entity Think About...
User Three user types! Customers, restaurants, drivers. Each has different needs.
External Service Stripe for payments, push notification service. What if they fail?
Time Weekly reports. What pattern handles scheduled tasks?

Key Questions

  • Where do restaurant menus and order data live? (Structured + relationships)
  • How do you track driver locations in real-time? (Fast updates + reads)
  • Should payment processing block the order response?
  • Do restaurant photos need a special storage solution?

Show after ~15 minutes if students need a nudge.

What's Next

  • Week 13: System Design Case Studies — applying the framework to real-world systems
  • You now have the complete toolkit:
3 External Entities — what drives your design
7 Building Blocks — how you architect the system
Technology Mapping — which tools you choose

Entities → Blocks → Technologies