[grpc-io] quotapool select error cause crash

2018-03-29 Thread Amandeep Gautam
I am seeing this transient error while using grpc-go (1.10.0-dev) on AIX 
7.2 and gcc-go (go version go1.9 gccgo (GCC) 8.0.0 20171205 (experimental) 
aix/ppc)


goroutine 153 [select]:
google_golang_org_grpc_transport.get.pN42_google_golang_org_grpc_transport.quotaPool
/go/src/google.golang.org/grpc/transport/control.go:191
google_golang_org_grpc_transport.Write.pN44_google_golang_org_grpc_transport.http2Server
/go/src/google.golang.org/grpc/transport/http2_server.go:882
google_golang_org_grpc.sendResponse.pN29_google_golang_org_grpc.Server
/go/src/google.golang.org/grpc/server.go:769
google_golang_org_grpc.processUnaryRPC.pN29_google_golang_org_grpc.Server
/go/src/google.golang.org/grpc/server.go:945
google_golang_org_grpc.handleStream.pN29_google_golang_org_grpc.Server
/go/src/google.golang.org/grpc/server.go:1142
google_golang_org_grpc._nested82
/go/src/google.golang.org/grpc/server.go:637
created by google_golang_org_grpc._nested81
/go/src/google.golang.org/grpc/server.go:635 +316

goroutine 154 [select]:
google_golang_org_grpc_transport.get.pN42_google_golang_org_grpc_transport.quotaPool
/go/src/google.golang.org/grpc/transport/control.go:191
google_golang_org_grpc_transport.Write.pN44_google_golang_org_grpc_transport.http2Server
/go/src/google.golang.org/grpc/transport/http2_server.go:882
google_golang_org_grpc.sendResponse.pN29_google_golang_org_grpc.Server
/go/src/google.golang.org/grpc/server.go:769
google_golang_org_grpc.processUnaryRPC.pN29_google_golang_org_grpc.Server
/go/src/google.golang.org/grpc/server.go:945
google_golang_org_grpc.handleStream.pN29_google_golang_org_grpc.Server
/go/src/google.golang.org/grpc/server.go:1142
google_golang_org_grpc._nested82
/go/src/google.golang.org/grpc/server.go:637
created by google_golang_org_grpc._nested81
/go/src/google.golang.org/grpc/server.go:635 +316

goroutine 155 [select]:
google_golang_org_grpc_transport.get.pN42_google_golang_org_grpc_transport.quotaPool
/go/src/google.golang.org/grpc/transport/control.go:191
google_golang_org_grpc_transport.Write.pN44_google_golang_org_grpc_transport.http2Server
/go/src/google.golang.org/grpc/transport/http2_server.go:882
google_golang_org_grpc.sendResponse.pN29_google_golang_org_grpc.Server
/go/src/google.golang.org/grpc/server.go:769
google_golang_org_grpc.processUnaryRPC.pN29_google_golang_org_grpc.Server
/go/src/google.golang.org/grpc/server.go:945
google_golang_org_grpc.handleStream.pN29_google_golang_org_grpc.Server
/go/src/google.golang.org/grpc/server.go:1142
google_golang_org_grpc._nested82
/go/src/google.golang.org/grpc/server.go:637
created by google_golang_org_grpc._nested81
/go/src/google.golang.org/grpc/server.go:635 +316


There is another issue (https://github.com/grpc/grpc-go/issues/1857) which 
probably discusses similar thing. I am wondering if this should be filed as 
a bug?

Any ideas on how to reproduce this consistently or go about fixing this?

-- 
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/018e19b7-104a-436e-b66c-6b4f6bb79429%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] [C++] How to simulate GO tls config InsecureSkipVerify

2018-03-29 Thread David Audrain
Hi,

My C++ Client tries to connect my dev server using TLS but connection keeps 
failing while checking the dev server certificate.

The go version uses the following workaround to skip the verification:

grpcOpts := []grpc.DialOption{}
creds := credentials.NewTLS({InsecureSkipVerify: *
insecureSkipVerify})
grpcOpts = append(grpcOpts, grpc.WithTransportCredentials(creds))

What is the equivalent with C++ GRPC library?

Should I use *ChannelArguments::SetSslTargetNameOverride* ?

Thank you,
David

