Hello,
I dont know that do you have any plan to support gRPC besides http?
Thanks,
@tungphuong I don't think gRPC is compatible with the idea of an API gateway like Ocelot. Ocelot has no schema whereas gRPC enforces a schema between upstream and downstream services. Also gRPC can use http as a transport so its not really besides :o
@tungphuong support grpc https://github.com/BuiltCloud/Ocelot.GrpcHttpGateway
@geffzhang that is awesome :)
@tungphuong I would suggest looking at that! I will keep this issue open and reference that project in the Ocelot docs for anyone else looking to use grpc.
This is an article about grpc gateway https://www.cnblogs.com/kingreatwill/p/9722963.html
Many thanks
@TomPallister - Hey Tom, any plan to support gRPC in Ocelot? - I'm thinking it'd be a great feature to be able to use Ocelot as a gateway (in addition to pure gRPC re-directions).
Gateway meaning that external communication from Ocelot to client apps could be using HTTP, but from Ocelot to the internal microservices it'd be using gRPC.
Asking about Ocelot's implementation because the mentioned gateway above hasn't been updated in the last 8 months..
Thoughts?
@CESARDELATORRE I agreed with you. Because of .NET Core 3.0 comes a long with gRPC out of the box so that we need to have some way to forward the gRPC Request into the internal microservices. Just like envoy-filter with grpc transcode. Let me know how do you think? @TomPallister
@TomPallister @CESARDELATORRE @geffzhang Because I have got the same issue that was reported by @tungphuong in my company project so that I have added the filter which can do a transcoder for JSON to gRPC, the code can be found at https://github.com/thangchung/GrpcJsonTranscoder. It will help to add the aggregation layer that config the endpoint of all down stream gRPC services

@thangchung I have same issue so i have followed your approach and implemented exactly but getting error as below
Status(StatusCode=Internal, Detail="Error starting gRPC call: The SSL connection could not be established
I have tried to fix it but it seems the certificate is not trusted can you please help me to solve the issue.
Here goes the service code:
```
public class articlesService : Greeter.GreeterBase
{
private readonly ILogger
public articlesService(ILogger
{
_logger = logger;
}
public override Task<HelloReply> addArticle(HelloRequest request, ServerCallContext context)
{
return Task.FromResult(new HelloReply
{
Message = "Hello"
});
}
}
**Here goes the proto code:**
```
syntax = "proto3";
option csharp_namespace = "Author.Core.GrpcShare";
package greet;
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc addArticle (HelloRequest) returns (HelloReply);
}
// The request message containing the user's name.
message HelloRequest {
string name = 1;
}
// The response message containing the greetings.
message HelloReply {
string message = 1;
}
Can you please tell me did you face any issue similar?
Most helpful comment
@TomPallister - Hey Tom, any plan to support gRPC in Ocelot? - I'm thinking it'd be a great feature to be able to use Ocelot as a gateway (in addition to pure gRPC re-directions).
Gateway meaning that external communication from Ocelot to client apps could be using HTTP, but from Ocelot to the internal microservices it'd be using gRPC.
Asking about Ocelot's implementation because the mentioned gateway above hasn't been updated in the last 8 months..
Thoughts?