Re: [grpc-io] Re: python support multi-thread

2018-10-27 Thread Robert Engels
This explains it https://developers.google.com/protocol-buffers/docs/proto3

Sent from my iPhone

> On Oct 27, 2018, at 2:46 PM, Vaibhav Bedi  wrote:
> 
> can I define the message only in strings not array?
> 
>> On Sun, Oct 28, 2018, 1:07 AM Robert Engels  wrote:
>> Grpc is not serialization. You don’t write objects. You declare messages and 
>> they can be repeated. 
>> 
>> Sent from my iPhone
>> 
>>> On Oct 27, 2018, at 10:45 AM, Vaibhav Bedi  
>>> wrote:
>>> 
>>> can you share some reference link how I can write an array of objects in 
>>> the .proto file?
>>> ᐧ
>>> 
 On Sat, Oct 27, 2018 at 7:36 PM Vaibhav Bedi  
 wrote:
 When I sent the objects using strings.there is no internal mechanism to 
 sent that data in objects. it's giving an error.
 ᐧ
 
> On Sat, Oct 27, 2018 at 7:25 PM Robert Engels  
> wrote:
> I believe if you declare the data as repeated it will automatically use 
> arrays in the bindings. 
> 
>> On Oct 27, 2018, at 8:13 AM, Vaibhav Bedi  
>> wrote:
>> 
>> Thanks for your help. Can you suggest me how to pass an array of objects 
>> to the server in grpc?
>> I saw most of the examples they are using only string.
>> ᐧ
>> 
>>> On Sat, Oct 27, 2018 at 2:05 AM 'Srini Polavarapu' via grpc.io 
>>>  wrote:
>>> On the server you can provide a threadpool like this: 
>>> server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
>>> 
>>> This will spawn a maximum of 10 concurrent threads to handle requests 
>>> in parallel. See this example: 
>>> https://github.com/grpc/grpc/blob/master/examples/python/helloworld/greeter_server.py
>>> 
>>> On the client side, you can create one channel and pass it to your 
>>> worker threads to create stubs on that channel. Worker threads can then 
>>> do concurrent RPCs on their own stubs while using the same channel 
>>> (connection) to the server.
>>> 
>>> 
>>> On Friday, October 26, 2018 at 11:27:51 AM UTC-7, Carl Mastrangelo 
>>> wrote:
 
 +Lidi
 
> On Fri, Oct 26, 2018 at 11:23 AM Vaibhav Bedi  
> wrote:
> Can you share some reference?
> ᐧ
> 
>> On Fri, Oct 26, 2018 at 11:51 PM Vaibhav Bedi  
>> wrote:
>> My problem is
>> I want to write the grpc python multithread code for the 
>> client-server application, both client and server should use
>> threads in order to handle multi-requests at the same time. The 
>> client is simulating a gateway where it uploads data to the server. 
>> This data should be an array of objects.
>> The server is receiving these data and printing them in a 
>> multi-threaded way.
>> 
>> Thank you
>> ᐧ
>> 
>>> On Fri, Oct 26, 2018 at 11:46 PM 'Carl Mastrangelo' via grpc.io 
>>>  wrote:
>>> Yes it does.  If you provide more information about what you want 
>>> to do, we can give a better answer.
>>> 
 On Thursday, October 25, 2018 at 9:11:49 AM UTC-7, 
 rob.vai...@gmail.com wrote:
 hi
  
 I want to know Is grpc python support multi-thread?
>>> 
>>> -- 
>>> You received this message because you are subscribed to a topic in 
>>> the Google Groups "grpc.io" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/grpc-io/TYz7WUUJkiw/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> grpc-io+u...@googlegroups.com.
>>> To post to this group, send email to grp...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/grpc-io.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/grpc-io/31b617e5-629f-473b-8dcf-d9af2d17a0a5%40googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>> 
>> 
>> -- 
>> Sincerely,
>> Vaibhav Bedi
>> Email ID- rob.vai...@gmail.com
>> Contact Number-8950597710
>> Website-http://www.vaibhavbedi.com/
> 
> 
> -- 
> Sincerely,
> Vaibhav Bedi
> Email ID- rob.vai...@gmail.com
> Contact Number-8950597710
> Website-http://www.vaibhavbedi.com/
>>> 
>>> -- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "grpc.io" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/grpc-io/TYz7WUUJkiw/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> grpc-io+unsubscr...@googlegroups.com.
>>> To post to this group, send email to grpc-io@googlegroups.com.
>>> Visit this group at https://groups.goo

Re: [grpc-io] Re: python support multi-thread

2018-10-27 Thread Vaibhav Bedi
can I define the message only in strings not array?

On Sun, Oct 28, 2018, 1:07 AM Robert Engels  wrote:

