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

مقدمة في الخدمات المصغّرة (Microservices)

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

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

نظرة عامة

الموضوعات

  • الفوائد
  • التكاليف
  • حدود الخدمات
  • استقلالية النشر

تعلّم أولًا

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

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

  1. State the benefits of microservices (independent deployment, scaling, ownership) and their costs (network, consistency, operations).
  2. Explain why a modular monolith is often the better first step.
  3. Apply concrete criteria to decide whether a module should become a service.
  4. Recognize a distributed monolith.

الدروس

  1. 01ما تعد به الخدمات المصغّرة
  2. 02ما كلفتها
  3. 03المونوليث الموزّع
  4. 04معايير فصل خدمة
  5. 05عرض عملي: استعراض القرار لكل وحدة في Shop

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

Lab

MID-061-LAB1 · Split decision

Outcomes: 1–4 · Time: ~2 h

  1. Collect evidence for each Shop module: load, change frequency, team ownership, data coupling.
  2. Score each module against the extraction criteria.
  3. Decide which modules to extract, if any.
  4. Record the decision as an ADR: context, criteria, decision, consequences, review date.

Acceptance: ADR reviewed; "not extracting" is an acceptable outcome when justified.

Exercises (assessment: ADR review; five exercises)

IDOutcomeTask
MID-061-EX011Make a two-column table of microservice benefits and the conditions under which each really appears.
MID-061-EX021Take one in-process call in Shop and list everything that must be added when it becomes a network call.
MID-061-EX032Write a short argument for starting with a modular monolith for a 6-person team.
MID-061-EX043A colleague proposes "one service per entity" for Shop. Evaluate it with the criteria.
MID-061-EX054Review a description of 5 services that share a database and release together; name the problem and two fixes.
أظهر الحلول
  • EX01 For example: independent deployment needs independent code and data; scaling needs load evidence; ownership needs several teams.
  • EX02 Timeout, retry with backoff, idempotency, error mapping, authentication, tracing, versioned contract, and a partial-failure path.
  • EX03 Fewer moving parts, one deployment, local transactions, refactoring is cheap, boundaries still enforced by tooling; extract later when drivers appear.
  • EX04 Boundaries by entity ignore bounded contexts and create chatty calls and lockstep changes; apply criteria per capability, not per table.
  • EX05 It is a distributed monolith. Fixes: give each service its own data and API; merge back into a modular monolith where boundaries are unclear.

الاختبار

Outcomes: O1 benefits and costs · O2 modular monolith first · O3 extraction criteria · O4 distributed monolith.

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

  1. 1A true benefit of microservices is:O1
  2. 2A cost of microservices is:O1
  3. 3Replacing a cross-service transaction usually requires:O1
  4. 4Why is a modular monolith often a good first step?O2
  5. 5A valid driver for extracting a service is:O3
  6. 6Before extracting a module you should confirm:O3
  7. 7"Not extracting" as an ADR outcome is:O3
  8. 8A sign of a distributed monolith:O4
  9. 9A common mistake when splitting:O4
  10. 10Splitting "to scale" without data is risky because:O1

الجزء العملي

Five exercises MID-061-EX01 to EX05 plus the lab. Pass: at least four exercises correct and an ADR whose decision follows explicit criteria.

أخطاء شائعة

A service per entity; splitting to "scale" without load data.

التقييم

ADR review.

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

Decomposition decisions (SRC-008) and migrations (SRB-008).

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