✅ Master client–server models and layers (Objective 2, Section 17.2).
✅ Apply architectural patterns for real-world systems (Objective 3, Section 17.3).
✅ Design SaaS for web-based access (Objective 4, Section 17.4).
🤔 Quick Quiz: Which IR 6.0 Benefit Applies to SaaS? (2 mins)
⏱️ Timer: 2:00
A. Resource Sharing - Cloud servers support multiple users
B. Concurrency - Multiple processes run simultaneously
C. Fault Tolerance - Redundant systems prevent downtime
D. All of the above
🌍 Mission Context: Your Daily Reality
افهم
University Tool: Critical Thinking Market Test: Understanding Real-World Impact
Right now: You're using 50+ distributed systems without knowing it
🎯 Start With Your Experience (2 mins)
⏱️ Timer: 2:00
(Adapt for online/in-person; use Miro for collaboration or hypotheticals if no device access)
Quick Activity: Open these apps (or view screenshots):
WhatsApp on your phone
WhatsApp Web on your laptop
Your online banking app
Do This: Send a WhatsApp message from phone - watch it appear instantly on web!
Check: Your bank balance is same on app and website!
Notice: Same data, multiple devices, instant sync. How?!
💥 The WhatsApp Phenomenon
• 2 billion users across 180 countries
• Messages sync instantly across all devices
• Never loses data even when servers crash
• 100 billion messages daily
🤔 Quick Poll: What makes WhatsApp a distributed system?
A. It has many users
B. Multiple computers work together as one
C. It uses the internet
D. It's a mobile app
📚 What IS a Distributed System?
افهم
University Tool: Analytical Reasoning Market Test: Identifying Practical Applications
🔍 Discover It Yourself (3 mins)
⏱️ Timer: 3:00
(Adapt for online/in-person)
With your neighbor, classify these scenarios:
Scenario
Distributed? (Yes/No)
Why?
MS Word on laptop
?
Your answer...
Google Docs
?
Your answer...
Calculator app
?
Your answer...
Uber app
?
Your answer...
MS Word: No - Single machine
Google Docs: Yes - Multiple servers, real-time collaboration
Calculator: No - Local processing
Uber: Yes - Drivers, riders, servers connected
Coulouris et al. (2011): "A collection of independent computers that appears to users as a single coherent system"
Market Reality: Failure to sync data (e.g., Absher outage) costs millions in trust and revenue.
🚀 Benefits of Distribution
افهم
University Tool: Problem-Solving Market Test: Evaluating Scalability Solutions
🎮 Live Simulation: The Instagram Problem (5 mins)
⏱️ Timer: 5:00
(Adapt for online/in-person; simulate with code in GitHub Classroom)
Scenario: You're building Saudi Instagram clone
Day 1: 100 users = Works great on 1 server!
Month 1: 10,000 users = Server getting slow...
Month 3: 1 million users = CRASH! 💥
Options (Vote with your neighbor):
A) Buy a SUPER computer ($10 million)
B) Tell users to wait their turn
C) Use multiple normal computers
D) Give up
Why Option C? Using multiple computers enables scalability, fault tolerance, and cost efficiency. A supercomputer (A) is expensive and a single point of failure. Waiting (B) loses users (e.g., 20% churn in Saudi apps). Giving up (D) is not an option.
Market Reality: STC scaled its cloud services using distributed servers, handling 10M+ users without downtime.
Market Reality: Choosing the wrong pattern (e.g., P2P for Absher) could lead to regulatory fines and downtime.
👑
Master-Slave
One coordinator Many workers
📱
Two-Tier C/S
Simple client-server Direct connection
🏢
Multi-Tier
Layered servers Web apps
🧩
Components
Service-based Microservices
🔗
P2P
No central authority Equal peers
👑 Master-Slave Architecture
اتقن
Figure 17.7: Traffic Management System
(Alt text: Sensors to Master Control to Actuators diagram)
📡
Sensors
Collect data
→
🎛️
MASTER
Control Room
→
🚦
Actuators
Traffic lights
import asyncio
class TrafficMaster:
async def controlLoop(self, sensors, lights):
while True: # Collect from all slaves
data = await asyncio.gather(*[s.collect() for s in sensors]) # Master makes decisions
cmds = self.analyzeTraffic(data) # Control all slaves
await asyncio.gather(*[l.execute(cmd) for l, cmd in zip(lights, cmds)])
Case Study: Aramco Pipeline Control
Aramco uses master-slave for oil pipeline monitoring, ensuring real-time control with 99.99% uptime.
Production Checklist:
✓ Ensure low-latency sensor data (under 100ms)
✓ Implement redundant masters
✓ Monitor slave health continuously
🏢 Multi-Tier Architecture
اتقن
Figure 17.10: Banking System Architecture
(Alt text: Four tiers: Presentation, Web Server, Application, Database)
Tier 1: Presentation
🌐
Web browsers, Mobile apps
HTML/CSS/JavaScript
React/Angular
Swift/Kotlin
Tier 2: Web Server
🖥️
HTTP handling, Static content
Apache/Nginx
Load balancing
SSL termination
Tier 3: Application
⚙️
Business logic, Processing
Java/Python/C#
Microservices
API endpoints
Tier 4: Database
💾
Data storage, Transactions
Oracle/PostgreSQL
MongoDB
Redis cache
Case Study: Al Rajhi Bank
Al Rajhi Bank uses multi-tier for online banking, handling 10M transactions daily.
Architecture Details:
Load balancer: HAProxy with 5 web servers
Application tier: 20 microservices
Database: Oracle RAC with real-time replication
🔗 Peer-to-Peer Architecture
اتقن
🔗 Experience P2P: Human BitTorrent (5 mins)
⏱️ Timer: 5:00
(Adapt for online/in-person; describe if physical sharing not possible)
Teacher has original document (seeder)
Tears it into 4 pieces
Gives pieces to 4 different students
Students share pieces with neighbors
Everyone reconstructs full document
Notice: Teacher can leave, sharing continues! No central control!
const WebTorrent = require('webtorrent')
const client = new WebTorrent()
NEOM explores P2P for IoT device communication, reducing latency by 40%.
Implementation:
10,000+ sensors sharing data directly
No central point of failure
Self-healing network topology
🤔 Why doesn't Saudi government use P2P for services?
A. Too expensive
B. Security & control requirements
C. Too slow
D. Old technology
☁️ Software as a Service
ميز
🚀 Quick Check: Count Your SaaS (30 seconds)
⏱️ Timer: 0:30
How many SaaS do you use?
Gmail/Outlook
Google Docs/Office 365
Netflix/Shahid
Spotify/Anghami
Canvas/Blackboard
Zoom/Teams
Instagram/TikTok
University Tool: System Architecture Market Test: Delivering Scalable Solutions
🗿 Design Challenge: University SaaS (5 mins)
⏱️ Timer: 5:00
(Budget: $1M; Scale: 1M students)
Build "Canvas for Saudi Universities":
Multi-tenancy: Separate KSU from KAUST data
Customization: University-specific branding
Scale: 1M students
Updates: Deploy without downtime
Use AWS multi-tenant design with VPCs for isolation, CSS for branding, auto-scaling groups, blue-green deployments.
Market Reality: Downtime during updates could disrupt 100K+ students, costing universities reputation and revenue.
Modern Trends (Kleppmann, 2017; AWS Well-Architected, 2024):
Serverless: AWS Lambda for Hajj notifications
Edge Computing: CDNs for low-latency Hajj apps
🇸🇦 Saudi's Distributed Revolution
ميز
Vision 2030: Transform Saudi Arabia into a global digital hub through distributed excellence
2025+ NEOM smart city pilots
🕋 Hajj Systems
3M+
Concurrent users
100K requests/second
Multi-tier architecture
Zero downtime requirement
🏛️ Digital Government
300+
Integrated services
Absher platform
Unified authentication
Cloud infrastructure
🏙️ NEOM
100%
Smart city coverage
Edge computing
IoT everywhere
AI-driven services
☁️ Saudi Cloud
$10B
Investment by 2030
Data sovereignty
Regional hub
Green computing
Innovation Showcase
STC's cloud platform supports 15M users with 99.999% uptime.
💼 Your Distributed Systems Career Path
ميز
12-Month Roadmap to Excellence
Months 1-3: Foundation
Master Chapter 17 concepts
Docker basics (docker.com)
Build first distributed app
Months 4-6: Cloud Skills
AWS certification
Microservices architecture
API design patterns
Months 7-9: Real Experience
Internship (e.g., SDAIA.ai)
Open-source contribution
Build portfolio
Months 10-12: Leadership
Lead project
Present at conferences
Mentor juniors
Relationship Building
Network with Saudi tech leaders at Riyadh Season tech events.
Saudi Career Opportunities
Company
Role
Salary (SAR)
Growth
NEOM
Distributed Systems Engineer
350,000+
Extreme
Aramco
Cloud Architect
320,000
Very High
STC
Network Engineer
280,000
High
Al Rajhi Bank
Backend Developer
250,000
High
🎓 Bridging University to Market
ميز
الجامعة تعلمك (University Teaches You)
كيف تفكر (How to think)
مبدأ الالتزام (Commitment)
الانضباط (Discipline)
تغيير القناعات (Changing convictions)
المسؤولية (Responsibility)
كيف تعلم نفسك (Self-learning)
التفكير الناقد (Critical thinking)
احترام العلماء (Respect for scholars)
احترام وجهات النظر (Respect for viewpoints)
السوق يعلمك (Market Teaches You)
النتائج أهم من الكلام (Results over words)
الوقت = فلوس (Time = money)
المخاطرة جزء من اللعبة (Risk is part of the game)
التعلم ما يوقف بعد التخرج (Learning never stops)
العلاقات تساوي رأس مال (Relationships equal capital)
الفشل مكلف لكنه معلم عظيم (Failure is costly but a great teacher)
التميز الحقيقي يظهر في التنفيذ لا في الأفكار (Excellence in execution)
University gives the intellectual framework: Research, critique, commit, build thinking basics.
Market tests results: Can you turn knowledge into tangible outcomes?
Bridge: University is theoretical → teaches tools. Market is applied → tests outputs.
Reality: University prepares you for the race; the market is the field where you prove you can run.
📝 Assignment: Design National System
ميز
Design a complete distributed system for Saudi Arabia's future
Choose ONE National Challenge:
🏥 Unified health records (30M citizens)
🎓 National education platform (6M students)
🚗 Smart traffic management (Riyadh)
⚡ National energy grid monitoring
🌾 Agricultural IoT network
Deliverables (EMAM Framework)
Phase
Weight
Requirements
Rubric
افهم
20%
Problem analysis, 6 design issues
Clear analysis with Saudi examples – 10/20; Depth – 10/20
مارس
30%
Client-server design, interaction model
Practical design with code – 15/30; Feasibility – 15/30
اتقن
30%
Architecture selection, implementation
Pattern choice with trade-offs – 15/30; Production-ready – 15/30
ميز
20%
SaaS model, Vision 2030 alignment
Innovation (e.g., serverless) – 10/20; Saudi goals – 10/20
Submission Requirements
Due: Next week
Format: PDF + GitHub repo
Must include: 3+ nodes, scalability analysis
Bonus: 5-min video, AI integration (e.g., ML for traffic prediction)
AI Guidance for Bonus
Use TensorFlow (tensorflow.org) or PyTorch (pytorch.org) for ML integration. Example for traffic prediction in Master-Slave:
import tensorflow as tf
model = tf.keras.Sequential([
tf.keras.layers.Dense(64, activation='relu', input_shape=(10,)),
tf.keras.layers.Dense(1)
])
model.compile(optimizer='adam', loss='mse') # Train on traffic data (e.g., sensor inputs) # Use in TrafficMaster.analyzeTraffic()
Case Study: Aramco's pipeline failure in 2023 cost $10M due to poor scalability planning.
🎯 Key Takeaways - Chapter 17 Mastery
Summary: "Distributed systems enable resource sharing, openness, concurrency, scalability, and fault tolerance through various architectural patterns" (Coulouris et al., 2011)
🧠 Core Concepts
• Definition, benefits
• Design issues
• Security
💬 Communication
• RPC vs Messages
• Middleware
• Client-server
🗿 Architectures
• 5 patterns
• Trade-offs
• Selection criteria
☁️ Modern Trends
• SaaS, cloud
• Saudi context
• (Kleppmann, 2017)
Success Formula
Technical Excellence + Islamic Values + Saudi Vision + Global Standards = Your Impact
Self-Reflection Prompts
On a scale of 1-5, how confident are you in P2P architectures? Why?
Rate your EMAM mastery (1-5 each).
How will you apply university critical thinking to market execution?