انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهMID-030-L05

عرض عملي: قراءة ما كتبته عبر الخدمات (read-your-writes)

  • الدرس 5 من 5
  • Mid-level
في هذا الدرس 3 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

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

في هذا الدرس

reproduce a stale read after checkout and fix it. Prepares MID-030-LAB1.

تفاصيل المخطط المبدئي

خطوة بخطوة

  1. Place an order through orders; the catalog view of "my recent purchases" is fed by Kafka and lags by a second.
  2. Immediately call GET /my/purchases and observe the new order missing.
  3. Planned mistake: add Thread.sleep(2000) in the client. It works on a quiet laptop and fails under load. Fix: do not guess lag.
  4. Return the created order in the POST response and have the UI merge it into the list until the read model catches up.
  5. Alternative: send the order version with the read; the service waits briefly or falls back to the source of truth.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

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

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

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