Server forking per "session"
- Hello again soaplite people,I would like to have my SOAP-enabled server do forking so it is more scalable, but not on a per-request basis as (apparently) in ForkOnAccept and ForkAfterProcessing.Instead, I would like to make an explicit server-dispatched function like login() which forks, and then have the client talk to the child process for all remaining calls in this "session". I'd also like to do this for not just one SOAP object, but several different ones (representing different server capabilities).The easiest way I can see to do this is to have the login() call return a port number allocated uniquely to the child, and then have the client create a new set of SOAP objects after login, all with this port number.I anticipate at most 20 simultaneous sessions per machine, for now.Is the port allocation and dedicated client-side object set a good approach, or is there another way to do this?Are there any special issues with doing the fork() in the middle of the request? In fact, is it doable?To get a clue of this, I tried to look at ForkAfterProcessing, which does the fork right after handling the request. I haven't seen the light yet. I don't really understand why the ForkAfterProcessing approach might be desirable, to tell you the truth.Does anybody have any working examples of forking right in the middle of the request, and returning the a port number as I describe?Ron