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

Multi client SOAP Daemon

Expand Messages
  • medi.montaseri
    Hi, How does one write a multi-client SOAP daemon (standalone server)? That is daemon waits for incoming call, picks it up, forks a child and let the child
    Message 1 of 2 , Jan 25, 2007
    • 0 Attachment
      Hi,

      How does one write a multi-client SOAP daemon (standalone server)?
      That is daemon waits for incoming call, picks it up, forks a child and
      let the child deal with the actual RPC, parents simply goes right back
      up to accept the next call.

      Typically one does this after accept(2) returns. But where do I fork
      in the following usage.

      my $server = SOAP::Transport::HTTP::Daemon
      ->new(LocalPort => $port, LocalAddr => $addr);
      $server->dispatch_to(WorkflowMgr);
      print "SOAP Listner available at: [", $server->url(), "]\n";
      $server->handle();

      I don't want to fork in my RPCs (or methods) because the forking code
      would be duplicated. I think I need to fork before the dispatching
      takes place.

      Thanks
      Medi
    • Dave Howorth
      ... There are a bunch of examples that come with SOAP::Lite when you install it. soap.daemon.forkafterprocessing and soap.daemon.forkonaccept should give you
      Message 2 of 2 , Jan 26, 2007
      • 0 Attachment
        medi.montaseri wrote:
        > How does one write a multi-client SOAP daemon (standalone server)?
        > That is daemon waits for incoming call, picks it up, forks a child and
        > let the child deal with the actual RPC, parents simply goes right back
        > up to accept the next call.

        There are a bunch of examples that come with SOAP::Lite when you install
        it. soap.daemon.forkafterprocessing and soap.daemon.forkonaccept should
        give you an idea of the possibilities.

        Cheers, Dave
      Your message has been successfully submitted and would be delivered to recipients shortly.