-- 
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/c8a9806d-6792-4d36-913c-78647bba1d94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] Re: End2end testing for gRPC client and server?

2018-03-29 Thread Sylvain Le Gall
My production in this case  is a personal GCE VM that I use to 
upload/download my personal backups. This is just a personal project. 

Le jeudi 29 mars 2018 22:25:22 UTC+2, ade...@google.com a écrit :
>
> Hi, Sylvain,
> Can you please clarify what you mean by "as close as possible to 
> production"? Did you mean close to the OnePlatform environment, going 
> through GFE? Is your backend a Google service? 
>
> -Adele
>
> On Tuesday, March 27, 2018 at 5:27:52 AM UTC-7, Sylvain Le Gall wrote:
>>
>> Hi,
>>
>> I have built a gRPC service and I want to test it end2end. My goal is to 
>> be as close as possible to production, but I want to test it locally. 
>>
>> Is there any framework to test this kind of setup?
>>
>> In particular, I want to be able to produce temporary SSL server and 
>> client certificates to simulate a client with credentials connecting to the 
>> server[1]. I would also like to connect to my database (Google Cloud 
>> Datastore), but I plan to use the Google Cloud Datastore emulator[2].
>>
>> Thanks
>> Sylvain
>>
>> [1]: https://grpc.io/docs/guides/auth.html#go
>> [2]: https://cloud.google.com/datastore/docs/tools/datastore-emulator
>>
>

-- 
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/93c1f23d-bf1a-4212-8535-9e6ff5be41af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] Re: End2end testing for gRPC client and server?

2018-03-29 Thread adelez via grpc.io
Hi, Sylvain,
Can you please clarify what you mean by "as close as possible to 
production"? Did you mean close to the OnePlatform environment, going 
through GFE? Is your backend a Google service? 

-Adele

On Tuesday, March 27, 2018 at 5:27:52 AM UTC-7, Sylvain Le Gall wrote:
>
> Hi,
>
> I have built a gRPC service and I want to test it end2end. My goal is to 
> be as close as possible to production, but I want to test it locally. 
>
> Is there any framework to test this kind of setup?
>
> In particular, I want to be able to produce temporary SSL server and 
> client certificates to simulate a client with credentials connecting to the 
> server[1]. I would also like to connect to my database (Google Cloud 
> Datastore), but I plan to use the Google Cloud Datastore emulator[2].
>
> Thanks
> Sylvain
>
> [1]: https://grpc.io/docs/guides/auth.html#go
> [2]: https://cloud.google.com/datastore/docs/tools/datastore-emulator
>

-- 
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/d8842968-c938-44f4-bfc4-1da81e6353b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] Re: ALTS outside of GCP

2018-03-29 Thread jiangtao via grpc.io
Hi Ruslan,

ALTS is not ready for public consumption yet. We could expose ALTS to early 
access customers. 
Note that at this point, ALTS is for use inside GCP, such as authentication 
between two workloads running on GCP or for faster access of Google cloud 
services on GCP. 

