Does gRPC server work with a REST (JSON) client?

40 views
Skip to first unread message

vna...@gmail.com

unread,
Feb 27, 2018, 8:20:54 PM2/27/18
to grpc.io
Hi,

Does a gRPC server work with a REST (JSON) Client? or do I need to have a intermediary like ESP or grpc-gateway? Is there any grpc-gateway for java implementation?

thanks,
Venkat

Yugui

unread,
Feb 28, 2018, 1:54:41 AM2/28/18
to vna...@gmail.com, grpc.io
It depends on what you actually want to do.

If you need to expose your grpc-based Java application as a backend of RESTful APIs, nothing prevents you from combining it with grpc-gateway. Even though grpc-gateway itself is written in Go, it does not actually matter because grpc-gateway works as an independent process by design.

If you need a convenient way to call gRPC methods from command line, you can consider grpc_cli, polyglot, grpcurl, ...

If you need to marshal your payloads not into protobuf but into JSON, and if gRPC wire protocol over HTTP/2 does not actually matter with you, you can use a custom marshaler in your gRPC server.

Thanks,
Yuki Yugui Sonoda

--
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/06f9ea9a-5540-48d9-aeb4-8b08e18be91a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages