[grpc-io] gRPC is it accessible from the external ip?

2018-01-04 Thread heidi
Hi guys.
I want to access the grpc ip in an external environment.

This is my server.py IP configuration.

*server.add_insecure_port ('192. ***. ***. ***: 5000')*


And this is the client.py IP configuration.

*channel = grpc.insecure_channel ('192. ***. ***. ***: 5000')*


Running server.py and client.py on the same machine works fine.
However, I get an error when I use a computer that runs server.py and a 
different external ip.

Is it accessible from the external IP?
If so, how do I set it up?
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 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/bee2f25b-5d9a-4697-a02f-98f7d0357d19%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [grpc-io] python grpc worker or thread setting

2018-01-04 Thread heidi
my server.py code:




from concurrent import futures
import time
import os
import grpc

import helloworld_pb2
import helloworld_pb2_grpc


## my function
from my_function import my_class

_ONE_DAY_IN_SECONDS = 60 * 60 * 24


class Greeter(helloworld_pb2_grpc.GreeterServicer):

  def SayHello(self, request, context):

## run function
a = my_class().detect_face()

return helloworld_pb2.HelloReply(message='Hello, %s!' % request.name)


def serve():
  server = grpc.server(futures.ThreadPoolExecutor(max_workers=20))
  helloworld_pb2_grpc.add_GreeterServicer_to_server(Greeter(), server)
  server_port = os.environ.get('PORT', 50051)
  server.add_insecure_port('[::]:' + str(server_port))
  server.start()


  print(" SERVER RUNNING =")
  try:
while True:
  time.sleep(_ONE_DAY_IN_SECONDS)
  except KeyboardInterrupt:
server.stop(0)

if __name__ == '__main__':

  serve()




Like my code, I set the number of worker to 20.
And I added my function inside SayHello code.
When I run server.py and run client.py, there is no error.
There are 20 workers, but it slows down when I request client.py at the 
same time.

Only three requests at the same time are three times slower.
Thank you.






2018년 1월 5일 금요일 오전 11시 39분 45초 UTC+9, Ken Payson 님의 말:
>
>
>
> On Thu, Jan 4, 2018 at 6:25 PM,  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 .
>> 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/ddcb37cd-371c-41c7-af3c-1ede967f8046%40googlegroups.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/d/msgid/grpc-io/2e5ccc67-4e78-4147-8eec-ac386743fc05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [grpc-io] python grpc worker or thread setting

2018-01-04 Thread heidi
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,  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 .
>> 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/ddcb37cd-371c-41c7-af3c-1ede967f8046%40googlegroups.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/d/msgid/grpc-io/fe2fb006-1561-4f02-9841-1fdbd4d4c586%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [grpc-io] python grpc worker or thread setting

2018-01-04 Thread 'Ken Payson' via grpc.io
On Thu, Jan 4, 2018 at 6:25 PM,  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+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/ddcb37cd-371c-41c7-af3c-1ede967f8046%40googlegroups.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/d/msgid/grpc-io/CAGm2-Y7fVOGnvQtjcs9Oy3OrVzKHFiHJA94mKuhp64vfEfAaTQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] python grpc worker or thread setting

2018-01-04 Thread heidi
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?

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.

-- 
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/ddcb37cd-371c-41c7-af3c-1ede967f8046%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] Re: Does gRPC support password protected SSL keys?

2018-01-04 Thread chris . buffett
For my needs specifically, C++, though ideally this would be supported 
across all languages as part of general SSL support in gRPC.

On Thursday, 4 January 2018 16:37:40 UTC-8, Carl Mastrangelo wrote:
>
> What language?
>
> On Tuesday, December 19, 2017 at 10:23:54 AM UTC-8, chris@gmail.com 
> wrote:
>>
>> Looking to use SSL in my client application. The SSL keys we use are 
>> often passphrase encrypted. Libcurl supports passing in the passphrase as 
>> an option, but I've been unable to find any such option in gRPC.
>>
>

-- 
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/a9a22ba9-9224-4ef2-a51b-292030398564%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] Re: Java Blocking Stub inside StreamObserver

2018-01-04 Thread 'Carl Mastrangelo' via grpc.io
It is safe to block in your async stub.  You just won't get any more 
notifications for that particular stub until you finish blocking.  Other 
RPCs will proceed normally.

On Wednesday, December 27, 2017 at 12:08:23 PM UTC-8, oddbal...@gmail.com 
wrote:
>
> It might also be of use to note that both the blocking and aync stubs are 
> on the same channel. Also, I'm using grpc-java v1.7.0.
>
> On Friday, December 22, 2017 at 12:41:25 PM UTC-5, oddbal...@gmail.com 
> wrote:
>>
>> In my java client, I'm trying to call a blocking stub inside of a 
>> StreamObserver passed to an async stub. Is this allowed? The blocking stub 
>> just blocks forever and I never see the message on the c++ server side.
>>
>

