Image for post
Image for post
Photo Credit: Markusspiske

NET 5 has been released and It comes with a lot of exciting features, new technologies and performance improvements. It unifies the .net environment and replaces .NET Core. In this blog, we’ll focus on building high performance services using gRPC and .NET 5.

Why gRPC?

gRPC is not another buzzword being thrown around. It’s a popular open-source RPC framework. It has been around for a while but it’s built on new technologies like HTTP/2 and Protobuf. It’s platform-independent as it offers language-neutral contract language — which is designed for high-performance modern apps.

How does it compare with WCF and REST ?

WCF, which is also a RPC framework and achieves the same goals, but there are some key…


Lightning Fast Performance with a 46% reduction in payload

Image for post
Image for post
Image by : Markus Spiske

With the release of .NET 5, Microsoft has made gRPC really fast and introduced various performance improvements.

As per Microsoft's official blog post.

.NET 5 Server performance is 60% faster and .NET 5 Client is 230% than .NET Core 3.1

These stats are really tempting —even if you aren't dealing with the high-performance applications where milliseconds matter.

We will be using a sample demo: https://grpc-web.azurewebsites.net/ which I created using gRPC-Web (that uses javascript client to invoke gRPC over the browser and also fetches the same data using REST/JSON).


Microservice Architecture

Build High-Performance Services using gRPC and .NET 5

Image for post
Image for post
© All rights reserved

In this article, we will explore Microsoft's gRPC-Web and how it can be used to create real-world gRPC services that can be invoked from the browsers.

(Note: If you are brand new to gRPC then you should check out this article at first. This will walk you through creating your first gRPC server and client using .NET 5).

1 — The Problem

In a previous article, we have seen that unlike REST, the gRPC service can’t be invoked from a browser (as there is simply no browser API that provides enough control over the requests).

The gRPC project template is configured to display the following warning when accessed from a…

About

Hammad Abbasi

Computer Systems Engineer | Solution Architect | Developing enterprise-grade applications for more than a decade | AI and IoT Enthusiast.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store