So far we do not support ALTS outside GCP. Of course, you can write your 
own handshaker service and plug in whatever handshake protocol you want, 
see handshaker proto 
(https://github.com/grpc/grpc-java/blob/master/alts/src/main/proto/handshaker.proto),
 
and use ALTS gRPC code for record protocol.

Let us know if you are interested in using ALTS on GCP, so that we may give 
you early access.

On Tuesday, March 27, 2018 at 11:49:34 AM UTC-7, Ruslan Nigmatullin wrote:
>
> Hi,
>
> We're evaluating the possibility of using ALTS instead of TLS in our 
> internal infrastructure for visibility and performance reasons.
>
> How ALTS support is positioned from gRPC perspective? Is it GCP 
> implementation detail or you're supporting other companies in using it?
>
> We may need to expose extra API for configuring credentials (e.g. 
> specifying local identity significantly simplifies migration process and 
> it's already exposed in handshake api). Are you comfortable with it?
>
> Thanks,
> Ruslan
>

-- 
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/91cbeafe-d526-43ee-b40d-450ea80746aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] Re: [grpc-java] global exception handler on client-side

2018-03-29 Thread 'Carl Mastrangelo' via grpc.io
Point of clarification:   Stubs throw exceptions, Calls and Call.Listeners 
do not.   The stubs wrap the calls/listeners and convert Status and 
Metadata trailers into an exception, but you don't have to.   

In the code you linked, you can attach a cause to the Status and pass that 
through in your interceptor.   The outer most exception the stub will get 
is a StatusRuntimeException IIRC, but you can walk the causal chain to get 
at your underlying.  (we don't really /throw/ other people's exceptions)

On Thursday, March 1, 2018 at 11:35:58 AM UTC-8, eval...@exadel.com wrote:
>
> Carl,
>
> thanks for reply.
>
> However, I'm a bit confused as I don't see a way to return my custom 
> exception from the listener to the calling code.
> Throwing an exception from onClose simply swallows the exception and makes 
> the call hang forever.
> super.onClose() only accepts status and trailers. So, no way to pass my 
> custom exception.
>
> I added client 
> 
>  
> interceptor to the example project.
>
> Regards,
> Eduard
>
> On Thursday, March 1, 2018 at 9:45:20 PM UTC+3, Carl Mastrangelo wrote:
>>
>> You need to add a ClientInterceptor too.  It will provide a listener 
>> which overrides the onClose(Status, Metadata) method of a 
>> ClientCall.Listener.There, you can check for your metadata row added by 
>> the server, and return the proper type of error to the next listener in 
>> your interceptor chain.
>>
>> On Thursday, March 1, 2018 at 1:10:36 AM UTC-8, eval...@exadel.com wrote:
>>>
>>> Here's the example that shows what I'm trying to achieve - 
>>> https://github.com/cartmanez/grpc-java-by-example/tree/master/error-handling-example
>>> The idea is the following:
>>> I have a set of domain exception known by each microservice. There's a 
>>> mapping domain exception <-> StatusRuntimeException
>>> Server automatically converts domain exception into 
>>> StatusRuntimeException. That's done by server interceptor.
>>> And I'd like to convert it back to domain exception on the client side, 
>>> so that calling code does not need to worry about StatusRuntimeException at 
>>> all and only works with domain exceptions.
>>>
>>> Thanks in advance.
>>>
>>> Regards,
>>> Eduard
>>>
>>> On Wednesday, February 14, 2018 at 10:01:36 PM UTC+3, Carl Mastrangelo 
>>> wrote:

 No updates.   If you can upload your code somewhere, it would be 
 clearer why the interceptor wouldn't work.  

 On Friday, February 9, 2018 at 5:52:34 AM UTC-8, eval...@exadel.com 
 wrote:
>
> Hi!
>
> Any updates on this?
>
> I checked version 1.9.0 and still don't see a way to do exception 
> conversion in an interceptor. 
> I now think of writing my own wrappers for all blocking stubs to 
> perform exception conversion. That would allow not to check status codes 
> across the application and just catch specific exceptions where needed.
> However, having the ability to define an exception transformer 
> globally for grpc client would of course make life easier.
>
> 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/65827f38-bff1-4095-93d5-98e0c2bf2430%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [grpc-io] Safe to modify message object after yielded to a request/response stream? (Python)

2018-03-29 Thread james . oldfield . london
Thanks a lot for responding Nathaniel.

In honesty the use case is very slight simplification to a utility 
generator function. The difference is only a couple of lines, and arguably 
it would be clearer to explicitly create a new request each time anyway. As 
you don't guarantee this behaviour, even if a change is very unlikely, I'll 
just go for the safe option.

Sorry to piggyback something else: I often send binary data and associated 
metadata together over gRPC. The utility function in question is to chunk 
the binary data into a request stream while including the metadata in the 
first request of the stream. It's a pity that gRPC doesn't do something 
like this built-in. I appreciate it's hard given the separation between 
gRPC and protobuf, but I think a slightly leaky API that takes both a 
protobuf and a binary payload (or a named list of binary payloads) would be 
a reasonable compromise. In Python this could even use the buffer protocol 
for near-C++ efficiency (imagine: here's my protobuf and some numpy 
arrays). I notice that TensorFlow solves this problem by having a load of 
custom gRPC code (which I don't understand to be honest!), which I think 
shows a gap in gRPC's API. But I'm not paying for gRPC, so who am I to 
complain :=)


On Thursday, March 29, 2018 at 2:24:38 PM UTC+1, Nathaniel Manista wrote:
>
> This happens to be the case today...
> ... but I don't think it's something that we want to guarantee. What's 
> going on in your use case that has you wanting to clear and reuse the same 
> message rather than just create and yield a new one each time?
> -Nathaniel 
>

-- 
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/035da6c1-717b-443c-815f-3be8ae777287%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [grpc-io] Re: Some questions after seeing the Grpc concepts...

2018-03-29 Thread Josh Humphries
On Thu, Mar 29, 2018 at 3:07 AM, Benjamin Krämer 
wrote:

> Hi, nice that you have a look at gRPC. I will answer your questions one by
> one.
>
>>
>>- RXJS seems like a perfect library to build into this - specifically
>>because it supports returning 1 or a stream of something. Would also 
>> handle
>>the timeout case with RX's built in primitives too. How would one go about
>>modifying a code generator (such as the Node/Browser code) to use RX?
>>And/or is that easy? What language and build environment do I need to get
>>involved in?
>>
>>  You would have to write a plugin for protoc in C. You can use any of the
> existing generators for whatever language you need as a template. Those are
> located here: https://github.com/grpc/grpc/tree/master/src/compiler
>
>>
>>- It mentions HTTP/2 as the transport protocol, which requires SSL,
>>which can lead to issues when you don't have a signed cert. What are the
>>steps to go through when you don't have a cert for localhost development?
>>
>> You can either choose to disable TLS (grpc.credentials.createInsecure())
> or you could create self-signed certs and use those. A good overview gives
> you the official documentation: https://grpc.io/docs/guides/
> auth.html#nodejs
> If you need help on how to create self-signed certs, you can have a look
> at this example for C#. The cert creation process is the same:
> https://stackoverflow.com/a/37739265/3865064
> Just use localhost for %COMPUTERNAME% and %CLIENT-COMPUTERNAME%.
>
>>
>>- If anyone has experience with Vert.x you may know about something
>>called the Event Bus. The event bus lets you connect many peers that all
>>add to the global pool of available microservices... is there anything
>>equivalent to this in GRPC? For example if I have 10 git repos that each
>>add 4 or 5 rpc services, can you connect to a service by ONE main URL or
>>does each URL need to be configured separately? (is there a way to create 
>> a
>>global even bus that the services live on?) Vert.x also provides
>>round-robin features when the same service is deployed to multiple hosts.
>>
>>  I'm sorry but I don't know about Vert.x, but I hope someone else could
> answer this question for you.
>

I am not familiar with Vert.X or its Event Bus, but from the way you
describe it, I believe the answer is "yes". Services in gRPC are different
from servers. A single server can expose many services. When you create a
server, you register one or more services with it. That would be the way to
contribute multiple "microservices" to the same server (at one URL). On the
client, they are easily configured as one URL by creating a single client
connection to that one server. Then you can create different stubs for each
exposed service. Stubs wrap a client connection.

So a service is an interface (set of methods, defined in a proto file). And
a client connection is logical connection to a server (logical because it
could actually be multiple physical connections, like in a case where the
service is load balanced across multiple backend replicas). The two are
orthogonal.


> --
> 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/3e95f225-0dc7-4a0b-b2fc-076c753ee85f%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%2BLn-neLnFx%3DcQS7Bqzv5-1Eb61Xrm4t2qUpy%3DJT21p35Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [grpc-io] Re: Safe to modify message object after yielded to a request/response stream? (Python)

2018-03-29 Thread 'Nathaniel Manista' via grpc.io
On Thu, Mar 29, 2018 at 5:04 AM,  wrote:

> Follow up: Would the answer be any different if I was using the
> non-blocking API:
>
> request_iter = my_iter(RequestType(), data)
> response_future = my_stub.streaming_request.future(request_iter)
>

The answer is currently the same and... it's very hard to imagine that we'd
change it.
-N

-- 
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/CAEOYnAQc53NDxVqxOznguwCnwgLoD_P%2BBF4F%3Dy9qTvf47Opprw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


smime.p7s
Description: S/MIME Cryptographic Signature


Re: [grpc-io] Safe to modify message object after yielded to a request/response stream? (Python)

2018-03-29 Thread 'Nathaniel Manista' via grpc.io
On Thu, Mar 29, 2018 at 4:56 AM,  wrote:

> Consider the following snippet:
>
> def my_iter(some_request, extra_data_list):
> for item in extra_data_list:
> some_request.extra = item
> yield some_request
> some_request.Clear()
>
> # ... some time later ...
> response = my_stub.streaming_request(my_iter(RequestType(), data))
>
> My question is: Is this safe? My concern is that the yielded request
> message object could be sent off to another thread for serialisation, but
> my code could mutate it (to create the next item in the stream) before it
> gets there.
>
> I suspect that the yielded message is serialised to bytes before the
> iterator is allowed to continue, which would mean that this is actually
> safe.
>

This happens to be the case today...

But I'd like to be sure that's what's happening, and is guaranteed.
>

... but I don't think it's something that we want to guarantee. What's
going on in your use case that has you wanting to clear and reuse the same
message rather than just create and yield a new one each time?
-Nathaniel

-- 
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/CAEOYnAR4MMd6h-Kwvq5TVVCFta2PDOP%3DYrivwUAedW4GheuV%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


smime.p7s
Description: S/MIME Cryptographic Signature


[grpc-io] Re: Safe to modify message object after yielded to a request/response stream? (Python)

2018-03-29 Thread james . oldfield . london
Follow up: Would the answer be any different if I was using the 
non-blocking API:

request_iter = my_iter(RequestType(), data)
response_future = my_stub.streaming_request.future(request_iter)

-- 
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/cf6dc7b2-1d49-429d-b660-e919535c6f3b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] Safe to modify message object after yielded to a request/response stream? (Python)

