I'm working on a component used for generation of 3D CAD models. Since the api used to generate the model itself is native, I'm sticking with WCF/NetNamedPipeBinding for IPC. The component is being used by a webapplication (IIS). The client proxy itself starts the service host as a own process(!). Reason behind this, is that the native API needs to "run" in its own memory in order to provide a uncorrupted 3D model. Hence WebApplication (IIS) -> WCF Proxy Client -> WCF ServiceHost in its own process (EXE, self hosted) -> Native API
Problem: The servicehost startup takes several seconds, which is too much. Especially when calling it from a multi threaded environment.
Is there a way to start this self hosted service on demand? My idea is something like 20 running service hosts (= processes), which get scaled up after for example 15 of these are in use. Remember, IIS hosted service is not an option, since IIS does not create such a servicehost in its own process (with his own memory) upon each request.