How each service communicates in a microservice architecture

Asked 2 years ago, Updated 2 years ago, 93 views

Hello, I'm a student studying micro-service architecture.

I understand that micro-services use containers classified according to the service.

Corresponding https://github.com/GoogleCloudPlatform/microservices-demo

GitHub used each service in various languages, but this service is in different containers, right?

But how do these containers communicate with each other? It says that you use gRPC here, but I can't really relate to it.

Traditional monolithic servers can be automatically stored in db when users enter a specific value by simply connecting db, but in the case of micro-service architecture, it's divided by container, so how can we exchange data with each other?

Please answer me. Thank you for reading it.

microservice docker google-cloud-platform

2022-09-22 18:22

1 Answers

You just have to provide the api and call it'

RPC stands for RemoteProcedureCall. G was developed by Google, so I'm going to put it on it.

The gRPC is just one of several communication methods, and there are many communication solutions.

The key is communication between servers, which means that gRPC can call functions from remote locations.

In the past, corba was used a lot, and soap, which was pushed hard by ms, or rmi and ejb on Java side, are also calling remote services.

So how do we exchange data? Think of a web browser.

If I send http://~~~/query=abcd, can I send the value abcd with query parameter? And then you get the HTML.

Let's just think about it.

If you write down the function name, parameter type, and value in xml and send it to the server, the server can view xml and perform the function. Of course, it is possible because there are function names, parameter types, and values. After performing the function, the result returns xml. What do you think? This way, we can exchange, right? This is how xmlrpc works.

RPCs have multiple solutions and use different methods, but they have the same purpose. It's about requesting and receiving a remote function or service.


2022-09-22 18:22

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.