Re: [grpc-io] grpc Dial behavior

2018-02-23 Thread amit . chandak
Thanks Josh. I ended up using the go-grpc-middleware for the interceptor.
Looks like Dial without the WithBlock option indefinitely tries connecting 
(in the background) to the server?? 
During the rpc call, if the connection is not established, the retry logic 
in the middleware, tries connecting again.

Is that a fair understanding of how it works?

Thanks
Amit

On Thursday, February 22, 2018 at 11:22:56 AM UTC-8, Josh Humphries wrote:
>
> It is a persistent connection. But if you only have one backend (or, more 
> importantly, one hostname, such as behind a hardware load balancer and/or 
> proxy), the client does not create redundant connections. So there is some 
> downtime while it re-creates a socket connection after it gets disconnected.
>
> This downtime is usually short, so you can usually get by using a 
> grpc.FailFast(false) call option. The default is fail-fast, which means 
> the RPC fails if a connection is not available. But with that setting 
> false, it will wait for the connection to become available. You should 
> definitely use a timeout when setting fail-fast to false, so it doesn't 
> wait too long for a connection to recover.
>
> You set a timeout via the context, as you would for other I/O that should 
> be deadline-driven or cancellable.
>
> You can use an interceptor to set the timeout for all calls that do not 
> already have a timeout (e.g. apply a default, so that you don't have to 
> specify explicit timeouts everywhere in code). The interceptor can also add 
> the fail-fast call option to every call, so you don't have to do that 
> explicitly everywhere, too.
>
>
> 
> *Josh Humphries*
> jh...@bluegosling.com 
>
> On Thu, Feb 22, 2018 at 1:57 PM,  
> wrote:
>
>> Hi,
>> I have a question regarding the grpc Dial behavior. I have a 
>> server, which as part of the incoming request needs to talk to another 
>> endpoint using grpc. Currently, on the server spawn, it does grpc.Dial to 
>> the other endpoint. and when the request comes, it does a grpc on this 
>> established connection. Two questions:
>>
>> 1. Is the connection via grpc.Dial persistent?
>> 2. On the connection loss to the other endpoint, my grpc requests are 
>> failing
>> err rpc error: code = Unavailable desc = all SubConns are in 
>> TransientFailure
>> Do i need to dial out per request, that sounds expensive as the 
>> connection establishment can take time. I was under the impression that 
>> Dial will indefinitely try to establish the connection. Do i need to 
>> explicitly turn on keepAlive to make that happen?
>>
>> 3. Also, if i want to limit how long the grpc request should take, one 
>> way i know of is via the golang context. I was reading somewhere that the 
>> grpc call itself, you can pass timeout. Which method is preferred?
>>
>> Thanks
>> Amit
>>
>> -- 
>> 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/c499-7a3c-4548-a5ca-028c03d7cc32%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/59438d18-a748-48c7-959f-7dcec4cd86ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] Re: OpenCensus vs. OpenTracing

2018-02-23 Thread dpo via grpc.io
Hi Benjamin,

I am the tech lead for the OpenCensus Java work. As you mention, OpenCensus 
provides both tracing and stats and is a separate project from OpenTracing. 
We have worked in conjunction with the gRPC team to use OpenCensus to 
instrument their code and it is integrated in at this point (has been for a 
while).

I don't know of any plans for gRPC to provide integrated OpenTracing 
support but someone from the gRPC team would need to say definitively.

On Friday, February 23, 2018 at 7:28:41 AM UTC-8, Benjamin Krämer wrote:
>
> I looked a bit into tracing with gRPC lately and I often read about the 
> plans to have OpenCensus directly integrated. It looks that it's already 
> implemented in some platforms (java?). On the other side, there are some 
> platforms in grpc-ecosystem 
>  that implement 
> OpenTracing. So as far as I understood it, OpenCensus is tracing + stats 
> while OpenTracing is just tracing.
>
> Can anyone explain what the concrete plans are for OpenCensus and 
> OpenTracing support? From my point of view, it looks like OpenCensus is the 
> main goal and that OpenTracing is just supported for people that like to 
> use it.
>

-- 
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/544a3359-6e9f-44f9-bf49-e76f13427f75%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] Re: protoc: error while loading shared libraries: libprotobuf.so.9: cannot open shared object file: No s