> Grpc is not serialization. You don’t write objects. You declare messages
> and they can be repeated.
>
> Sent from my iPhone
>
> On Oct 27, 2018, at 10:45 AM, Vaibhav Bedi 
> wrote:
>
> can you share some reference link how I can write an array of objects in
> the .proto file?
> ᐧ
>
> On Sat, Oct 27, 2018 at 7:36 PM Vaibhav Bedi 
> wrote:
>
>> When I sent the objects using strings.there is no internal mechanism to
>> sent that data in objects. it's giving an error.
>> ᐧ
>>
>> On Sat, Oct 27, 2018 at 7:25 PM Robert Engels 
>> wrote:
>>
>>> I believe if you declare the data as repeated it will automatically use
>>> arrays in the bindings.
>>>
>>> On Oct 27, 2018, at 8:13 AM, Vaibhav Bedi 
>>> wrote:
>>>
>>> Thanks for your help. Can you suggest me how to pass an array of objects
>>> to the server in grpc?
>>> I saw most of the examples they are using only string.
>>> ᐧ
>>>
>>> On Sat, Oct 27, 2018 at 2:05 AM 'Srini Polavarapu' via grpc.io <
>>> grpc-io@googlegroups.com> wrote:
>>>
 On the server you can provide a threadpool like this:
 server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))

 This will spawn a maximum of 10 concurrent threads to handle requests
 in parallel. See this example:
 https://github.com/grpc/grpc/blob/master/examples/python/helloworld/greeter_server.py

 On the client side, you can create one channel and pass it to your
 worker threads to create stubs on that channel. Worker threads can then do
 concurrent RPCs on their own stubs while using the same channel
 (connection) to the server.


 On Friday, October 26, 2018 at 11:27:51 AM UTC-7, Carl Mastrangelo
 wrote:
>
> +Lidi
>
> On Fri, Oct 26, 2018 at 11:23 AM Vaibhav Bedi 
> wrote:
>
>> Can you share some reference?
>> ᐧ
>>
>> On Fri, Oct 26, 2018 at 11:51 PM Vaibhav Bedi 
>> wrote:
>>
>>> My problem is
>>> I want to write the grpc python multithread code for the
>>> client-server application, both client and server should use
>>> threads in order to handle multi-requests at the same time. The
>>> client is simulating a gateway where it uploads data to the server. This
>>> data should be an array of objects.
>>> The server is receiving these data and printing them in a
>>> multi-threaded way.
>>>
>>> Thank you
>>> ᐧ
>>>
>>> On Fri, Oct 26, 2018 at 11:46 PM 'Carl Mastrangelo' via grpc.io <
>>> grp...@googlegroups.com> wrote:
>>>
 Yes it does.  If you provide more information about what you want
 to do, we can give a better answer.

 On Thursday, October 25, 2018 at 9:11:49 AM UTC-7,
 rob.vai...@gmail.com wrote:
>
> hi
>
> I want to know Is grpc python support multi-thread?
>
 --
 You received this message because you are subscribed to a topic in
 the Google Groups "grpc.io" group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/grpc-io/TYz7WUUJkiw/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 grpc-io+u...@googlegroups.com.
 To post to this group, send email to grp...@googlegroups.com.
 Visit this group at https://groups.google.com/group/grpc-io.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/grpc-io/31b617e5-629f-473b-8dcf-d9af2d17a0a5%40googlegroups.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>> --
>>> Sincerely,
>>> Vaibhav Bedi
>>> Email ID- rob.vai...@gmail.com
>>> Contact Number-8950597710
>>> Website-http://www.vaibhavbedi.com/
>>>
>>
>>
>> --
>> Sincerely,
>> Vaibhav Bedi
>> Email ID- rob.vai...@gmail.com
>> Contact Number-8950597710
>> Website-http://www.vaibhavbedi.com/
>>
> --
 You received this message because you are subscribed to a topic in the
 Google Groups "grpc.io" group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/grpc-io/TYz7WUUJkiw/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 grpc-io+unsubscr...@googlegroups.com.
 To post to this group, send email to grpc-io@googlegroups.com.
 Visit this group at https://groups.google.com/group/grpc-io.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/grpc-io/46d960d2-fdfa-40ea-8cab-dee05adeceee%40googlegroups.com
 

Re: [grpc-io] Re: python support multi-thread

2018-10-27 Thread Robert Engels
Grpc is not serialization. You don’t write objects. You declare messages and 
they can be repeated. 

Sent from my iPhone

