From the course: Building Java Microservices with gRPC
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Recap to connect user and order services
From the course: Building Java Microservices with gRPC
Recap to connect user and order services
- [Instructor] Now that we have the user and the order services both functioning correctly, the last bit will be, to connect both of these services. So you may think that since both of these services are anyway residing in the same project, why not just call the order dow from the user dow? Fair, but that's not what we want to do. We want to make sure that we use a gRPC call to connect both of these services. As stated already before, we emulated a setup where both of these services are running independently on different ports. And now we will connect them using a gRPC call. So what are we going to do exactly? The first thing is, we will write a gRPC Java client, which is for the order service so now we are going to write the order client class. Once this is done, then we're going to use this client in the user service implementation class. Let's recollect that the UserServiceImpl class already retrieves the user details.…
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)
-