grpc / grpc/grpc-java

Provide Attribute for i.n.c.unix.PeerCredentials when using EpollDomainSocketChannel

Aperta
#2,646 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Java
Stelle
12.1k
Fork
4k
Merge medio
2g 17h
PR unite (30g)
37

Descrizione

Please answer these questions before submitting your issue.

### What version of gRPC are you using?
grpc 1.0.3

### What JVM are you using (`java -version`)?
java version "1.8.0_111"

### Feature Request
We'd like to get access to the EpollDomainSocketChannel to access method peerCredentials() (new in Netty release 4.1.7) from within a gRPC server's BindableService call.

We're using gRPC with Unix Domain Sockets (Netty's EpollServerDomainSocketChannel) on a server to manage a hardware resource. We allow a single user (but multiple processes) to open the resource more than once, but we need to reserve the resource while that user has it open and not allow any other users access to the device. Our server needs to be resilient and detect that the client program has potentially crashed and allow the resource to be cleaned up and made available for another user.

We can add a ServerInterceptor but still I haven't figured out to get the Channel.

Can we get access from a ServerCall object to the Channel (understanding that it may be null for an Inprocess server)? Or other alternatives?

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia tracciando come EpollDomainSocketChannel, ServerInterceptor e ServerCall vengono esposti durante una chiamata a un server gRPC. Determina se peerCredentials() può essere reso disponibile a un BindableService senza presumere che esista un canale per i server in-process. Il lavoro è completo quando l’API supportata o un’alternativa è documentata e funziona per i client di socket di dominio Unix, preservando il comportamento in-process.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
backend-api-design, networking
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.