Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
gRPC-Web for .NET now available

#1
gRPC-Web for .NET now available

Avatar

James

gRPC-Web for .NET is now officially released. We announced experimental support in January and since then we’ve been making improvements based on feedback from early adopters.

With this release gRPC-Web graduates to a fully supported component of the grpc-dotnet project and is ready for production. Use gRPC in the browser with gRPC-Web and .NET today.

Getting started


Developers who are brand new to gRPC should check out Create a gRPC client and server in ASP.NET Core. This tutorial walks through creating your first gRPC client and server using .NET.

If you already have a gRPC app then the Use gRPC in browser apps article shows how to add gRPC-Web to a .NET gRPC server.

What are gRPC and gRPC-Web


gRPC is a modern high-performance RPC (Remote Procedure Call) framework. gRPC is based on HTTP/2, Protocol Buffers and other modern standard-based technologies. gRPC is an open standard and is supported by many programming languages, including .NET.

It is currently impossible to implement the gRPC HTTP/2 spec in the browser because there are no browser APIs with enough fine-grained control over requests. gRPC-Web is a standardized protocol that solves this problem and makes gRPC usable in the browser. gRPC-Web brings many of gRPC’s great features, like small binary messages and contract-first APIs, to modern browser apps.

New opportunities with gRPC-Web


gRPC-Web is designed to make gRPC available in more scenarios. These include:

  • Call ASP.NET Core gRPC apps from the browser – Browser APIs can’t call gRPC HTTP/2. gRPC-Web offers a compatible alternative.
    • JavaScript SPAs
    • .NET Blazor Web Assembly apps
  • Host ASP.NET Core gRPC apps in IIS and Azure App Service – Some servers, such as IIS and Azure App Service, currently can’t host gRPC services. While this is actively being worked on, gRPC-Web offers an interesting alternative that works in every environment today.
  • Call gRPC from non-.NET Core platforms – HTTP/2 is not supported by HttpClient on all .NET platforms. gRPC-Web can be used to call gRPC services from Blazor and Xamarin.

gRPC loves Blazor and .NET

gRPC is a registered trademark of the Linux foundation. Blazor is compatible with gRPC-web

We’ve worked with the Blazor team to make gRPC-Web a great end-to-end developer experience when used in Blazor WebAssembly apps. Not only will gRPC tooling automatically generate strongly typed clients for you to call gRPC services from your Blazor app, but gRPC offers significant performance benefits over JSON.

A great example of the performance benefits in action is Blazor’s default template app. The data transferred on the fetch data page is halved when gRPC is used instead of JSON. Data size is reduced from 627 bytes down to 309 bytes.

Developer tools showing gRPC-Web transfer size

The performance gain here comes from gRPC’s efficient binary serialization over traditional text-based JSON. gRPC-Web is an exciting opportunity to improve rich browser-based apps.

Try gRPC-Web with ASP.NET Core today


For more information about gRPC-Web, check out the documention, or try out a sample app that uses gRPC-Web.

gRPC-Web for .NET is out on NuGet now:

We look forward to seeing what you create with .NET, gRPC and now gRPC-Web!



https://www.sickgaming.net/blog/2020/06/...available/
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  gRPC-Web for .NET now available xSicKxBot 0 155 06-18-2020, 06:06 AM
Last Post: xSicKxBot
  A new experiment: Call .NET gRPC services from the browser with gRPC-Web xSicKxBot 0 266 02-01-2020, 07:37 AM
Last Post: xSicKxBot
  gRPC vs HTTP APIs xSicKxBot 0 271 11-18-2019, 10:01 PM
Last Post: xSicKxBot

Forum Jump:

Become a Patron!
[-]
Upcoming Events

[-]
Latest Threads
Xbox one SDK Leaked: homebrew coming soo...
Last Post: DanielChapell
Today 05:51 PM
» Replies: 1
» Views: 1762
News - Here's How The Walking Dead Is Fi...
Last Post: xSicKxBot
Today 05:50 PM
» Replies: 0
» Views: 1
(Indie Deal) PlugInDigital & Kalypso Str...
Last Post: xSicKxBot
Today 05:06 PM
» Replies: 0
» Views: 2
(Free Game Key) Costume Quest 2 & Layers...
Last Post: xSicKxBot
Today 05:05 PM
» Replies: 0
» Views: 2
News - Destiny 2 Hotfix 2.9.2.2
Last Post: xSicKxBot
Today 01:53 PM
» Replies: 0
» Views: 2
News - The Video Game History Foundation...
Last Post: xSicKxBot
Today 01:52 PM
» Replies: 0
» Views: 3
News - French charity steam Z Event rais...
Last Post: xSicKxBot
Today 01:52 PM
» Replies: 0
» Views: 3
News - Borat 2 Review Roundup: Very Nice...
Last Post: xSicKxBot
Today 11:18 AM
» Replies: 0
» Views: 4
Mobile - Win yourself a free copy of sha...
Last Post: xSicKxBot
Today 09:07 AM
» Replies: 0
» Views: 3
[Tut] Top 3 Freelance Developer Contract...
Last Post: xSicKxBot
Today 04:49 AM
» Replies: 0
» Views: 3

[-]
Twitter

[-]
Sponsored
Get the Deal of the Week at RefurBees.com

Copyright © SickGaming.net 2012-2020