> On Oct 27, 2018, at 10:45 AM, Vaibhav Bedi  wrote:
> 
> can you share some reference link how I can write an array of objects in the 
> .proto file?
> ᐧ
> 
>> On Sat, Oct 27, 2018 at 7:36 PM Vaibhav Bedi  
>> wrote:
>> When I sent the objects using strings.there is no internal mechanism to sent 
>> that data in objects. it's giving an error.
>> ᐧ
>> 
>>> On Sat, Oct 27, 2018 at 7:25 PM Robert Engels  wrote:
>>> I believe if you declare the data as repeated it will automatically use 
>>> arrays in the bindings. 
>>> 
 On Oct 27, 2018, at 8:13 AM, Vaibhav Bedi  
 wrote:
 
 Thanks for your help. Can you suggest me how to pass an array of objects 
 to the server in grpc?
 I saw most of the examples they are using only string.
 ᐧ
 
> On Sat, Oct 27, 2018 at 2:05 AM 'Srini Polavarapu' via grpc.io 
>  wrote:
> On the server you can provide a threadpool like this: 
> server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
> 
> This will spawn a maximum of 10 concurrent threads to handle requests in 
> parallel. See this example: 
> https://github.com/grpc/grpc/blob/master/examples/python/helloworld/greeter_server.py
> 
> On the client side, you can create one channel and pass it to your worker 
> threads to create stubs on that channel. Worker threads can then do 
> concurrent RPCs on their own stubs while using the same channel 
> (connection) to the server.
> 
> 
> On Friday, October 26, 2018 at 11:27:51 AM UTC-7, Carl Mastrangelo wrote:
>> 
>> +Lidi
>> 
>>> On Fri, Oct 26, 2018 at 11:23 AM Vaibhav Bedi  
>>> wrote:
>>> Can you share some reference?
>>> ᐧ
>>> 
 On Fri, Oct 26, 2018 at 11:51 PM Vaibhav Bedi  
 wrote:
 My problem is
 I want to write the grpc python multithread code for the client-server 
 application, both client and server should use
 threads in order to handle multi-requests at the same time. The client 
 is simulating a gateway where it uploads data to the server. This data 
 should be an array of objects.
 The server is receiving these data and printing them in a 
 multi-threaded way.
 
 Thank you
 ᐧ
 
> On Fri, Oct 26, 2018 at 11:46 PM 'Carl Mastrangelo' via grpc.io 
>  wrote:
> Yes it does.  If you provide more information about what you want to 
> do, we can give a better answer.
> 
>> On Thursday, October 25, 2018 at 9:11:49 AM UTC-7, 
>> rob.vai...@gmail.com wrote:
>> hi
>>  
>> I want to know Is grpc python support multi-thread?
> 
> -- 
> You received this message because you are subscribed to a topic in 
> the Google Groups "grpc.io" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/grpc-io/TYz7WUUJkiw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> grpc-io+u...@googlegroups.com.
> To post to this group, send email to grp...@googlegroups.com.
> Visit this group at https://groups.google.com/group/grpc-io.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/grpc-io/31b617e5-629f-473b-8dcf-d9af2d17a0a5%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
 
 
 -- 
 Sincerely,
 Vaibhav Bedi
 Email ID- rob.vai...@gmail.com
 Contact Number-8950597710
 Website-http://www.vaibhavbedi.com/
>>> 
>>> 
>>> -- 
>>> Sincerely,
>>> Vaibhav Bedi
>>> Email ID- rob.vai...@gmail.com
>>> Contact Number-8950597710
>>> Website-http://www.vaibhavbedi.com/
> 
> -- 
> You received this message because you are subscribed to a topic in the 
> Google Groups "grpc.io" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/grpc-io/TYz7WUUJkiw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> grpc-io+unsubscr...@googlegroups.com.
> To post to this group, send email to grpc-io@googlegroups.com.
> Visit this group at https://groups.google.com/group/grpc-io.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/grpc-io/46d960d2-fdfa-40ea-8cab-dee05adeceee%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
 
 
 -- 
 Sincerely,
 Vaibhav Bedi
 Email ID- rob.vaibhavb...@gmail.com
 Contact Number-8950597710
 Website-http://www.vaibhavbedi.com/
 -- 
 You received this message because you are subscribed to the Google Groups 
 "grpc.io" group.
>>

Re: [grpc-io] Re: python support multi-thread

2018-10-27 Thread Vaibhav Bedi
can you share some reference link how I can write an array of objects in
the .proto file?
ᐧ

On Sat, Oct 27, 2018 at 7:36 PM Vaibhav Bedi 
wrote:

