Loading ...
Sorry, an error occurred while loading the content.

Server forking per "session"

Expand Messages
  • Ron Murphy
    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
    Message 1 of 1 , Oct 16, 2002
    • 0 Attachment
      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.
       
      The reason I need session-based forking is that quite a bit of state will be kept around for the session, like the effective UID of the process, a bunch of data structures representing "checked out" information for this user, etc.
       
      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
    Your message has been successfully submitted and would be delivered to recipients shortly.