[grpc-io] Re: Kubernetes, NodeJS and gRPC

2023-01-19 Thread 'Richard Belleville' via grpc.io
Can you please provide more context? Your headless service should create a 
DNS entry in kubedns as you've described and the kubernetes NodeJS client 
should be able to resolve that DNS entry. Exactly what is the issue you are 
experiencing? 

On Sunday, January 15, 2023 at 9:21:44 PM UTC-8 Sharan Karthikeyan wrote:

> I have created a headless service in kubernetes for gRPC server. But, I'm 
> not able to connect that server in NodeJS client the connection url like 
> this "bbl-org-server.default.svc.cluster.local" -- 
> "..svc.cluster.local". Please help me.
>
> Regards,
> Sharan
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/a34a3e3b-e986-4669-a171-6427821cb22en%40googlegroups.com.


[grpc-io] Re: gRPC python socket_mutator

2023-01-19 Thread 'Richard Belleville' via grpc.io
As I said, you're going very far off-road here. I don't think anyone has 
ever tried this before.

On Monday, January 16, 2023 at 8:42:12 AM UTC-8 Rodrigo Alexandre wrote:

> I have tried that but I was not able to figure out how to make it work. Do 
> you have any code examples of something like that being done?
>
> On Friday, 13 January 2023 at 23:33:24 UTC rbel...@google.com wrote:
>
>> You're going very far off road here, but you'd need to write a C 
>> extension that instantiates a instance of grpc_socket_mutator 
>> 
>>  
>> that implements the functionality that you want, then put the pointer into 
>> a Python int object and pass it as the value in the channel arg.
>>
>> On Tuesday, January 10, 2023 at 4:06:04 PM UTC-8 Rodrigo Alexandre wrote:
>>
>>> Hello everyone,
>>>
>>> I am trying to make a gRPC client to use a specific exit interface.
>>> For that, I am setting the value for the "socket_mutator" in the 
>>> channel_arguments.
>>> I defined a function that takes a socket as an argument and modifies it 
>>> however I receive a:
>>> *TypeError: Expected int, bytes, or behavior, got *
>>>
>>> Does someone know what should I place in the socket_mutator value 
>>> instead?
>>>
>>> Thank you for your time.
>>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/acbbf7ad-8932-480b-bbf9-6e28125d3324n%40googlegroups.com.


[grpc-io] Re: raspberry pi zero

2023-01-19 Thread 'Richard Belleville' via grpc.io
I think what's happening here is the installing is falling back to a 
from-source build because PyPi doesn't have precompiled artifacts for your 
architecture. The compilation process is taking too much memory for your 
machine and the compiler process gets OOM killed with SIGKILL.

Exactly which architecture you have depends on the model of your RasPi 
Zero. An RPi Zero W is ARMv6Z and an RPi Zero 2 W would be ARMv8. 
Regardless, piwheels  should be able to provide 
precompiled artifacts for you.



On Thursday, January 19, 2023 at 4:45:02 AM UTC-8 Neil Butler wrote:

> Hi,
>
> I am trying to install firebase-admin on a raspberry pi zero and when it 
> comes to installing grpcio the installation is killed: 
> [image: image.png]
>
> I have tried using Thonny also and i get "process returned with code -9"
>
> are you aware if this is a known thing with raspberry pi zero/raspberry pi 
> OS?
>
> do you have any idea how I can get it installed?
>
>
> thanks,
>
> n
>
>
> -- 
> Neil Butler,
> PDST Advisor for LCCS
> 0863872433
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/6e519532-aae0-4efa-a359-c82ecc85f73bn%40googlegroups.com.


[grpc-io] raspberry pi zero

2023-01-19 Thread Neil Butler
Hi,

I am trying to install firebase-admin on a raspberry pi zero and when it
comes to installing grpcio the installation is killed:
[image: image.png]

I have tried using Thonny also and i get "process returned with code -9"

are you aware if this is a known thing with raspberry pi zero/raspberry pi
OS?

do you have any idea how I can get it installed?


thanks,

n


-- 
Neil Butler,
PDST Advisor for LCCS
0863872433

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CAOOfsP2HEBU67WN1wbE%2B1i614BNAHzJpsGSkgGOHjS__5az46A%40mail.gmail.com.


[grpc-io] Looking out for information on how to ensure backward compatibilty while removing or adding parameter in proto message

2023-01-19 Thread Sathish S
..

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/be683945-5b2a-42ce-8b7f-22fa758bc24an%40googlegroups.com.