> When I sent the objects using strings.there is no internal mechanism to
> sent that data in objects. it's giving an error.
> ᐧ
>
> On Sat, Oct 27, 2018 at 7:25 PM Robert Engels 
> wrote:
>
>> I believe if you declare the data as repeated it will automatically use
>> arrays in the bindings.
>>
>> On Oct 27, 2018, at 8:13 AM, Vaibhav Bedi 
>> wrote:
>>
>> Thanks for your help. Can you suggest me how to pass an array of objects
>> to the server in grpc?
>> I saw most of the examples they are using only string.
>> ᐧ
>>
>> On Sat, Oct 27, 2018 at 2:05 AM 'Srini Polavarapu' via grpc.io <
>> grpc-io@googlegroups.com> wrote:
>>
>>> On the server you can provide a threadpool like this:
>>> server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
>>>
>>> This will spawn a maximum of 10 concurrent threads to handle requests in
>>> parallel. See this example:
>>> https://github.com/grpc/grpc/blob/master/examples/python/helloworld/greeter_server.py
>>>
>>> On the client side, you can create one channel and pass it to your
>>> worker threads to create stubs on that channel. Worker threads can then do
>>> concurrent RPCs on their own stubs while using the same channel
>>> (connection) to the server.
>>>
>>>
>>> On Friday, October 26, 2018 at 11:27:51 AM UTC-7, Carl Mastrangelo wrote:

 +Lidi

 On Fri, Oct 26, 2018 at 11:23 AM Vaibhav Bedi 
 wrote:

> Can you share some reference?
> ᐧ
>
> On Fri, Oct 26, 2018 at 11:51 PM Vaibhav Bedi 
> wrote:
>
>> My problem is
>> I want to write the grpc python multithread code for the
>> client-server application, both client and server should use
>> threads in order to handle multi-requests at the same time. The
>> client is simulating a gateway where it uploads data to the server. This
>> data should be an array of objects.
>> The server is receiving these data and printing them in a
>> multi-threaded way.
>>
>> Thank you
>> ᐧ
>>
>> On Fri, Oct 26, 2018 at 11:46 PM 'Carl Mastrangelo' via grpc.io <
>> grp...@googlegroups.com> wrote:
>>
>>> Yes it does.  If you provide more information about what you want to
>>> do, we can give a better answer.
>>>
>>> On Thursday, October 25, 2018 at 9:11:49 AM UTC-7,
>>> rob.vai...@gmail.com wrote:

 hi

 I want to know Is grpc python support multi-thread?

>>> --
>>> You received this message because you are subscribed to a topic in
>>> the Google Groups "grpc.io" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/grpc-io/TYz7WUUJkiw/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> grpc-io+u...@googlegroups.com.
>>> To post to this group, send email to grp...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/grpc-io.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/grpc-io/31b617e5-629f-473b-8dcf-d9af2d17a0a5%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>> Sincerely,
>> Vaibhav Bedi
>> Email ID- rob.vai...@gmail.com
>> Contact Number-8950597710
>> Website-http://www.vaibhavbedi.com/
>>
>
>
> --
> Sincerely,
> Vaibhav Bedi
> Email ID- rob.vai...@gmail.com
> Contact Number-8950597710
> Website-http://www.vaibhavbedi.com/
>
 --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "grpc.io" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/grpc-io/TYz7WUUJkiw/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> grpc-io+unsubscr...@googlegroups.com.
>>> To post to this group, send email to grpc-io@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/grpc-io.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/grpc-io/46d960d2-fdfa-40ea-8cab-dee05adeceee%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>> Sincerely,
>> Vaibhav Bedi
>> Email ID- rob.vaibhavb...@gmail.com
>> Contact Number-8950597710
>> Website-http://www.vaibhavbedi.com/
>>
>> --
>> 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
>> emai

Re: [grpc-io] Re: python support multi-thread

2018-10-27 Thread Vaibhav Bedi
When I sent the objects using strings.there is no internal mechanism to
sent that data in objects. it's giving an error.
ᐧ

On Sat, Oct 27, 2018 at 7:25 PM Robert Engels  wrote:

> I believe if you declare the data as repeated it will automatically use
> arrays in the bindings.
>
> On Oct 27, 2018, at 8:13 AM, Vaibhav Bedi 
> wrote:
>
> Thanks for your help. Can you suggest me how to pass an array of objects
> to the server in grpc?
> I saw most of the examples they are using only string.
> ᐧ
>
> On Sat, Oct 27, 2018 at 2:05 AM 'Srini Polavarapu' via grpc.io <
> grpc-io@googlegroups.com> wrote:
>
>> On the server you can provide a threadpool like this:
>> server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
>>
>> This will spawn a maximum of 10 concurrent threads to handle requests in
>> parallel. See this example:
>> https://github.com/grpc/grpc/blob/master/examples/python/helloworld/greeter_server.py
>>
>> On the client side, you can create one channel and pass it to your worker
>> threads to create stubs on that channel. Worker threads can then do
>> concurrent RPCs on their own stubs while using the same channel
>> (connection) to the server.
>>
>>
>> On Friday, October 26, 2018 at 11:27:51 AM UTC-7, Carl Mastrangelo wrote:
>>>
>>> +Lidi
>>>
>>> On Fri, Oct 26, 2018 at 11:23 AM Vaibhav Bedi 
>>> wrote:
>>>
 Can you share some reference?
 ᐧ

 On Fri, Oct 26, 2018 at 11:51 PM Vaibhav Bedi 
 wrote:

