0
votes

I have created an aws serverless lambda (asp.net core) application. I am looking at putting a front end on some of my API calls.

I would like to keep with c# and looking at Blazor as an option. I am concerned however that due to the nature of lambda (on demand) that this is incompatible with Blazor.

This is mainly due to the fact that I have read that the client->server connection is "maintained" (via signalR).

Would like clarification on this from someone with experience on the subject matter.

2

2 Answers

1
votes

There's 2 Blazor : server-side and client-side (aka wasm).

Server-side Blazor execute on the server and each user's action is sent to the server through a SignalR connection. When a component is render, SignalR send the result to the client and a small js script display it.

Client-side Blazor executes in the browser using Web assembly (WASM). There isn't SignalR connection between the client and the server. That works as any other SPA framework except the fact that is C# code compiled in WASM with mono wasm and not JS.

Server-side is released since ASP.Net core 3.0 and supported by MS.
Client-side is still in preview and should be release mid 2020.

To sum up, you cannot use server-side in server less world.

0
votes

Blazor Server: There is no definitive solution on AWS for Serverless with Lambda, nor is there a solution with AWS Elastic Beanstalk.

Blazor Web Assembly: If there is a solution here.

  1. The static page (WASM) you host on AWS Amplify.
  2. You must create the backend manually as "AWS Serverless Application" type protection and when it asks you for the type you select "ASP.NET Core Web API" and when publishing it you use the AWS SDK and select it as Lambda.

In this way you will have a hyper scalable application.