>
> This could be nice.
>
> But if we get addicted to this, does it also speak JSON for people who 
> want to speak JSON? I'm afraid we'd either let our JSON rot, or we'd have 
> twice the maintenance cost. Ideally we'd get both for free, with one 
> sufficiently-annotated proto file.
>

While the gRPC-Web spec 
<https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-WEB.md#protocol-differences-vs-grpc-over-http2>mentions
 
JSON content types, I don't think this is currently possible in the 
gRPC-Web client. However, we could deploy a gRPC-gateway 
<https://github.com/grpc-ecosystem/grpc-gateway/> on a handler and split 
traffic based on headers and HTTP version. The gRPC-gateway uses the Google 
annotations.proto annotations to map gRPC service methods to endpoints. So 
we could bake in a gRPC-gateway and a gRPC server and expose both JSON and 
gRPC and gRPC-web on the same port, with the interfaces all using the same 
protofile as the source of truth.

I could potentially bake this part into the current POC if it would be of 
interest.

Johan

-- 
You received this message because you are subscribed to the Google Groups 
"Camlistore" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to