Demo: the same call in REST and gRPC
On This Lesson 3 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
implement inventory's stock check twice and compare. Prepares MID-024-LAB1.
Draft outline details
Step by step
- 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.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.