Request for the webserver to be hosted as in process host to improve performance #135

Open
opened 2026-01-29 16:32:11 +00:00 by claunia · 0 comments
Owner

Originally created by @nachiappannk on GitHub (Mar 27, 2018).

Originally assigned to: @GregorBiswanger on GitHub.

My understanding of the current architecture

  1. The browser runs in a process (Say Process 1)
  2. The asp.net core web server runs in a process (Say Process 2)
  3. The asp.net core web server listens in a port (Say port 8003)

Request

  1. Run the browser in a process (Say Process 1)
  2. Run the asp.net core web server in the same process (that is Process 1)
  3. Host the web service as in process host. (Link below)
    https://blogs.msdn.microsoft.com/webdev/2017/12/07/testing-asp-net-core-mvc-web-apps-in-memory/

Advantages

  1. 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.

  2. 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.

  3. 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:

  1. It may take lot of time to get a in process web browser.
  2. It may be that it's not at all possible in a cross platform.

Regards,
Nachiappan
nachiapan@gmail.com

Originally created by @nachiappannk on GitHub (Mar 27, 2018). Originally assigned to: @GregorBiswanger on GitHub. My understanding of the current architecture 1. The browser runs in a process (Say Process 1) 2. The asp.net core web server runs in a process (Say Process 2) 3. The asp.net core web server listens in a port (Say port 8003) Request 1. Run the browser in a process (Say Process 1) 2. Run the asp.net core web server in the same process (that is Process 1) 3. Host the web service as in process host. (Link below) https://blogs.msdn.microsoft.com/webdev/2017/12/07/testing-asp-net-core-mvc-web-apps-in-memory/ Advantages 1. 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. 2. 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. 3. 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: 1. It may take lot of time to get a in process web browser. 2. It may be that it's not at all possible in a cross platform. Regards, Nachiappan nachiapan@gmail.com
claunia added the help wantedFeature labels 2026-01-29 16:32:11 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#135