واجهات API والأحداث
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
compare request-response APIs with event-driven integration.
الموضوعات المخطط لها
- Synchronous API: caller waits for an answer; simple, immediate, but couples availability.
- Events: a system publishes a fact (order placed); consumers react later; looser coupling and replay.
- Use APIs for queries and commands needing an immediate answer; events for notifications and propagation of facts.
- Events bring ordering, duplicates, and eventual consistency to handle.
تفاصيل المخطط المبدئي
عرض عملي
two flows for stock updates: store scan calls an API versus store scan emits "stock-adjusted" event consumed by inventory and reporting.
اختبر فهمك
What do events cost in return for looser coupling?
أظهر الإجابة
Eventual consistency, duplicates, and ordering concerns.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.