I am part of a team developing a remote computing tool of sorts. My
part is to write the part that accesses a remote machine and dispatches
essentially a batch job on that machine and fetches the output from the
process. I have decided to use SOAP as the communication protocol.
Everything was well and good until we started tackling batch jobs on
remote machines that would last longer than the SOAP timeout.
I came up with a prototype that uses two SOAP servers to communicate
between the initiating machine and the remote machine running the batch
file. I then put the batch call into a thread and when it completes it
notifies the initiating machine through its SOAP server.
Here’s where things get interesting. If both machines are Unix (I’ve
tested on FC6 and Mac OS X), everything works fine. But, if the remote
machine executing the batch file is Windows, then the SOAP call to
initiate the run of the batch thread blocks until that thread completes,
even though you can see execution PAST the thread start. And if the
batch file thread takes longer, then hte SOAP connection times out on
the client end. It sems that there is some issues in how SOAP and
thread execution are handled on Windows.
In the short term I was going to punt on this: capture the timeout error
and move on (as usual we have a product demo coming up). But I’d
eventually like a more elegant solution. I’m hoping someone else on
this list might have seen something like this before.
You can find the source of my prototype at:
To run it:
- untar the package
- in one terminal window cd into the directory and type “ruby
inner_wrapper_server.rb” to start the process that would be on the
- in another terminal window, cd into the directory and type “ruby
runner.rb” to start the process from the initiating machine.
The file core.rb represents what would be the remote batch file. The
set_input and get_output methods would be used to send input to the
batch file and get the output repsectively. Try running it on Unix and
it works … trying Windows and it fails.
Good luck and thanks,