-- 
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/06b4f28e-ac1f-400b-a0bc-7f5b9b4ecf2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] Re: Does gRPC support password protected SSL keys?

2018-01-04 Thread 'Carl Mastrangelo' via grpc.io
What language?

On Tuesday, December 19, 2017 at 10:23:54 AM UTC-8, chris@gmail.com 
wrote:
>
> Looking to use SSL in my client application. The SSL keys we use are often 
> passphrase encrypted. Libcurl supports passing in the passphrase as an 
> option, but I've been unable to find any such option in gRPC.
>

-- 
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/f34c7a81-285c-4fd2-9e83-9f64cecf120f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] Re: Does anyone notice high context switches in grpc 181 compared with grpc 134?

2018-01-04 Thread 'Carl Mastrangelo' via grpc.io
Could you clarify what versions you are talking about, and what amount of 
context switching you are seeing?

On Thursday, December 28, 2017 at 9:30:37 PM UTC-8, weng...@gmail.com wrote:
>
> The throughput is not so high, about 2000 qps.  And java client saw more 
> timeout.
>

-- 
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/e25c8d6c-90ab-4508-b4f1-42423f5a8bd6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] Re: how to flush messages on server

2018-01-04 Thread 'Carl Mastrangelo' via grpc.io
You should cast from the StreamObserver to a CallStreamObserver and only 
send messages when isReady() is true.  You can wait for it to become true 
by setting an isReady handler (look in that class for the exact method 
name). 

On Thursday, December 28, 2017 at 5:05:48 PM UTC-8, 
matt.m...@lucidworks.com wrote:
>
> Hi, 
>
> I have an application which receives messages from a client on a 
> bidirectional channel. There’s a case where I’d quickly stop processing 
> messages on the server’s StreamObserver (after I’ve told the client to stop 
> also), but I’m not sure of what’s actually happening to the already 
> recieved messages in gRPC? I’m assuming they are sitting in some Netty 
> queue. Is there a way to throw out those messages, or am I stuck just 
> processing them all anyway? If the latter is the only way, can I somehow 
> control the queue size so it doesn’t take a potentially long time to run 
> through them all? 
>
> Thanks, 
> - Matt

-- 
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/e993fdee-e408-43e1-b224-898303670585%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] Upcoming CFP Deadline

2018-01-04 Thread 'April Kyle Nassi' via grpc.io
Happy New Year all!

Quick note that there is a big CFP closing soon, for a conference you may
be interested in. First up is the KubeCon/CNC Europe, which is taking place
in Copenhagen this May. The CFP for that one closes on January 12
.
If you'd like to present there, get those submissions in now!

If you're interested in submitting a proposal and would like assistance,
please reach out! Please also let me know if/when you submit a proposal so
we can track the themes submitted.

Thank you!





*April Kyle Nassi, Program Manager*

Google, Inc. | Open Source Strategy | Developer Relations

345 Spear Street, San Francisco, CA 94105


ana...@google.com | @thisisnotapril 

-- 
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/CAAgWDxLC6Vp%2By91Y6ovyF5Y-u4_J-JfQGW7mi8p37t1COVEEGA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [grpc-io] client and server stub not generated grpc-go

2018-01-04 Thread Josh Humphries
For go, you must enable the grpc plugin. This is done via prefix to the
--go_out parameter:

protoc --go_out=*plugins=grpc:*. grpc_tester.proto



*Josh Humphries*
jh...@bluegosling.com

On Thu, Jan 4, 2018 at 2:52 PM, Amandeep Gautam 
wrote:

> I am trying to write a grpc server in go but am unable get the generated
> client and server stub in the file generated by plugin.
> Here is the paste of the file generated: https://pastebin.com/kfi99MxK
>
> From what I have researched, it is because of faulty protobuf installation
> but I am not sure what is exactly wrong and how to debug the root cause.
>
> Any help is appreciated.
>
> --
> 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/7af9bed0-85f9-400e-bd4e-ce65655ed465%40googlegroups.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/d/msgid/grpc-io/CAO78j%2BK8DpU095kjBx9O%3D6DKfN54tm0qd2ppWFkBXQMr%3DJMipw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [grpc-io] Re: gRFC L16 on new API to make gRPC C++ library initialization explicit

2018-01-04 Thread Arpit Baldeva
Hi Yang,

Sorry for the delayed reply. I was on vacation.

