Hi Chamindu,

My project is to add gRPC Remote Procedure Call support for APIM product
> micro-gateway. This is the approach that have been suggested. Please be
> kind enough to review this approach and let me know about your suggestions.
>
> *Requirement*
> Provide gRPC support  for product micro-gateway which currently contains
> only REST/HTTP support.
>
> *High Level Approach*
> Implement gRPC support for product micro-gateway as a service which
> supports HTTP requests into gRPC supported ones. In this scenario we have
> to implement a ballerina service which receives REST requests and convert
> them to requests that can be identified in endpoint which is a gRPC
> service. But in this case we don't need to implement new gRPC filers for
> process request since receiving requests will be treated as REST/HTTP
> requests. After the filter processing these requests will be converted into
> gRPC supported ones. Then that converted ones will be sent to endpoint.
> When user provides the .proto API definition at Setup command level it
> reads the proto file and creates the ballerina file which act as service
> which do the REST to gRPC conversion. For that we have to implement logic
> to read .proto file from the scratch and implement the business logic of
> conversion according to the .proto file.
>

+1 for the approach. In Ballerina, we have implemented the logic to read
proto definition and generate client endpoint. You can reuse the logic and
improve it to generate proxy service.
Reference[1][2] may helpful for your project.

1. https://grpc-ecosystem.github.io/grpc-gateway/
2.
https://cloud.google.com/service-infrastructure/docs/service-management/reference/rpc/google.api#google.api.Http

Thanks
Danesh


> For further reference
> https://github.com/wso2/product-microgateway/issues/283
>
> --
>
> *Chamindu Udakara *
> *Software engineering Intern*
> WSO2  (University of Moratuwa)
> *mobile *: *+94 755285531*  |   *email *:  cudak...@gmail.com
>


-- 

*Danesh Kuruppu*
Associate Technical Lead | WSO2

Email: dan...@wso2.com
Mobile: +94 (77) 1690552
Web: WSO2 Inc <https://wso2.com/signature>
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to