abpframework / abp

Open Source Web Application Framework for ASP.NET Core. Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET and the ASP.NET Core platforms. Provides the fundamental infrastructure, production-ready startup templates, application modules, UI themes, tooling, guides and documentation.
https://abp.io
GNU Lesser General Public License v3.0
12.31k stars 3.32k forks source link

ABP gRPC Integration #2882

Open hikalkan opened 4 years ago

hikalkan commented 4 years ago
maliming commented 4 years ago

https://github.com/Cysharp/MagicOnion Looks like a good class library.

hikalkan commented 4 years ago

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.

mehmetuken commented 4 years ago

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.

geffzhang commented 4 years ago

https://devblogs.microsoft.com/premier-developer/sharing-grpc-protobuf-contracts-using-a-rest-endpoint/

geffzhang commented 4 years ago

https://github.com/thangchung/GrpcJsonTranscoder

hikalkan commented 3 years ago

Interesting:

image

https://docs.microsoft.com/en-us/aspnet/core/grpc/basics

hikalkan commented 3 years ago

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.

hikalkan commented 3 years ago

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

image

Warning/Information at https://docs.microsoft.com/en-us/aspnet/core/grpc/browser

image

And some others...

image

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

geffzhang commented 3 years ago

gRPC-Web for .NET now available https://devblogs.microsoft.com/aspnet/grpc-web-for-net-now-available/

hikalkan commented 3 years ago

@geffzhang that's great! As I can see, it solves most of the problems. We will check it deeply after v3.0.

expcat commented 3 years ago

https://github.com/protobuf-net/protobuf-net.Grpc It is a code-frist base on grpc-dotnet

kegumx commented 3 years ago

+1

rafaelgfirmino commented 3 years ago

+1

realZhangChi commented 3 years ago

Is there any news?😀

barnybadzoo commented 3 years ago

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 ?

leonkosak commented 3 years ago

@hikalkan any updates on this topic?

manishkgupta02 commented 2 years ago

+1

fanslead commented 2 years ago

any updates on this topic?

gterdem commented 2 years ago

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 :)

RainingNight commented 2 years ago

https://github.com/protobuf-net/protobuf-net.Grpc It is a code-frist base on grpc-dotnet

Looks better.

hikalkan commented 1 year ago

Hi all,

I've created two articles for ABP & gRPC:

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:

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.