2018-03-29 Thread james . oldfield . london
Consider the following snippet:

def my_iter(some_request, extra_data_list):
for item in extra_data_list:
some_request.extra = item
yield some_request
some_request.Clear()

# ... some time later ...
response = my_stub.streaming_request(my_iter(RequestType(), data))

My question is: Is this safe? My concern is that the yielded request 
message object could be sent off to another thread for serialisation, but 
my code could mutate it (to create the next item in the stream) before it 
gets there.

I suspect that the yielded message is serialised to bytes before the 
iterator is allowed to continue, which would mean that this is actually 
safe. But I'd like to be sure that's what's happening, and is guaranteed.

Many 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/00d348db-4390-45cc-998c-cb7e94434035%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] Re: Some questions after seeing the Grpc concepts...

2018-03-29 Thread Benjamin Krämer
Hi, nice that you have a look at gRPC. I will answer your questions one by 
one.

>
>- RXJS seems like a perfect library to build into this - specifically 
>because it supports returning 1 or a stream of something. Would also 
> handle 
>the timeout case with RX's built in primitives too. How would one go about 
>modifying a code generator (such as the Node/Browser code) to use RX? 
>And/or is that easy? What language and build environment do I need to get 
>involved in?
>
>  You would have to write a plugin for protoc in C. You can use any of the 
existing generators for whatever language you need as a template. Those are 
located here: https://github.com/grpc/grpc/tree/master/src/compiler

