عرض عملي: الاستدعاء نفسه في REST وgRPC
في هذا الدرس 3 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
implement inventory's stock check twice and compare. Prepares MID-024-LAB1.
تفاصيل المخطط المبدئي
خطوة بخطوة
- Implement
GET /stock/{sku}ininventorywith Spring MVC and call it fromorders. - Write
inventory.proto; generate stubs with the build plugin. - Implement the gRPC service and call it from
orderswith a deadline of 500 ms. - Compare payload sizes and latency with a quick benchmark (note it is indicative only).
- Planned mistake: renumber a proto field and show the old client reading garbage; restore the number and add a new field instead.
- Stop
inventoryand compare how each client reports the failure.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.