mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
Request for the webserver to be hosted as in process host to improve performance #138
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nachiappannk on GitHub (Mar 27, 2018).
Originally assigned to: @GregorBiswanger on GitHub.
My understanding of the current architecture
Request
https://blogs.msdn.microsoft.com/webdev/2017/12/07/testing-asp-net-core-mvc-web-apps-in-memory/
Advantages
In the current approach the server is running as a separate process and is listening on a open port, this could be a security gap. When you host as "in process" there is no open port, and only code running within the process can access the web server.
In the current approach, there is interprocess communication happening over a socket that gets estabilished between the asp.net core server and the browser. Inter process communication is slow as data has to be transferred between processes using IPC. When you run as in-process, there is no inter process communication.
In the current approach, there are multiple processes running for the desktop app, when you host as in-process, there will be only one process.
Further note:
Regards,
Nachiappan
nachiapan@gmail.com
@BrainSlugs83 commented on GitHub (Apr 13, 2018):
I think that's a neat suggestion (at least for windows).
RE:
What do you mean by "a lot of time"? -- Do you mean a lot of time to write the code, or a lot of time during the app start up for the browser to initialize?
@nachiappannk commented on GitHub (Apr 14, 2018):
I assumed that this could take lot of time for implementing
@damianh commented on GitHub (Apr 18, 2018):
Related https://github.com/ElectronNET/Electron.NET/issues/22
@fydar commented on GitHub (Jan 20, 2019):
There may be potential to interact with Asp.Net Core's upcoming feature "Generic Host".
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/?view=aspnetcore-2.2
However, this is such a fundamental change to Electron that it maybe unlikely to happen. However, the benefits of increased performance and security are real.
@robertmuehsig commented on GitHub (Jan 21, 2019):
The problem is to glue Electron and the in-proc server together. The electron side just knows a localhost HTTP adress and works in its own process.
The in-proc ASP.NET Core host doesn't expose anything (which is more or less the desired feature), so how would this interaction work?
@GregorBiswanger commented on GitHub (May 9, 2020):
In Electron.NET 8.31.1 we incease the startup time and we continue to work hard to get it even better.