Go-swagger: Support gRPC backend

Created on 30 Jun 2016  路  5Comments  路  Source: go-swagger/go-swagger

Problem statement

As you know, gRPC provides more powerful and faster API mechanism base on HTTP/2.0 with protobuf encoding than HTTP/HTTPS with JSON/XML encoding.

I'm working on a faster prototype to implement gRPC backend base on go-swagger, it could works to generate probobuf schema and server side code.

If you think it is ok, we may put more efforts on it.

enhancement futurmaybe

Most helpful comment

Did this ever go anywhere? A few of the services we're building will suffer from a large penalty from the serialization costs of JSON versus something like Protobuf so we've been considering gRPC. We'd like to continue to define the APIs via Swagger and translate. There are some other initiatives to take Protobufs and generate Swagger which is also an option, but remaining with go-swagger would be the most preferable.

All 5 comments

can we have a TODO list about gRPC backend?

  • [x] generate protobuf file base on schema
  • [x] generate gRPC service server stub
  • [x] generate gRPC service client stub
  • [x] validate parameters base on schema
  • [x] use TLS based secure connection in gRPC
  • [ ] support stream based parameter
  • [ ] support middleware
  • [ ] export generated .proto file
  • [ ] migrate templates to use go 1.5 or earlier syntax
  • [ ] add/update gRPC examples
  • [ ] performance test tool/reports

this todo list looks OK, you don't need to move to pre 1.6 template support.Dropping support for building on 1.5 is fine.
I only want to do current + 1 prior. In august there is 1.7 so I don't see a pressing need to end up with messier templates :)

Did this ever go anywhere? A few of the services we're building will suffer from a large penalty from the serialization costs of JSON versus something like Protobuf so we've been considering gRPC. We'd like to continue to define the APIs via Swagger and translate. There are some other initiatives to take Protobufs and generate Swagger which is also an option, but remaining with go-swagger would be the most preferable.

Also curious to know what the status is, would like to support Protobuf too.

Nobody has had time to drive this to completion yet. So the unchecked boxes still need to get resolved.

Was this page helpful?
0 / 5 - 0 ratings