> My problem is
> I want to write the grpc python multithread code for the client-server
> application, both client and server should use
> threads in order to handle multi-requests at the same time. The client
> is simulating a gateway where it uploads data to the server. This data
> should be an array of objects.
> The server is receiving these data and printing them in a
> multi-threaded way.
>
> Thank you
> ᐧ
>
> On Fri, Oct 26, 2018 at 11:46 PM 'Carl Mastrangelo' via grpc.io <
> grp...@googlegroups.com> wrote:
>
>> Yes it does.  If you provide more information about what you want to
>> do, we can give a better answer.
>>
>> On Thursday, October 25, 2018 at 9:11:49 AM UTC-7,
>> rob.vai...@gmail.com wrote:
>>>
>>> hi
>>>
>>> I want to know Is grpc python support multi-thread?
>>>
>> --
>> You received this message because you are subscribed to a topic in
>> the Google Groups "grpc.io" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/grpc-io/TYz7WUUJkiw/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> grpc-io+u...@googlegroups.com.
>> To post to this group, send email to grp...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/grpc-io.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/grpc-io/31b617e5-629f-473b-8dcf-d9af2d17a0a5%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> Sincerely,
> Vaibhav Bedi
> Email ID- rob.vai...@gmail.com
> Contact Number-8950597710
> Website-http://www.vaibhavbedi.com/
>


 --
 Sincerely,
 Vaibhav Bedi
 Email ID- rob.vai...@gmail.com
 Contact Number-8950597710
 Website-http://www.vaibhavbedi.com/

>>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "grpc.io" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/grpc-io/TYz7WUUJkiw/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> grpc-io+unsubscr...@googlegroups.com.
>> To post to this group, send email to grpc-io@googlegroups.com.
>> Visit this group at https://groups.google.com/group/grpc-io.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/grpc-io/46d960d2-fdfa-40ea-8cab-dee05adeceee%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> Sincerely,
> Vaibhav Bedi
> Email ID- rob.vaibhavb...@gmail.com
> Contact Number-8950597710
> Website-http://www.vaibhavbedi.com/
>
> --
> 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 grpc-io+unsubscr...@googlegroups.com.
> To post to this group, send email to grpc-io@googlegroups.com.
> Visit this group at https://groups.google.com/group/grpc-io.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grpc-io/CALf_L11UN7e4wtmNn5vs9M%2B6

Re: [grpc-io] Re: python support multi-thread

2018-10-27 Thread Robert Engels
I believe if you declare the data as repeated it will automatically use arrays 
in the bindings. 

> On Oct 27, 2018, at 8:13 AM, Vaibhav Bedi  wrote:
> 
> Thanks for your help. Can you suggest me how to pass an array of objects to 
> the server in grpc?
> I saw most of the examples they are using only string.
> ᐧ
> 
>> On Sat, Oct 27, 2018 at 2:05 AM 'Srini Polavarapu' via grpc.io 
>>  wrote:
>> On the server you can provide a threadpool like this: 
>> server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
>> 
>> This will spawn a maximum of 10 concurrent threads to handle requests in 
>> parallel. See this example: 
>> https://github.com/grpc/grpc/blob/master/examples/python/helloworld/greeter_server.py
>> 
>> On the client side, you can create one channel and pass it to your worker 
>> threads to create stubs on that channel. Worker threads can then do 
>> concurrent RPCs on their own stubs while using the same channel (connection) 
>> to the server.
>> 
>> 
>> On Friday, October 26, 2018 at 11:27:51 AM UTC-7, Carl Mastrangelo wrote:
>>> 
>>> +Lidi
>>> 
 On Fri, Oct 26, 2018 at 11:23 AM Vaibhav Bedi  wrote:
 Can you share some reference?
 ᐧ
 
