الكتابة المزدوجة وبدائلها
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
explain why dual writes corrupt data and what to do instead.
الموضوعات المخطط لها
- Two writes to two systems cannot be atomic; a failure in between leaves them different.
- Retries, ordering, and races create drift that is hard to detect.
- Alternatives: single writer, CDC from the owner, outbox plus events.
- If a temporary dual write is unavoidable, add reconciliation and a deadline.
تفاصيل المخطط المبدئي
عرض عملي
a failure timeline: write to monolith succeeds, write to new service times out; the systems now disagree. Next to it, the outbox version.
اختبر فهمك
Why are dual writes unsafe?
أظهر الإجابة
No atomicity across two systems.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.