gRPC-Web with .NET
Ғылым және технология
gRPC-Web allows browser based applications to call into gRPC services via a special proxy. .NET developers are now able to build and consume services that use gRPC-Web using the Grpc.AspNetCore.Web NuGet package.
In this episode, James Newton-King joins Cecil to explain how gRPC-Web works and show us what the code looks like to support this feature.
[01:40] - What is gRPC about?
[03:44] - How does gRPC use HTTP/2?
[07:14] - Recognizing errors with gRPC streams?
[09:12] - How does gRPC-Web work?
[11:14] - gRPC-Web in .NET
[12:51] - Understanding proxies
[14:10] - ASP.NET gRPC streaming (Demo)
[16:21] - gRPC-Web alongside other gRPC services
[18:04] - Performance benefits with gRPC-web
gRPC-Web for .NET now available
devblogs.microsoft.com/aspnet/grpc-web-for-net-now-available/
Use gRPC in browser apps
docs.microsoft.com/aspnet/core/grpc/browser?WT.mc_id=dotnet-00000-cephilli
Introduction to gRPC
docs.microsoft.com/aspnet/core/grpc?WT.mc_id=dotnet-00000-cephilli
Пікірлер: 26
James is really a Gem 💎 in #dotnet community. Being an owner of very popular library on which even MS depends, how humble he is! 🙏🙌🙌
amazing! very simple and useful. thank you
King, thanks for presentation👑
This video is amazing! Thanks
Great presentation. Thanks James. By the way System.Text will NEVER be more popular than Newtonsoft!
Thank you
Don't forget that Swagger Open API (REST) also has code-generation. But gRPC binary looks so great compared to JSON and stateless transport.
Really nice video !!! Is they anyway GRPC-Web can be used to support older version of non .Net core versions of .Net Frameworks such as 4.8 which does not support HTTP/2; to invoke grpc methods running over HTTP/2 ?
Question that remains unanswered in my POV : why would you use gRPC web between wasm Blazor and the server, if you can use ‘unwrapped’ gRPC as well? In wasm you’re not limited by xhr /fetch after all?
@rico993
3 жыл бұрын
Pretty sure it was just to demonstrate how gRPC-Web is still a big performance improvement over a conventional REST API, but you wouldn't do it in practice if you're consuming the service from a .NET client. They have a different video where he's using the same demo web app to test performance of the 'unwrapped' gRPC
whether it is possible browse the grpc uri in the browser ?
That is very nice and good to know. However, I don't think I will ever have any need for grpc, as the existing web API is really fast and good enough for all needs of our clients.
@jonathan.v
3 жыл бұрын
gRPC helps to reduce bandwidth, in many cases that translates in reduced costs.
@xucongzhan9151
3 жыл бұрын
gRPC is geared towards and is much preferred in a microservices architecture so yeah for small to medium-sized projects HTTP API works just fine.
İs there some way to use GraphQL and Blockchain for the smart contracts in Dotnet?
the problem is : most ppl want to use gRPC in their app / their service , not in browser , JUST WANT TO KNOW WHEN can microsoft support gRPC in azure application service
Can gRPC service serve non-gRPC requests?
where are the sources of this example of the video where can i change the call type?
@garethtucker6213
3 жыл бұрын
Looks like its found here github.com/dotnet/AspNetCore.Docs/tree/master/aspnetcore/tutorials/grpc/grpc-start/sample
Good job! Could you share the code?
Ive tried grpc web with dotnet 5 and front Blazor and grpc was slowly almost 3 times and ~ 100kB less then simple rest with 2Mb response...
@justnothing7080
3 жыл бұрын
Have you tested in debugging mode or release mode? That sounds like something weird going wrong.