Thank you. I'll check it again.

2018년 1월 5일 금요일 오전 11시 39분 45초 UTC+9, Ken Payson 님의 말:
>
>
>
> On Thu, Jan 4, 2018 at 6:25 PM, <he...@snaps.com <javascript:>> wrote:
>
>> Hi! I'm Heidi.
>> I'm trying to build an api with python.
>> I try to build with grpc.
>> Post the image file to grpc server.
>> The gprc server detects the object by deep-running the requested image 
>> file.
>>
>> First question: How do I transfer an image file to the server?
>>
> The easiest way to do this to convert the image to a string, and create a 
> simple protobuf with a string field.
>
> This might not be practical depending on the size of your images, but its 
> a good place to start.  You can
> explore using a streaming API if your images are too large.
>
>
>> Show me an example.
>> For example, when sending a string:
>> response = stub.SayHello (helloworld_pb2.HelloRequest (name = 'you'))
>>
>>
>> Second question. I want to request grpc server concurrently, not 
>> sequential. What should I do?
>>
>> I run one server .py. Then I run client.py at the same time. But it seems 
>> to be running sequentially.
>> For example, one client.py
>>
>> Second question. I want to request grpc server concurrently, not 
>> sequential. What should I do?
>>
>> I run one server .py. Then I run client.py at the same time. But it seems 
>> to be running sequentially.
>> For example, it takes 1 second to run one client.py.
>> But if you run 3 client.py at the same time, it takes 3 seconds.
>>
>>
>> I want to know how to set up grpc worker or thread. Please let me know 
>> python code example.
>>
>
> Python gRPC servers can handle concurrent requests.  Look at 
> examples/python/helloworld/greeter_server.py for an example:
>
> server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
>
> max_workers is the number of concurrent requests the Python server can 
> handle.
>
> -- 
>> 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+u...@googlegroups.com <javascript:>.
>> To post to this group, send email to grp...@googlegroups.com 
>> <javascript:>.
>> 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/ddcb37cd-371c-41c7-af3c-1ede967f8046%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/grpc-io/ddcb37cd-371c-41c7-af3c-1ede967f8046%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> 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/d/msgid/grpc-io/fe2fb006-1561-4f02-9841-1fdbd4d4c586%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to