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

حدود الخدمات

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

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

نظرة عامة

الموضوعات

  • التماسك (Cohesion)
  • السياقات المحدودة (Bounded Contexts)
  • ملكية البيانات

تعلّم أولًا

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

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

  1. Identify bounded contexts from language and ownership, not from the database schema.
  2. Assign data ownership so each service owns its data exclusively.
  3. Replace cross-service joins with APIs, events, or local copies.
  4. Evaluate a proposed boundary by coupling and change patterns.

الدروس

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

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

Lab

MID-025-LAB1 · Split Shop

Outcomes: 1–4 · Time: ~3 h

  1. Draw Shop's context map from language and ownership, not from tables.
  2. Extract orders, inventory, and payments into separate services, each with its own database or schema and credentials.
  3. Replace each cross-service join with an API call, an event, a local copy, or a snapshot.
  4. Document the data ownership table and the context map.

Acceptance: no service reads another's tables; context map documented.

Exercises (assessment: boundary review of an unseen system; five exercises)

IDOutcomeTask
MID-025-EX011Given a glossary of a clinic system, propose three bounded contexts and justify them by language.
MID-025-EX022Make a data ownership table for Shop (stock level, price, order status, payment status, customer email).
MID-025-EX033An order-history page joins orders, products, and customers. Propose two replacements and compare them.
MID-025-EX043Design a local copy of customerEmail in notifications: source events, update rule, staleness risk.
MID-025-EX054Evaluate a proposed boundary "UserService, AddressService, PhoneService" by coupling and change patterns.
أظهر الحلول
  • EX01 For example Scheduling (appointment, slot), Clinical (visit, diagnosis), Billing (invoice, claim); "patient" differs per context.
  • EX02 Stock level: inventory; price: catalog; order status: orders; payment status: payments; customer email: customer/identity service. Others read via API or events.
  • EX03 (a) API composition in a gateway; (b) snapshots in order lines plus a local customer name copy. Compare freshness, latency, and coupling.
  • EX04 Consume CustomerEmailChanged events; upsert by customerId; stale for seconds to minutes; fall back to an API call if missing.
  • EX05 Boundary by entity: one change (a profile page) touches three services and needs many calls; merge them into one Customer context.

الاختبار

Outcomes: O1 bounded contexts · O2 data ownership · O3 replacing joins · O4 evaluating boundaries.

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

  1. 1Bounded contexts are best identified from:O1
  2. 2The same word with different meanings in two areas suggests:O1
  3. 3What should contexts share about a product?O1
  4. 4Who may read inventory's tables directly?O2
  5. 5A shared database between services mainly creates:O2
  6. 6Which replaces a cross-service join?O3
  7. 7Why store the unit price in the order line?O3
  8. 8A local copy built from events is:O3
  9. 9A sign of a wrong boundary:O4
  10. 10Boundaries drawn by technical layer (UI service, DB service) are:O4

الجزء العملي

Five exercises MID-025-EX01 to EX05 plus the lab. Pass: at least four exercises correct, no cross-service table access in the lab, and a documented context map.

أخطاء شائعة

Shared databases between services; boundaries drawn by technical layer.

التقييم

Boundary review of an unseen system.

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

Context mapping (SRA-003) and data ownership strategy (SRA-004).

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