2018-02-23 Thread 'Carl Mastrangelo' via grpc.io
I think you need to make sure the correct flags are used when running 
configure.  For example, when we build protobuf on Mac, we need to set 
environment variables before configuring protobuf.   For example:

$ CXXFLAGS="-m64" ./configure --disable-shared --prefix=$HOME/protobuf
$ make clean && make && make install


After that, when we run protoc, we use:

$ export CXXFLAGS="-I$HOME/protobuf/include" \
  LDFLAGS="$HOME/protobuf/lib/libprotobuf.a $HOME/protobuf/lib/libprotoc.a"


If you run the `ldd` tool on protoc, you can see if it is properly linked.  
For example, you can see what mine shows:

$ ldd protoc
linux-vdso.so.1 (0x7ffe013ab000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 
(0x7f7e5fbd1000)
libprotobuf.so.15 => /usr/local/lib/libprotobuf.so.15 (0x7f7e5f755000)
libprotoc.so.15 => /usr/local/lib/libprotoc.so.15 (0x7f7e5f2c6000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x7f7e5f0ac000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 
(0x7f7e5ed2a000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x7f7e5ea26000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x7f7e5e80f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7f7e5e47)
/lib64/ld-linux-x86-64.so.2 (0x7f7e5fff2000)


Here's the link to how we build protobuf:

https://github.com/grpc/grpc-java/blob/master/RELEASING.md#mac

On Wednesday, February 21, 2018 at 6:26:33 PM UTC-8, Yang Xia wrote:
>
> Hi, I want to install grpc. First,  I need to install protobuf. Since I do 
> not have root permission ./configure  
>  --prefix=/home/guo.1384/xiayang/protobuf.  "/home/guo.1384/" is my home.
> Then I “make install” . I checked /home/guo.1384/xiayang/protobuf/bin, it 
> shows:
>
> [guo.1384@head bin]$ ls -a
> .  ..  protoc
> I set up lib directory in LD_LIBRARY_PATH and bin dir in PATH.
> I think something is wrong now. Then I want to build grpc. I use "make -j 
> 28  prefix=/home/guo.1384/xiayang/bin/grpc".
> Then it shows:
> protoc: error while loading shared libraries: libprotobuf.so.9: cannot 
> open shared object file: No such file or directory
>
> Could you please help me a little bit?
> Thanks a lot!
>

-- 
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/143381b7-efc0-46bc-babc-e083edd6c196%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] [Bando INPS] Preiscrizioni Aperte

2018-02-23 Thread Bando INPSieme 2018 - Sale Scuola Viaggi
Si prega di inoltrare questa comunicazione 
a tutti i dipendenti

Oltre 37.000 borse di studio estive per i figli dei dipendenti pubblici!

Sai che è uscito il bando per le  Vacanze Studio INPSieme 2018 e Corso di 
Lingue all’Estero?

Tutti gli studenti figli di dipendenti pubblici possono partire per l’Estero e 
l’Italia  per studiare una lingua straniera divertendosi, senza pagare o ad un 
costo bassissimo!


Affrettati, è una grande opportunità! 
La  scadenza  per poter ottenere il contributo è il  2 Marzo 2018. 

Consulta la nostra GUIDA FACILE  per presentare la domanda.
La trovi in allegato a questa e-mail 
Oppure su   

http://tracking.salescuolaviaggi.com/tracking/click?d=gNILWzF5aCwd5YQiAAWbh0fXGEXyGEKa51kZzhOKoaGTTcIc9XhLN8kI5tQzMY9W870ACqB-8uHmTrry0MVHrl7KZvDNoii6XYuiRY62_6qgd5yx51Q_bGpKSgntmDSuy_r1fxbTRhZx7TwiWlYinK01

 Ti offriamo la nostra consulenza gratuita 
Telefonaci allo 0541 1741120 
E-mail inpsieme @salescuolaviaggi.com


In allegato anche la locandina! Per condividere questa opportunità anche con i 
vostri colleghi. 


Fra pochissimo usciranno tutte le destinazioni disponibili, affrettati a 
preiscriverti è completamente gratuito e senza impegno, ma così potrai 
riservare un posto nella tua destinazione preferita senza rischiare di non 
trovare disponibilità.

Visita il nostro sito:
Per Bando INPSieme Estero: 
http://tracking.salescuolaviaggi.com/tracking/click?d=ZB1Mj46cj9_ntbi5EYlWUZZjAIzQbpHKsQBKBd0b5sQKKL3f72I-NoNK0O3CylQbL3UA-gklkKsWng0TAyfeO8Ac-BXVqw2dwqW212f3mtWPDI4m8dkA7NXxbdkpi0S1TD_6JfbFb7xPUQNlPjtMv2hbU64BHoBklxx8AfRq80l30
Per Bando INPSieme Italia: 
http://tracking.salescuolaviaggi.com/tracking/click?d=ZB1Mj46cj9_ntbi5EYlWUZZjAIzQbpHKsQBKBd0b5sQKKL3f72I-NoNK0O3CylQbL3UA-gklkKsWng0TAyfeO5qRPxDG5dfMWZBopsZWTJ87Mfh-wdS99Ti_WeoLGi0Fmj6Gp-tmpmRXs2R2JOW4UUgaN2I3HjC--YQ_ryRbSTKx0
Per Bando Corso di lingue all’Estero: 
http://tracking.salescuolaviaggi.com/tracking/click?d=ttH-t6Rr5tZPTvuJeRa14x9ZdXAul-5xSJCMXwcaGTUNO3FRaMNYgoD3gidqHASU_2gFm8A6M47aaSP1Jkpw_HnpVOZ6irZUUUruUAf4l8MyqF01geugmsRrPskRk6szR38igCeRUGv-g-ijc9kGfx0HmhRqkUWsYdMB-szdcysg-QWFId8mADAqKiDCzyIC_A2




Lo Staff di Sale Scuola Viaggi ti aspetta, scegli noi!

-- 
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/4u3q5cj8ox4i.EDVl-JBvcnxsgpj3bx2fpw2%40tracking.salescuolaviaggi.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] grpc go authority different than other languages implementation