[grpc-io] Re: Stuck due to UNAVAILABLE: Failed ALPN negotiation: Unable to find compatible protocol

2023-01-19 Thread 'Anil Kumar' via grpc.io
Hi There, Could Someone help please. PubSub and BQ are working from same 
environment but only cloud translation while using client library giving 
alpn issue.

Authentication Method : ADC

-- Maven Dependency*



com.google.cloud
libraries-bom
26.2.0
pom
import







com.google.cloud
google-cloud-translate




-- Java Class*
package gcp.translation;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;

// [START translate_v3_translate_text]
// [START translate_v3_translate_text_0]
// Imports the Google Cloud Translation library.
import com.google.cloud.translate.v3.LocationName;
import com.google.cloud.translate.v3.TranslateTextRequest;
import com.google.cloud.translate.v3.TranslateTextResponse;
import com.google.cloud.translate.v3.Translation;
import com.google.cloud.translate.v3.TranslationServiceClient;
import com.google.cloud.translate.v3.TranslationServiceSettings;
import io.grpc.Channel;
import io.grpc.ChannelCredentials;
import io.grpc.ClientInterceptor;
import io.grpc.ClientInterceptors;
import io.grpc.Grpc;
import io.grpc.ManagedChannel;
import io.grpc.TlsChannelCredentials;

// [END translate_v3_translate_text_0]

public class TranslateText {
public static void main(String args[]) throws Exception {   

translateText();

}
  // [START translate_v3_translate_text_1]
  // Set and pass variables to overloaded translateText() method for 
translation.
  public static void translateText() throws IOException {
// TODO(developer): Replace these variables before running the sample.
String projectId = "gcp-spsf-dev";
// Supported Languages: 
https://cloud.google.com/translate/docs/languages
String targetLanguage = "hi";
String text = "Hello Danial, How are you?";
System.out.println("Calling translaton");
translateText(projectId, targetLanguage, text);

  }
  // [END translate_v3_translate_text_1]

  // [START translate_v3_translate_text_2]
  // Translate text to target language.
  public static void translateText(String projectId, String targetLanguage, 
String text)
  throws IOException {

// Initialize client that will be used to send requests. This client 
only needs to be created
// once, and can be reused for multiple requests. After completing all 
of your requests, call
// the "close" method on the client to safely clean up any remaining 
background resources.
  TranslationServiceSettings tsSettings = 
TranslationServiceSettings.newBuilder()
//.setEndpoint("proxy.ups.com:443")
//.setEndpoint("translate-u.p.googleapis.com:443")
//.setEndpoint("localhost:443")
//.setCredentialsProvider(FixedCredentialsProvider
.build();
  TranslationServiceClient translationServiceClient = 
TranslationServiceClient.create(tsSettings);

//try (TranslationServiceClient client = 
TranslationServiceClient.create()) {
  try (TranslationServiceClient client = translationServiceClient) {
  // Supported Locations: `global`, [glossary location], or [model 
location]
  // Glossaries must be hosted in `us-central1`
  // Custom Models must use the same location as your model. 
(us-central1)
  LocationName parent = LocationName.of(projectId, "global");
  
/*
 * ChannelCredentials credentials; credentials =
 * TlsChannelCredentials.newBuilder() .trustManager(new
 * File("/cacert.pem")) .build(); ManagedChannel 
originChannel =
 * Grpc.newChannelBuilderForAddress("proxy.ups.com", 8080, 
credentials).build();
 * ClientInterceptor interceptor = new HeaderClientInterceptor(); 
Channel
 * channel = ClientInterceptors.intercept(originChannel, 
interceptor);
 * 
 * stub = LogStreamerGrpc.newStub(channel);
 */

  // Supported Mime Types: 
https://cloud.google.com/translate/docs/supported-formats
  TranslateTextRequest request =
  TranslateTextRequest.newBuilder()
  .setParent(parent.toString())
  .setMimeType("text/plain")
  .setTargetLanguageCode(targetLanguage)
  .addContents(text)
  .build();

  TranslateTextResponse response = client.translateText(request);

  // Display the translation for each input text provided
  for (Translation translation : response.getTranslationsList()) {
System.out.printf("Translated text: %s\n", 
translation.getTranslatedText());
  }
}
  }
  // [END translate_v3_translate_text_2]
}
// [END translate_v3_translate_text]

- Exception
exception in thread "main" com.g