> On Fri, Oct 26, 2018 at 11:51 PM Vaibhav Bedi  
> wrote:
> My problem is
> I want to write the grpc python multithread code for the client-server 
> application, both client and server should use
> threads in order to handle multi-requests at the same time. The client is 
> simulating a gateway where it uploads data to the server. This data 
> should be an array of objects.
> The server is receiving these data and printing them in a multi-threaded 
> way.
> 
> Thank you
> ᐧ
> 
>> On Fri, Oct 26, 2018 at 11:46 PM 'Carl Mastrangelo' via grpc.io 
>>  wrote:
>> Yes it does.  If you provide more information about what you want to do, 
>> we can give a better answer.
>> 
>>> On Thursday, October 25, 2018 at 9:11:49 AM UTC-7, rob.vai...@gmail.com 
>>> wrote:
>>> hi
>>>  
>>> I want to know Is grpc python support multi-thread?
>> 
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "grpc.io" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/grpc-io/TYz7WUUJkiw/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> grpc-io+u...@googlegroups.com.
>> To post to this group, send email to grp...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/grpc-io.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/grpc-io/31b617e5-629f-473b-8dcf-d9af2d17a0a5%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> Sincerely,
> Vaibhav Bedi
> Email ID- rob.vai...@gmail.com
> Contact Number-8950597710
> Website-http://www.vaibhavbedi.com/
 
 
 -- 
 Sincerely,
 Vaibhav Bedi
 Email ID- rob.vai...@gmail.com
 Contact Number-8950597710
 Website-http://www.vaibhavbedi.com/
>> 
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "grpc.io" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/grpc-io/TYz7WUUJkiw/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> grpc-io+unsubscr...@googlegroups.com.
>> To post to this group, send email to grpc-io@googlegroups.com.
>> Visit this group at https://groups.google.com/group/grpc-io.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/grpc-io/46d960d2-fdfa-40ea-8cab-dee05adeceee%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> Sincerely,
> Vaibhav Bedi
> Email ID- rob.vaibhavb...@gmail.com
> Contact Number-8950597710
> Website-http://www.vaibhavbedi.com/
> -- 
> 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 grpc-io+unsubscr...@googlegroups.com.
> To post to this group, send email to grpc-io@googlegroups.com.
> Visit this group at https://groups.google.com/group/grpc-io.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/grpc-io/CALf_L11UN7e4wtmNn5vs9M%2B6N2Z5BWKmqwODntFHjMAnZKukTQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com

Re: [grpc-io] Re: python support multi-thread

2018-10-27 Thread Vaibhav Bedi
Thanks for your help. Can you suggest me how to pass an array of objects to
the server in grpc?
I saw most of the examples they are using only string.
ᐧ

On Sat, Oct 27, 2018 at 2:05 AM 'Srini Polavarapu' via grpc.io <
grpc-io@googlegroups.com> wrote:

> On the server you can provide a threadpool like this:
> server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
>
> This will spawn a maximum of 10 concurrent threads to handle requests in
> parallel. See this example:
> https://github.com/grpc/grpc/blob/master/examples/python/helloworld/greeter_server.py
>
> On the client side, you can create one channel and pass it to your worker
> threads to create stubs on that channel. Worker threads can then do
> concurrent RPCs on their own stubs while using the same channel
> (connection) to the server.
>
>
> On Friday, October 26, 2018 at 11:27:51 AM UTC-7, Carl Mastrangelo wrote:
>>
>> +Lidi
>>
>> On Fri, Oct 26, 2018 at 11:23 AM Vaibhav Bedi 
>> wrote:
>>
>>> Can you share some reference?
>>> ᐧ
>>>
>>> On Fri, Oct 26, 2018 at 11:51 PM Vaibhav Bedi 
>>> wrote:
>>>
 My problem is
 I want to write the grpc python multithread code for the client-server
 application, both client and server should use
 threads in order to handle multi-requests at the same time. The client
 is simulating a gateway where it uploads data to the server. This data
 should be an array of objects.
 The server is receiving these data and printing them in a
 multi-threaded way.

 Thank you
 ᐧ

 On Fri, Oct 26, 2018 at 11:46 PM 'Carl Mastrangelo' via grpc.io <
 grp...@googlegroups.com> wrote:

> Yes it does.  If you provide more information about what you want to
> do, we can give a better answer.
>
> On Thursday, October 25, 2018 at 9:11:49 AM UTC-7,
> rob.vai...@gmail.com wrote:
>>
>> hi
>>
>> I want to know Is grpc python support multi-thread?
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "grpc.io" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/grpc-io/TYz7WUUJkiw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> grpc-io+u...@googlegroups.com.
> To post to this group, send email to grp...@googlegroups.com.
> Visit this group at https://groups.google.com/group/grpc-io.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grpc-io/31b617e5-629f-473b-8dcf-d9af2d17a0a5%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


 --
 Sincerely,
 Vaibhav Bedi
 Email ID- rob.vai...@gmail.com
 Contact Number-8950597710
 Website-http://www.vaibhavbedi.com/

