abp
abp copied to clipboard
ABP gRPC Integration
- [ ] Investigate "how ABP framework can help developers on gRPC API creation".
- [ ] Implement gRPC endpoints for all the modules.
- [ ] Add a starting point for the startup templates.
https://github.com/Cysharp/MagicOnion Looks like a good class library.
Thanks @maliming it seems a very good library. However it seems a real-time communication system. With this issue, we only want a standard gRPC implementation.
https://github.com/Cysharp/MagicOnion Looks like a good class library.
This library using without .proto files and only use .net apps beetwen. See this issue https://github.com/Cysharp/MagicOnion/issues/159#issuecomment-502506139 I think create shared .proto files project each module. It's helpfull any language implement and communicate each other.
https://devblogs.microsoft.com/premier-developer/sharing-grpc-protobuf-contracts-using-a-rest-endpoint/
https://github.com/thangchung/GrpcJsonTranscoder
Interesting:
https://docs.microsoft.com/en-us/aspnet/core/grpc/basics
No meaning to implement it if it is not supported by Azure and IIS. We are planning to implement Blazor UI to server communication via gRPC but this is a huge restriction.
We are deferring this issue.
We were planning to use the gRPC endpoints with the Blazor UI, so wanted to work on this first. However, I see that gRPC with AspNet Core & Blazor is not so production ready. Here, the reasons:
Warning at https://docs.microsoft.com/en-us/aspnet/core/grpc/basics
Warning/Information at https://docs.microsoft.com/en-us/aspnet/core/grpc/browser
And some others...
So, instead of using gRPC endpoints, we will try to use the existing REST endpoints with the Blazor UI. This will speed up our development for the Blazor UI.
Anyone wants to use gRPC in their applications, want to create gRPC endpoints for their microservices, they can still use it. We've prepared a sample application: https://github.com/abpframework/abp-samples/tree/master/GrpcDemo
gRPC-Web for .NET now available https://devblogs.microsoft.com/aspnet/grpc-web-for-net-now-available/
@geffzhang that's great! As I can see, it solves most of the problems. We will check it deeply after v3.0.
https://github.com/protobuf-net/protobuf-net.Grpc It is a code-frist base on grpc-dotnet
+1
+1
Is there any news?😀
Microsoft switched from ocelot to envoy because of the grpc feature.. see here: https://docs.microsoft.com/de-de/dotnet/architecture/microservices/multi-container-microservice-net-applications/implement-api-gateways-with-ocelot Any further plans also to switch to envoy ? or what is on roadmap for grpc ?
@hikalkan any updates on this topic?
+1
any updates on this topic?
There is already a gRPC integration demo that you can check. However if you want to use gRPC instead of http within the framework; that'll take some more time.
We've implemented Static Client Proxy generation so that microservice gateways are no longer referencing Http.Api layers of other microservices to locate endpoints. This will allow us using any other gateway (like envoy etc). With this feature enabled, we've also plans for sample microservices communicating with each other using gRPC so that we can check if we need to make improvements in framework for it.
TLDR: It is in our backlog, we are moving slowly but steadily :)
https://github.com/protobuf-net/protobuf-net.Grpc It is a code-frist base on grpc-dotnet
Looks better.
Hi all,
I've created two articles for ABP & gRPC:
- Using gRPC with the ABP Framework
- Consuming gRPC Services from Blazor WebAssembly Application Using gRPC-Web
I see that using gRPC in an ABP-based solution is straightforward. Currently, we don't think to implement any specific integration package. However, I've taken a lot of notes while investigating .NET's gRPC integration and preparing these articles. In the future, we will probably make some built-in integrations to make it even easier. Some of my notes:
- We can provide packages to automatically register services in the server & client side.
- We can also reduce the boilerplate code while creating channels and consuming services.
- We may provide some services to create and configure channels in a central place.
- We can provide client-side proxy generation with also Dapr integration.
- We may somehow automatically add tenant id, current culture, correlation id, authorization token... to gRPC requests.
However, all these are additional ABP benefits and currently there is no difference of using gRPC in ABP by comparing in with a .NET solution without ABP.