Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Perl create thread for instant soap request response

Posted on 2006-12-01
3
385 Views
Last Modified: 2008-01-09
I have a situation where I am using Perl and SOAP::Lite to build a system of multiple machines and multiple layers of communication. Now I am running into a scalability issue that I did not forsee. In certian cases of this communication I want to send a request and I dont want to wait for a response. Now I know that is a limitation at several levels http, soap, and perl. But what I am thinking of doing is on certian requests I want to spawn a thread to respond with a status of 0 but have my service continue processing the request. Right now it looks something like this

client (sends request to process log) -> server (processes log)
client <- server (sends response when completed)

What I want is
client (sends request to process log) -> server
client <- server (responds with return value right away)
server (processes log and doesnt send any further notice to anyone)

My server is actually a soap service as a cgi script on apache. Now I have never used fork or threads and I am wondering how I should design my service to deal with that. I know there are a bunch of issues with sharing objects and memory. But I think I should be able to avoid most of those because I only need to spawn 1 thread or fork to either return a value to the soap client or to process the log and let the main script return a value.

I am thinking a fork might not be the best thing because it looks like its a copy of the whole script and I dont know if I want to do that. And I dont think it would be able to know about that session or variables passed into that would it?
0
Comment
Question by:amesdaq
3 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 250 total points
ID: 18055870
see the  multithreaded server example in
perldoc perlipc
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question