Aspnetcore: Out-of-process execution

Created on 8 Jun 2018  路  11Comments  路  Source: dotnet/aspnetcore

Blazor's architecture creates opportunities for other ways of hosting and running Blazor applications, including:

  • In Electron
  • In a Web Worker
  • With server-side .NET code

For all three of these, we need a method for serializing the .NET/JS interactions so they can be pushed over a pipe (IPC, postMessage, WebSocket, etc.).

We'll break down this issue further as the design progresses.

Remaining work:

  • [x] Get E2E tests working
  • [ ] Edge support (#1131)
  • [x] Templates
area-blazor

Most helpful comment

@galvesribeiro It's so the .NET part can run natively under CoreCLR instead of WebAssembly (so you immediately have access to 100% of the package ecosystem, debugging, JIT compilation, etc.).

All 11 comments

@SteveSandersonMS Electron doesn't require any special treatment in this case. The standalone app can work just fine.

The only thing I think needs some love but would be potentially be an external package (Perhaps I would add it on BlazorExtensions) is the Eletron Main <-> Render process APIs. In other words, the _Electron SDK/APIs_ but for that to work, there must be a way to JS -> C# calls on non-static C# methods...

Do you think we need something else for Electron support?

@galvesribeiro It's so the .NET part can run natively under CoreCLR instead of WebAssembly (so you immediately have access to 100% of the package ecosystem, debugging, JIT compilation, etc.).

It's so the .NET part can run natively under CoreCLR instead of WebAssembly (so you immediately have access to 100% of the package ecosystem, debugging, JIT compilation, etc.).

Sorry, I'm not following... What you mean?

I mean you can then have a normal native .NET Core process (not under Mono WebAssembly, instead just the native .NET Core runtime, a.k.a. CoreCLR) which controls an Electron renderer.

Ahhh I see...

Well, perhaps Blazelectron is a good project start with! 馃拑

You found this too: https://github.com/mattkol/Chromely

Paperthin render process that communicates with an out-of-process .net core process. Sound familiar :)?

I love the Blelectron (or Blazelectron heh) idea. It provides us with a solution for .Net/Cross-platform/Desktop apps (finally !!!).

I am not so crazy about the web-sockets/server-side rendering blazor approach.

I know it could be optional etc, but in the end I fear people would get easily confused, e.g. working on a WASM blazor project and then jumping on a web-sockets blazor project, OR looking at code samples online and not understanding why it doesn't work in their project (where is this code running?!)

Will there be a template available we can play around with for the Serverside rendering?

I am against this idea of server size Blazor. That is a step backwards. Let the client side render the html. We do not need Blazor's syntax server side. You should not be generating html on the server side whatsoever.
I have very strong feelings about this. Can we all just pretend I typed this in all caps.

if(Blazortron) win;

I think supporting other processes is awesome! This gives developers a much wider toolbox from which to solve problems while still giving those who want to code a certain way their CHOICE to do so. Blazor should be extensible where it can add value imho..

Keep up the awesome work and roadmap!

Done!

Was this page helpful?
0 / 5 - 0 ratings