09-09-2020, 10:57 AM
gRPC-Web for .NET now available
<div style="margin: 5px 5% 10px 5%;"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2020/06/grpc-web-for-net-now-available.png" width="58" height="58" title="" alt="" /></div><div><div class="row justify-content-center">
<div class="col-md-4">
<div><img loading="lazy" src="https://www.sickgaming.net/blog/wp-content/uploads/2020/06/grpc-web-for-net-now-available.png" width="58" height="58" alt="Avatar" class="avatar avatar-58 wp-user-avatar wp-user-avatar-58 photo avatar-default"></p>
<p>James</p>
</div>
</div>
</div>
<div class="entry-meta">
<p>June 16th, 2020</p>
</p></div>
<p><!-- .entry-meta --> </p>
<p>gRPC-Web for .NET is now officially released. We <a href="https://devblogs.microsoft.com/aspnet/grpc-web-experiment/">announced experimental support</a> in January and since then we’ve been making improvements based on feedback from early adopters.</p>
<p>With this release gRPC-Web graduates to a fully supported component of the <a href="https://github.com/grpc/grpc-dotnet">grpc-dotnet</a> project and is ready for production. Use gRPC in the browser with gRPC-Web and .NET today.</p>
<h2>Getting started</h2>
<p>Developers who are brand new to gRPC should check out <a href="https://docs.microsoft.com/aspnet/core/tutorials/grpc/grpc-start">Create a gRPC client and server in ASP.NET Core</a>. This tutorial walks through creating your first gRPC client and server using .NET.</p>
<p>If you already have a gRPC app then the <a href="https://docs.microsoft.com/aspnet/core/grpc/browser">Use gRPC in browser apps</a> article shows how to add gRPC-Web to a .NET gRPC server.</p>
<h2>What are gRPC and gRPC-Web</h2>
<p>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.</p>
<p>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. <a href="https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-WEB.md">gRPC-Web</a> 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.</p>
<h2>New opportunities with gRPC-Web</h2>
<p>gRPC-Web is designed to make gRPC available in more scenarios. These include:</p>
<ul>
<li><strong>Call ASP.NET Core gRPC apps from the browser</strong> – Browser APIs can’t call gRPC HTTP/2. gRPC-Web offers a compatible alternative.
<ul>
<li>JavaScript SPAs</li>
<li>.NET Blazor Web Assembly apps</li>
</ul>
</li>
<li><strong>Host ASP.NET Core gRPC apps in IIS and Azure App Service</strong> – 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.</li>
<li><strong>Call gRPC from non-.NET Core platforms</strong> – HTTP/2 is not supported by HttpClient on all .NET platforms. gRPC-Web can be used to call gRPC services from Blazor and Xamarin.</li>
</ul>
<p><a href="https://www.sickgaming.net/blog/wp-content/uploads/2020/06/grpc-web-for-net-now-available-1.png"> <img loading="lazy" src="https://www.sickgaming.net/blog/wp-content/uploads/2020/06/grpc-web-for-net-now-available-1.png" alt="gRPC loves Blazor and .NET" width="800" height="181" class="alignnone size-full wp-image-23827"></a></p>
<p><em>gRPC is a registered trademark of the Linux foundation. Blazor is compatible with gRPC-web</em></p>
<p>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.</p>
<p>A great example of the performance benefits in action is Blazor’s default template app. The data transferred on the fetch data page is <strong>halved</strong> when gRPC is used instead of JSON. Data size is reduced from 627 bytes down to 309 bytes.</p>
<p><a href="https://www.sickgaming.net/blog/wp-content/uploads/2020/06/grpc-web-for-net-now-available-2.png"> <img loading="lazy" src="https://www.sickgaming.net/blog/wp-content/uploads/2020/06/grpc-web-for-net-now-available-2.png" alt="Developer tools showing gRPC-Web transfer size" width="1399" height="799" class="alignnone size-full wp-image-23828"></a></p>
<p>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.</p>
<h2>Try gRPC-Web with ASP.NET Core today</h2>
<p>For more information about gRPC-Web, check out the <a href="https://docs.microsoft.com/aspnet/core/grpc/browser">documention</a>, or try out <a href="https://github.com/grpc/grpc-dotnet/tree/master/examples#browser">a sample app that uses gRPC-Web</a>.</p>
<p>gRPC-Web for .NET is out on NuGet now:</p>
<p>We look forward to seeing what you create with .NET, gRPC and now gRPC-Web!</p>
</div>
https://www.sickgaming.net/blog/2020/06/...available/
<div style="margin: 5px 5% 10px 5%;"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2020/06/grpc-web-for-net-now-available.png" width="58" height="58" title="" alt="" /></div><div><div class="row justify-content-center">
<div class="col-md-4">
<div><img loading="lazy" src="https://www.sickgaming.net/blog/wp-content/uploads/2020/06/grpc-web-for-net-now-available.png" width="58" height="58" alt="Avatar" class="avatar avatar-58 wp-user-avatar wp-user-avatar-58 photo avatar-default"></p>
<p>James</p>
</div>
</div>
</div>
<div class="entry-meta">
<p>June 16th, 2020</p>
</p></div>
<p><!-- .entry-meta --> </p>
<p>gRPC-Web for .NET is now officially released. We <a href="https://devblogs.microsoft.com/aspnet/grpc-web-experiment/">announced experimental support</a> in January and since then we’ve been making improvements based on feedback from early adopters.</p>
<p>With this release gRPC-Web graduates to a fully supported component of the <a href="https://github.com/grpc/grpc-dotnet">grpc-dotnet</a> project and is ready for production. Use gRPC in the browser with gRPC-Web and .NET today.</p>
<h2>Getting started</h2>
<p>Developers who are brand new to gRPC should check out <a href="https://docs.microsoft.com/aspnet/core/tutorials/grpc/grpc-start">Create a gRPC client and server in ASP.NET Core</a>. This tutorial walks through creating your first gRPC client and server using .NET.</p>
<p>If you already have a gRPC app then the <a href="https://docs.microsoft.com/aspnet/core/grpc/browser">Use gRPC in browser apps</a> article shows how to add gRPC-Web to a .NET gRPC server.</p>
<h2>What are gRPC and gRPC-Web</h2>
<p>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.</p>
<p>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. <a href="https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-WEB.md">gRPC-Web</a> 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.</p>
<h2>New opportunities with gRPC-Web</h2>
<p>gRPC-Web is designed to make gRPC available in more scenarios. These include:</p>
<ul>
<li><strong>Call ASP.NET Core gRPC apps from the browser</strong> – Browser APIs can’t call gRPC HTTP/2. gRPC-Web offers a compatible alternative.
<ul>
<li>JavaScript SPAs</li>
<li>.NET Blazor Web Assembly apps</li>
</ul>
</li>
<li><strong>Host ASP.NET Core gRPC apps in IIS and Azure App Service</strong> – 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.</li>
<li><strong>Call gRPC from non-.NET Core platforms</strong> – HTTP/2 is not supported by HttpClient on all .NET platforms. gRPC-Web can be used to call gRPC services from Blazor and Xamarin.</li>
</ul>
<p><a href="https://www.sickgaming.net/blog/wp-content/uploads/2020/06/grpc-web-for-net-now-available-1.png"> <img loading="lazy" src="https://www.sickgaming.net/blog/wp-content/uploads/2020/06/grpc-web-for-net-now-available-1.png" alt="gRPC loves Blazor and .NET" width="800" height="181" class="alignnone size-full wp-image-23827"></a></p>
<p><em>gRPC is a registered trademark of the Linux foundation. Blazor is compatible with gRPC-web</em></p>
<p>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.</p>
<p>A great example of the performance benefits in action is Blazor’s default template app. The data transferred on the fetch data page is <strong>halved</strong> when gRPC is used instead of JSON. Data size is reduced from 627 bytes down to 309 bytes.</p>
<p><a href="https://www.sickgaming.net/blog/wp-content/uploads/2020/06/grpc-web-for-net-now-available-2.png"> <img loading="lazy" src="https://www.sickgaming.net/blog/wp-content/uploads/2020/06/grpc-web-for-net-now-available-2.png" alt="Developer tools showing gRPC-Web transfer size" width="1399" height="799" class="alignnone size-full wp-image-23828"></a></p>
<p>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.</p>
<h2>Try gRPC-Web with ASP.NET Core today</h2>
<p>For more information about gRPC-Web, check out the <a href="https://docs.microsoft.com/aspnet/core/grpc/browser">documention</a>, or try out <a href="https://github.com/grpc/grpc-dotnet/tree/master/examples#browser">a sample app that uses gRPC-Web</a>.</p>
<p>gRPC-Web for .NET is out on NuGet now:</p>
<p>We look forward to seeing what you create with .NET, gRPC and now gRPC-Web!</p>
</div>
https://www.sickgaming.net/blog/2020/06/...available/