Those requests all happen independently. We don't make any guarantees about their order, so the library internals are free to reorder them before sending them out. In this case, the first requests you make after you construct the client object cause it to start connecting, so those requests will be queued before sending them out, making them more likely to be reordered.
On Mon, Aug 10, 2020 at 8:51 AM vijeth AG <[email protected]> wrote: > Hi, > > I have started exploring gRPC with Node.js, by basic hello world level > client-server js. > > Code gist snippets and outputs below. > > I have noticed a strange thing If I instantiate a *client* and call > remote function 3/4 times simultaneously, the responses of the calls are > printed in reverse order - Last called rpc prints out first. > > Hello.proto > https://gist.github.com/vijeth-ag/706bb09d9b5e21b29a780ebb355d56ed > > server.js > https://gist.github.com/vijeth-ag/db97b6cacf7e07d3709d4edb2ecb6c29 > > client.js > https://gist.github.com/vijeth-ag/0affe7b04d10b0e0d1cd4771abc16b99 > > Actual output: on running client.js > > 3 Sayhello: Hello 3 > 2 Sayhello: Hello 2 > 1 Sayhello: Hello 1 > > I was expecting in the order 1,2,3 > > Also debugged server.js - the first value received in sayHelloFunction is > 3. > > I if I add delay in between call works in the order 1,2,3 as expected. > > Please Im curious what am I missing. > Thanks in advance > > -- > You received this message because you are subscribed to the Google Groups " > grpc.io" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/grpc-io/d3353aef-9770-45bb-ae75-058e5905f414n%40googlegroups.com > <https://groups.google.com/d/msgid/grpc-io/d3353aef-9770-45bb-ae75-058e5905f414n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CAPK2-4cz0GmtVz07vr9FzAbGpNdtX59hSMk27XERhtnMxxM0eQ%40mail.gmail.com.
smime.p7s
Description: S/MIME Cryptographic Signature
