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

سلامة البيانات

  • 7 درس
  • 4 ساعة تدريب (تقدير)
في هذه الصفحة 9 موضوعات

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

نظرة عامة

الموضوعات

  • الثوابت عبر الخدمات (Cross-service invariants)
  • المطابقة (reconciliation)
  • تأثيرات مرة واحدة بالضبط مقابل الضمانات

تعلّم أولًا

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

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

  1. Identify invariants that span services and decide how each is protected or detected.
  2. Explain the difference between exactly-once delivery (unavailable) and exactly-once effects (designable).
  3. Build reconciliation jobs that detect and repair drift between services and external systems (e.g., payment provider).
  4. Design audit trails for financially significant data.

الدروس

  1. 01الثوابت عبر الحدود
  2. 02تأثيرات مرة واحدة بالضبط (Exactly-once effects)
  3. 03المنع والكشف والإصلاح
  4. 04تصميم المطابقة
  5. 05مسارات التدقيق (Audit trails)
  6. 06عرض عملي: مطابقة الطلبات مع مزوّد الدفع
  7. 07عرض عملي: تتبع خصم مزدوج إلى سببه الجذري

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

Lab

SRC-014-LAB1 · Money matches

Outcomes: 1–4 · Time: ~4 h Build a daily reconciliation between orders, payments, and the payment provider's settlement file. Plant three discrepancy types (for example charge without order, order without charge, amount mismatch). Detect and repair them, with audit rows for every repair. Acceptance: report with counts, repairs logged and auditable.

Exercises (assessment: invariant analysis of an unseen workflow)

IDOutcomeTask
SRC-014-EX011List five invariants spanning orders, inventory, and payments, and state prevent, detect, or repair for each.
SRC-014-EX022Explain to a product manager why "exactly-once delivery" is not offered, and what the team builds instead.
SRC-014-EX032Design an idempotent payment call, including key generation, storage, and behavior on timeout.
SRC-014-EX043Write the reconciliation algorithm and the repair rules for the three planted discrepancy types.
SRC-014-EX054Design the audit schema for refunds and write which events must be recorded.
SRC-014-EX061Case (unseen): a workflow with order, stock reservation, payment, shipment. Identify where invariants can break on partial failure.
أظهر الحلول
  • EX01 Examples: payment captured implies order (detect by reconciliation, repair by refund or order creation); stock not negative (prevent with conditional update); order total equals line sum (prevent with a constraint or domain rule); event published implies row committed (prevent with outbox); refund at most captured (prevent in code, detect).
  • EX02 Networks can drop messages or acknowledgments, so senders retry. We make operations idempotent so repeats have one effect.
  • EX03 Key derived from order ID and attempt, persisted before the call; on timeout, retry with the same key or query the provider; store the provider response per key.
  • EX04 Join by provider reference; charge without order: create or refund after review; order without charge: mark unpaid or retry capture; amount mismatch: flag and adjust per policy. All repairs write audit rows and the job is re-runnable.
  • EX05 Columns: actor, time, entity, before and after, reason, correlation ID; append-only; record refund request, approval, provider call, and result.
  • EX06 Partial failures: payment captured but reservation failed; stock reserved but payment failed (release); shipment created but payment reversed. Each needs prevention (saga, outbox) and detection.
  • Outcome 3 is also covered by the lab report and Q06-Q08.

Workplace evidence: a reconciliation or integrity check you introduced and what it found.

الاختبار

Outcomes: O1 cross-service invariants · O2 exactly-once effects · O3 reconciliation · O4 audit trails.

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

  1. 1An invariant is:O1
  2. 2Cross-service invariants need design because:O1
  3. 3Exactly-once delivery over a network is:O2
  4. 4The practical way to get exactly-once effects is:O2
  5. 5A payment retry after timeout should use:O2
  6. 6Reconciliation compares:O3
  7. 7Comparing only totals is risky because:O3
  8. 8A reconciliation repair should:O3
  9. 9An audit trail should be:O4
  10. 10Messaging guarantees remove the need for reconciliation:O1

الجزء العملي

Invariant analysis of an unseen workflow (SRC-014 assessment), plus the SRC-014-LAB1 reconciliation report. Pass: at least 8/10 on the quiz, invariants identified with a control for each, and repairs that are audited.

أخطاء شائعة

Assuming messaging guarantees remove the need for reconciliation; repairs without audit.

التقييم

Invariant analysis of an unseen workflow.

دليل من بيئة العمل

A reconciliation or integrity check you introduced and what it found.

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

Data governance (ARC-030) and compliance (SRA-009).

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