From the course: Building Java Microservices with gRPC
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Define order.proto and generate stubs
From the course: Building Java Microservices with gRPC
Define order.proto and generate stubs
- [Instructor] The last module is going to focus on building the order service in Java using gRPC. Let's go ahead and execute the steps to implement the order service. The steps have been listed on your screen, let's go through them one by one. As I said earlier, the flow will be pretty much the same that we've done in the user service. There are a couple of steps which are a little different, but we will see when we get there. So the first step will be to write the order proto file and generate the steps. So let's go back to the IDE and under the proto folder, I will add a new file. Let's name this order.proto. So this will start with defining the syntax of proto that we want to use, that will be proto3. The next one will be the java_package. So in order to make sure that we are consistent, if you open the user.proto, this is what we did for the user. So for the order, we'll say "com.shopping.stubs.orders." The next…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Define order.proto and generate stubs6m 10s
-
(Locked)
Add database method to get orders8m 17s
-
(Locked)
Add service method to get order details6m 47s
-
(Locked)
Write code to host order service3m 48s
-
(Locked)
Test the order service using the client2m 57s
-
(Locked)
Recap to connect user and order services1m 50s
-
(Locked)
Write a client to call order service5m 14s
-
(Locked)
Call order client from user service7m 44s
-
(Locked)
Test the full flow of order management6m 43s
-
(Locked)
Challenge: Implement add-to-cart use case1m 33s
-
(Locked)
-