Live data from Hacker News

Twirp: A new RPC framework for Go

blog.twitch.tv

71–80 of 99 posts

Re: Twirp: A new RPC framework for Go

#72

Earlier quoted context omitted.

Can I ask why you want JSON with gRPC? The benefits to protobuf are tremendous, with little to no downsides

On the other hand, plain URLs with JSON are much easier to work with without writing any code. You can do everything want with curl from the shell, and often an API allows doing almost anything from a browser (Elasticsearch comes to mind). The simplicity of it all comes in handy when you want to do something trivial — load a small piece of data into the server, do some diagnostics, run some ad-hoc queries, etc. — wit…

To complement the grpc_cli recommendation, I've been using grpcc for 1-2 years now: https://github.com/njpatel/grpcc

Re: Twirp: A new RPC framework for Go

#73

Hey everyone! I'm the OP and primary author of Twirp. I'm happy to answer any questions and hear feedback. You can also reach me directly, if you like, email is in my profile.

Thanks for posting! How did you work around issues with GRPC on AWS/ELB?

What works for us (grpc)

Elb with layer 4 and proxy protocol enabled. Behind Elb sits nghttpx (not nginx) doing TLS termination and request forwarding to gRPC.

Proxy protocol is used to keep the source IP.

This setup is all done with Kubernetes using kops for the cluster setup, nghttpx-ingress-lb as the ingress controller. Also we have multiple namespaces/environments in Kubernetes (staging/dev..), so nghttpx does routing based on the hostname.

We tried linkerd before but somehow failed using it as an ingress controller doing TLS termination and upstream HTTP2. Doing the other way of routing everything through a dedicated linkerd port and a dtab worked, but mixing in TLS termination + upstream HTTP2 in a single dtab stopped us.

So for now we keep this simpler setup and we probably are going to check out Istio/Heptio/Envoy

Re: Twirp: A new RPC framework for Go

#75
post #49

Earlier quoted context omitted.

One reason is to be able to call gRPC service from a web browser. Native JSON support makes that much easier.

There has recently been a lot of work for native grpc client in the browser. It’s not fully there yet but is looking real promising! https://github.com/improbable-eng/grpc-web

Also grpc web is coming along

https://github.com/grpc/grpc-web

Re: Twirp: A new RPC framework for Go

#78

Hey everyone! I'm the OP and primary author of Twirp. I'm happy to answer any questions and hear feedback. You can also reach me directly, if you like, email is in my profile.

What do you think about prpc, which is our version of "gRPC for http/1.1" https://godoc.org/go.chromium.org/luci/grpc/prpc

Re: Twirp: A new RPC framework for Go

#80

Hey everyone! I'm the OP and primary author of Twirp. I'm happy to answer any questions and hear feedback. You can also reach me directly, if you like, email is in my profile.

The blog post mentions the following:

> The core design of Twirp is language-agnostic and we’re planning to expand into new languages, but our Go implementation is already stable and capable of serving heavy production loads.

I was wondering, is Rust on the roadmap?

Post reply on HN