>>>
>>>
>>> --
>>> Sincerely,
>>> Vaibhav Bedi
>>> Email ID- rob.vai...@gmail.com
>>> Contact Number-8950597710
>>> Website-http://www.vaibhavbedi.com/
>>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "grpc.io" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/grpc-io/TYz7WUUJkiw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> grpc-io+unsubscr...@googlegroups.com.
> To post to this group, send email to grpc-io@googlegroups.com.
> Visit this group at https://groups.google.com/group/grpc-io.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grpc-io/46d960d2-fdfa-40ea-8cab-dee05adeceee%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Sincerely,
Vaibhav Bedi
Email ID- rob.vaibhavb...@gmail.com
Contact Number-8950597710
Website-http://www.vaibhavbedi.com/

-- 
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 grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CALf_L11UN7e4wtmNn5vs9M%2B6N2Z5BWKmqwODntFHjMAnZKukTQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [grpc-io] Re: python support multi-thread

2018-10-26 Thread 'Srini Polavarapu' via grpc.io
On the server you can provide a threadpool like this: 
server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))

This will spawn a maximum of 10 concurrent threads to handle requests in 
parallel. See this example: 
https://github.com/grpc/grpc/blob/master/examples/python/helloworld/greeter_server.py

On the client side, you can create one channel and pass it to your worker 
threads to create stubs on that channel. Worker threads can then do 
concurrent RPCs on their own stubs while using the same channel 
(connection) to the server.


On Friday, October 26, 2018 at 11:27:51 AM UTC-7, Carl Mastrangelo wrote:
>
> +Lidi
>
> On Fri, Oct 26, 2018 at 11:23 AM Vaibhav Bedi  > wrote:
>
>> Can you share some reference?
>> ᐧ
>>
>> On Fri, Oct 26, 2018 at 11:51 PM Vaibhav Bedi > > wrote:
>>
>>> My problem is
>>> I want to write the grpc python multithread code for the client-server 
>>> application, both client and server should use
>>> threads in order to handle multi-requests at the same time. The client 
>>> is simulating a gateway where it uploads data to the server. This data 
>>> should be an array of objects.
>>> The server is receiving these data and printing them in a multi-threaded 
>>> way.
>>>
>>> Thank you
>>> ᐧ
>>>
>>> On Fri, Oct 26, 2018 at 11:46 PM 'Carl Mastrangelo' via grpc.io <
>>> grp...@googlegroups.com > wrote:
>>>
 Yes it does.  If you provide more information about what you want to 
 do, we can give a better answer.

 On Thursday, October 25, 2018 at 9:11:49 AM UTC-7, rob.vai...@gmail.com 
 wrote:
>
> hi
>  
> I want to know Is grpc python support multi-thread?
>
 -- 
 You received this message because you are subscribed to a topic in the 
 Google Groups "grpc.io" group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/grpc-io/TYz7WUUJkiw/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 grpc-io+u...@googlegroups.com .
 To post to this group, send email to grp...@googlegroups.com 
 .
 Visit this group at https://groups.google.com/group/grpc-io.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/grpc-io/31b617e5-629f-473b-8dcf-d9af2d17a0a5%40googlegroups.com
  
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>> -- 
>>> Sincerely,
>>> Vaibhav Bedi
>>> Email ID- rob.vai...@gmail.com 
>>> Contact Number-8950597710
>>> Website-http://www.vaibhavbedi.com/
>>>
>>
>>
>> -- 
>> Sincerely,
>> Vaibhav Bedi
>> Email ID- rob.vai...@gmail.com 
>> Contact Number-8950597710
>> Website-http://www.vaibhavbedi.com/
>>
>

-- 
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 grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/46d960d2-fdfa-40ea-8cab-dee05adeceee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [grpc-io] Re: python support multi-thread

2018-10-26 Thread 'Carl Mastrangelo' via grpc.io
+Lidi

On Fri, Oct 26, 2018 at 11:23 AM Vaibhav Bedi 
wrote:

> Can you share some reference?
> ᐧ
>
> On Fri, Oct 26, 2018 at 11:51 PM Vaibhav Bedi 
> wrote:
>
>> My problem is
>> I want to write the grpc python multithread code for the client-server
>> application, both client and server should use
>> threads in order to handle multi-requests at the same time. The client is
>> simulating a gateway where it uploads data to the server. This data should
>> be an array of objects.
>> The server is receiving these data and printing them in a multi-threaded
>> way.
>>
>> Thank you
>> ᐧ
>>
>> On Fri, Oct 26, 2018 at 11:46 PM 'Carl Mastrangelo' via grpc.io <
>> grpc-io@googlegroups.com> wrote:
>>
>>> Yes it does.  If you provide more information about what you want to do,
>>> we can give a better answer.
>>>
>>> On Thursday, October 25, 2018 at 9:11:49 AM UTC-7, rob.vai...@gmail.com
>>> wrote:

 hi

 I want to know Is grpc python support multi-thread?

