انتقل إلى المحتوى
أمين أبوزيد
MID-023

الحوسبة الموزّعة

  • 6 درس
  • 2 ساعة تدريب (تقدير)
في هذه الصفحة 8 موضوعات

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

نظرة عامة

الموضوعات

  • العُقد (Nodes)
  • زمن استجابة الشبكة
  • الأعطال الجزئية
  • الساعات
  • نماذج الفشل

تعلّم أولًا

2 ساعة تدريب (تقدير)

مخرجات التعلم

  1. List the fallacies of distributed computing and give a failure example for each.
  2. Explain partial failure: why a timeout does not tell you whether the operation happened.
  3. Explain clock skew and why wall-clock timestamps cannot order events across nodes.
  4. Describe crash, omission, and byzantine failure models at a conceptual level.

الدروس

  1. 01المغالطات الثماني
  2. 02أرقام زمن الاستجابة التي يجب أن يعرفها كل مهندس
  3. 03الفشل الجزئي
  4. 04الساعات والترتيب
  5. 05نماذج الفشل
  6. 06عرض عملي: حقن زمن استجابة وفقدان حزم باستخدام Toxiproxy

المختبر والتمارين

Lab

MID-023-LAB1 · Unreliable network

Outcomes: 1–4 · Time: ~2 h

  1. Add Toxiproxy between Shop and its payment provider stub (Docker Compose).
  2. Run scenarios: added latency, timeout shorter than latency, dropped response, connection reset.
  3. After each, compare Shop's order status with the provider's record.
  4. Write the observed inconsistencies and which fallacy or failure model each demonstrates.

Acceptance: list of every inconsistency observed.

Exercises (assessment: failure-scenario quiz; five exercises)

IDOutcomeTask
MID-023-EX011For each of the eight fallacies, write one failure example from Shop.
MID-023-EX022Explain, with a timeline, why a timeout on charge() does not mean the card was not charged.
MID-023-EX033Two services log OrderPlaced and OrderPaid with local timestamps; paid appears earlier. Explain two causes and a fix.
MID-023-EX044Classify: node dies, link drops 5% of packets, node returns corrupted prices.
MID-023-EX051Estimate the minimum latency of a request that makes 8 sequential same-datacentre calls of 1 ms each, and say how to reduce it.
أظهر الحلول
  • EX01 For example: reliable network, lost confirmation; zero latency, N+1 remote calls; secure network, plaintext traffic; topology, stale IP; one administrator, firewall change; zero transport cost, large payload bills; homogeneous, mixed API versions; infinite bandwidth, bulk export slows checkout.
  • EX02 Timeline: request sent, provider charges, reply lost, client times out. Shop cannot distinguish this from a request that never arrived.
  • EX03 Clock skew or NTP correction; fix by ordering with a sequence, a version number, or a single log (e.g. one Kafka partition per order).
  • EX04 Crash; omission; byzantine.
  • EX05 At least 8 ms plus processing; reduce by batching, parallel calls, caching, or merging the calls.

الاختبار

Outcomes: O1 fallacies · O2 partial failure · O3 clocks · O4 failure models.

اختبار ذاتي لك: لا توجد درجات، ولا يُحفظ أو يُرسل أي شيء. اختر إجابة ثم تحقق منها، ويمكنك المحاولة مرة أخرى كما تشاء.

  1. 1"The network is reliable" is a fallacy because:O1
  2. 2Hard-coding a service IP ignores which fallacy?O1
  3. 3A client call times out. What do you know?O2
  4. 4Retrying a non-idempotent charge after a timeout risks:O2
  5. 5The best defence for safe retries is:O2
  6. 6Why can wall-clock timestamps from two nodes not order events?O3
  7. 7To measure elapsed time within one JVM use:O3
  8. 8A node stops and never returns: which model?O4
  9. 9A node sends wrong, conflicting data to different peers:O4
  10. 10A failed response (lost reply) after the server did the work is an example of:O2

الجزء العملي

Five exercises MID-023-EX01 to EX05 plus the lab. Pass: at least four exercises correct and a lab list that names at least three distinct inconsistencies with their causes.

أخطاء شائعة

Treating a timeout as a failure; ordering events by timestamps from different machines.

التقييم

Failure-scenario quiz.

الصلة بالمسار الوظيفي

Every later distributed-systems module.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.