What means by single response/request(Unary) and stream message(Bi-directional)

113 views
Skip to first unread message

MD ATIF BIN KARIM

unread,
Mar 19, 2022, 6:10:44 PM3/19/22
to grpc.io
I am using the following message in protocol buffer

syntax = "proto3";

package demo_grpc;

message S_Response {
string name = 1;
string street = 2;
string zip = 3;
string city = 4;
string country = 5;

int32 double_init_val = 6;
}

message C_Request {
uint32 choose_area = 1;
string name = 2;
int32 init_val = 3;
}

service AddressBook {
rpc GetAddress(C_Request) returns (S_Response) {}
}

I have set up all of the values for the `C_Request` and pass them to the server where
`S_Response` messages fields are processed and returned back to the client.

My question is--
1/ May I call it a Unary RPC?
2/ I want to in next stage pass a very large data (around 10GB, probably a vector or array
not a file as far I know). And have found that I have to pass it via small chunk. That large
vector related data field will be resided in a single message.
What will be name of this type of RPC(eg: Bidirectional streaming RPC)?

Vinod Lasrado

unread,
Mar 30, 2022, 11:28:17 AM3/30/22
to grpc.io
Hi,
Please refer to the following links for basic understanding of gRPC.


To answer your questions.
1. Yes the example shown is a unary RPC.
2. Depending on implementation it can be server side of client side streaming.

--Vinod
Reply all
Reply to author
Forward
0 new messages