>
>- It mentions HTTP/2 as the transport protocol, which requires SSL, 
>which can lead to issues when you don't have a signed cert. What are the 
>steps to go through when you don't have a cert for localhost development?
>
> You can either choose to disable TLS (grpc.credentials.createInsecure()) 
or you could create self-signed certs and use those. A good overview gives 
you the official documentation: https://grpc.io/docs/guides/auth.html#nodejs
If you need help on how to create self-signed certs, you can have a look at 
this example for C#. The cert creation process is the same: 
https://stackoverflow.com/a/37739265/3865064
Just use localhost for %COMPUTERNAME% and %CLIENT-COMPUTERNAME%.

>
>- If anyone has experience with Vert.x you may know about something 
>called the Event Bus. The event bus lets you connect many peers that all 
>add to the global pool of available microservices... is there anything 
>equivalent to this in GRPC? For example if I have 10 git repos that each 
>add 4 or 5 rpc services, can you connect to a service by ONE main URL or 
>does each URL need to be configured separately? (is there a way to create 
> a 
>global even bus that the services live on?) Vert.x also provides 
>round-robin features when the same service is deployed to multiple hosts.
>
>  I'm sorry but I don't know about Vert.x, but I hope someone else could 
answer this question for you.

-- 
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/3e95f225-0dc7-4a0b-b2fc-076c753ee85f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.