2018-02-23 Thread iman . sadooghi
In order to set HTTP2 authority in go grpc with a secure connection, the 
following function cant be used:

func *WithAuthority*(a string) DialOption .   (in google.golang.org/grpc)

 
The above function only works with an insecure connection. The only way to 
pass the authority is to pass it with the following:

credentials.NewClientTLSFromCert(certpool, serverNameOverride) 

 
Which is overriding the servername that could be used as an authority! 
Could you tell me why the more conventional way which is directly adding 
the authority as an option would not work? this works for other languages 
such as python and java.

Thanks,
Iman 
 

-- 
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/8846fd5d-2413-4af4-9d71-72e25c94e351%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] OpenCensus vs. OpenTracing

2018-02-23 Thread Benjamin Krämer
I looked a bit into tracing with gRPC lately and I often read about the 
plans to have OpenCensus directly integrated. It looks that it's already 
implemented in some platforms (java?). On the other side, there are some 
platforms in grpc-ecosystem 
 that implement 
OpenTracing. So as far as I understood it, OpenCensus is tracing + stats 
while OpenTracing is just tracing.

Can anyone explain what the concrete plans are for OpenCensus and 
OpenTracing support? From my point of view, it looks like OpenCensus is the 
main goal and that OpenTracing is just supported for people that like to 
use it.

-- 
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/e7e98236-3909-4a70-aa23-673ea1a1f74b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[grpc-io] Problems with building grpc

2018-02-23 Thread tehbrut
Hi! I have problems with building grpc for php, I do all step by step as 
https://grpc.io/docs/quickstart/php.html writen there.
But 'make' step failled with

[LD] Linking 
/usr/src/clean_official_grpc/grpc-1.9.1/libs/opt/libgpr.so.5.0.0
/usr/bin/ld: 
/usr/src/clean_official_grpc/grpc-1.9.1/objs/opt/src/core/lib/gpr/log_linux.o: 
relocation R_X86_64_TPOFF32 against 
`_ZZ15gpr_default_logP17gpr_log_func_argsE3tid' can not be used when making 
a shared object; recompile with -fPIC
/usr/src/clean_official_grpc/grpc-1.9.1/objs/opt/src/core/lib/gpr/log_linux.o: 
error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:2954: recipe for target 
'/usr/src/clean_official_grpc/grpc-1.9.1/libs/opt/libgpr.so.5.0.0' failed
make: * [/usr/src/clean_official_grpc/grpc-1.9.1/libs/opt/libgpr.so.5.0.0] 
Error 1

OS: Linux, Debian 8. Can anyone help please?

-- 
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/e7a0e15e-f457-4920-bbdc-09538fd3db6b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.