Thanks Carl, but I'll rephrase  the question.
On the server side,my implementation of 'onNext'  aggregates the streaming 
messages in to some in-memory storage, say Map. No one else is accessing it 
till I get OnCompleted from client. 
Does this map should be ConcurrentMap (in java language)  or regular 
HashMap is enough ?
I'm asking if  each 'onNext' waits completion of previous one before being 
executed or they can be invoked in parallel ?
 


On Wednesday, June 12, 2019 at 7:41:00 PM UTC+3, Carl Mastrangelo wrote:
>
> What that means is that the messages will never be reordered.  You MUST 
> synchronize access to the RPC, either by ensuring only one thread ever 
> accesses it, or adding your own synchronization.  
>
> The comment you see is more in regards to other network stuff (like UDP), 
> where packets can be reordered.  
>
> On Wednesday, June 12, 2019 at 1:38:15 AM UTC-7, Alexander Furer wrote:
>>
>> From the grpc guide "gRPC guarantees message ordering within an 
>> individual RPC call."
>>
>> Given the service definition  
>>
>> rpc LotsOfGreetings(stream HelloRequest) returns (HelloResponse) {}
>>
>> does it mean that implementation of  onNext(HelloRequest request)  does 
>> NOT need to be synchronized ? 
>> In the other words, the onNext(HelloRequest request) is invoked  
>> sequentially one after another ?
>> Thanks
>>
>>
>>

-- 
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/a606b7e6-fc1e-4c28-b599-cee72d23fa20%40googlegroups.com.

Reply via email to