>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "grpc.io" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/grpc-io/TYz7WUUJkiw/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> grpc-io+unsubscr...@googlegroups.com.
>>> To post to this group, send email to grpc-io@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/grpc-io.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/grpc-io/31b617e5-629f-473b-8dcf-d9af2d17a0a5%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>> Sincerely,
>> Vaibhav Bedi
>> Email ID- rob.vaibhavb...@gmail.com
>> Contact Number-8950597710
>> Website-http://www.vaibhavbedi.com/
>>
>
>
> --
> Sincerely,
> Vaibhav Bedi
> Email ID- rob.vaibhavb...@gmail.com
> Contact Number-8950597710
> Website-http://www.vaibhavbedi.com/
>

-- 
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 grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CAAcqB%2BtD3F-Og_wcE73f4EXa-SN00k9KSCZyQxagLaEcDChzpQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [grpc-io] Re: python support multi-thread

2018-10-26 Thread Vaibhav Bedi
Can you share some reference?
ᐧ

On Fri, Oct 26, 2018 at 11:51 PM Vaibhav Bedi 
wrote:

> My problem is
> I want to write the grpc python multithread code for the client-server
> application, both client and server should use
> threads in order to handle multi-requests at the same time. The client is
> simulating a gateway where it uploads data to the server. This data should
> be an array of objects.
> The server is receiving these data and printing them in a multi-threaded
> way.
>
> Thank you
> ᐧ
>
> On Fri, Oct 26, 2018 at 11:46 PM 'Carl Mastrangelo' via grpc.io <
> grpc-io@googlegroups.com> wrote:
>
>> Yes it does.  If you provide more information about what you want to do,
>> we can give a better answer.
>>
>> On Thursday, October 25, 2018 at 9:11:49 AM UTC-7, rob.vai...@gmail.com
>> wrote:
>>>
>>> hi
>>>
>>> I want to know Is grpc python support multi-thread?
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "grpc.io" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/grpc-io/TYz7WUUJkiw/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> grpc-io+unsubscr...@googlegroups.com.
>> To post to this group, send email to grpc-io@googlegroups.com.
>> Visit this group at https://groups.google.com/group/grpc-io.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/grpc-io/31b617e5-629f-473b-8dcf-d9af2d17a0a5%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> Sincerely,
> Vaibhav Bedi
> Email ID- rob.vaibhavb...@gmail.com
> Contact Number-8950597710
> Website-http://www.vaibhavbedi.com/
>


-- 
Sincerely,
Vaibhav Bedi
Email ID- rob.vaibhavb...@gmail.com
Contact Number-8950597710
Website-http://www.vaibhavbedi.com/

-- 
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 grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CALf_L137JnfXGxUZ-9w9YR1d8usC9%3D7nfhXHk_Y3aOoHs3a%3DVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [grpc-io] Re: python support multi-thread

2018-10-26 Thread Vaibhav Bedi
My problem is
I want to write the grpc python multithread code for the client-server
application, both client and server should use
threads in order to handle multi-requests at the same time. The client is
simulating a gateway where it uploads data to the server. This data should
be an array of objects.
The server is receiving these data and printing them in a multi-threaded
way.

Thank you
ᐧ

On Fri, Oct 26, 2018 at 11:46 PM 'Carl Mastrangelo' via grpc.io <
grpc-io@googlegroups.com> wrote:

> Yes it does.  If you provide more information about what you want to do,
> we can give a better answer.
>
> On Thursday, October 25, 2018 at 9:11:49 AM UTC-7, rob.vai...@gmail.com
> wrote:
>>
>> hi
>>
>> I want to know Is grpc python support multi-thread?
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "grpc.io" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/grpc-io/TYz7WUUJkiw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> grpc-io+unsubscr...@googlegroups.com.
> To post to this group, send email to grpc-io@googlegroups.com.
> Visit this group at https://groups.google.com/group/grpc-io.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grpc-io/31b617e5-629f-473b-8dcf-d9af2d17a0a5%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Sincerely,
Vaibhav Bedi
Email ID- rob.vaibhavb...@gmail.com
Contact Number-8950597710
Website-http://www.vaibhavbedi.com/

-- 
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 grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CALf_L11_DF2kHhnnxQ2i7dtUU7hNsmWe9e5%3DVDrRmxaiUdShLg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] Re: python support multi-thread

2018-10-26 Thread 'Carl Mastrangelo' via grpc.io
Yes it does.  If you provide more information about what you want to do, we 
can give a better answer.

On Thursday, October 25, 2018 at 9:11:49 AM UTC-7, rob.vai...@gmail.com 
wrote:
>
> hi
>  
> I want to know Is grpc python support multi-thread?
>

-- 
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 grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/31b617e5-629f-473b-8dcf-d9af2d17a0a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.