Let me restate the problem very simply - Currently, I can't call 
grpc::Server::Shutdown without first making sure that all the "operations" 
are completed first but without calling grpc::Server::Shutdown, the server 
keeps sending me work from if client(s) keep requesting new rpc execution.

The details of my setup are in my earlier reply. If I am missing something 
in the current api that can be used, please let me know. In fact, this 
recent post has the shutdown flow that I really want in Java 
- https://groups.google.com/forum/#!topic/grpc-io/P5BFGoGxkbw 

Some more information on this gRFC discussion that I shared privately 
previously (Just in case someone else also has inputs here).

>>

I create an encapsulation for Rpc object that will have it’s method 
executed in response to the events. The object contains a ServerContext 
which is naturally destroyed when the Rpc object goes out of scope. The Rpc 
object is destroyed when the aysnc done event from grpc is received. All 
the rpcs also queue up their ‘request’ event in completion queue.

 

When my application wants to shutdown, I call the server shutdown routine 
followed by a completion queue shutdown. During this processing, the ‘done’ 
tag is received for queued up rpcs and rpcs in process. There is no other 
way for receiving the ‘done’ tag for these rpcs. So my Rpc object is 
destroyed in parallel. 

 

It should also be noted that grpc can send a “done” event for an rpc while 
an async op for the same rpc is waiting. So when I receive the done tag, I 
wait for the other async ops to finish for the object. Once I know that 
everything is cleaned up, I go ahead and destroy. 
<<


On Friday, December 22, 2017 at 1:22:41 PM UTC-8, Yang Gao wrote:
>
> Hi Arpit,
>
> You did not mention you use grpc_init() before. My understanding of the 
> crash you saw at the destruction of ServerContext is that you have no more 
> grpc_init() covering at that point. And you deleted the server before 
> destroying the ServerContext (rather than just shutdown the server). 
> If that is not the case, then I think my previous thought was not right.
>
>
>
> On Wed, Dec 20, 2017 at 11:33 AM, Arpit Baldeva  > wrote:
>
>> Hi,
>>
>> I have looked at the gRFC and not too sure how it fixes some of the 
>> current issues with library shutdown (you referenced the issues I mentioned 
>> on GitHub/private conversations). 
>>
>> First off, I don't know about other users but I was already forced to use 
>> grpc_init/shutdown in my code (so I am aware of those functions). In my 
>> app, I am setting the tracers using tracer api and the tracers are only 
>> enabled if the grpc_init is called first. So when the application boots up 
>> and I configure my logging, I needed to call grpc_init before doing 
>> anything with server instantiation etc.
>>
>> The main problem I have is I feel like the current apis require too much 
>> management from the integrator and still not 100% safe.
>>
>>  
>>
>> In my setup, I use async api. My main thread processes events/tags while 
>> I have a separate thread to pump the completion queue. Now, suppose I want 
>> to shutdown my server instance. Currently, I can’t call 
>> grpc::Server::Shutdown without making sure that all my existing events in 
>> progress are finished first and I have destroyed every reference to all the 
>> library objects (say ServerContext which theoretically should be 
>> independent of server life time) . However, without calling 
>> grpc::Server::Shutdown, my server may keep on getting new events from new 
>> clients requesting new rpcs. It’d be much easier if I had an api that could 
>> allow me to cancel pending rpcs (the ones that have not been started yet). 
>> At the moment, only way for me to do this would be to keep a list of rpcs 
>> that have not started and manually call serverContext->TryCancel on them.
>>
>>
>> Are you suggesting that with new flow, I can simply call 
>> grpc::server::Shutdown, have it cancel all the pending rpcs/events (some of 
>> which can cause freeing of additional resources like ServerContext) and the 
>> things that are attaching their lifetime to server would instead hang on to 
>> the GrpcLibrary?
>>
>>
>> Thanks. 
>>
>>
>> On Tuesday, December 19, 2017 at 3:48:40 PM UTC-8, Yang Gao wrote:
>>>
>>> Users reported bugs related to this issue. Some of the issues can be 
>>> avoided/worked around by strengthening the requirement or minor tweaks of 
>>> the code.
>>> Some are not so easy to fix without potential performance overhead. The 
>>> internal doc contains a couple of more links of related issues people 
>>> encountered.
>>>
>>> On Tue, Dec 19, 2017 at 3:24 PM, 'Vijay Pai' via grpc.io <
>>> grp...@googlegroups.com> wrote:
>>>
 Hi there,

 I'd very much like to discuss this issue. Switching to explicit 
 initialization increases friction for users, but keeping it the existing 
 way 

Re: [grpc-io] Streamed ve non Streamed services speed

2018-01-04 Thread marcbegemot
thank you so much now it makes perfect sense 

-- 
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/b1875421-0775-440c-98af-ac897ae8d76d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.