running programs on another machine

M

Marc E

Greetings all,
I have what is probably a simple networking question here:

I have 3 machines: I want Machine A to run a program on Machine B. Machine B
will be manipulating a file and then storing it to Machine C. These are all
windows servers.

Machine B, which does all the hard work, will most likely not have an
application server...it'll simply have some classes for manipulating the
files and such. So setting up machine B's programs as web services and
invoking them from machine A probably won't happen unless it's a last resort

I've managed to get this working with SSH, by having Machine A log in to B
via ssh, run commands, then exit. But this seems awfully hacky and presents
its own problems.

So my question is: what are the preferred methods of doing things like
this...having one machine execute programs on other servers?

Thanks for any guidance.

Marc
 
D

Dennis Willson

Well you can setup ssh to use certificates so no login has to happen each time. I would also be easy to write a small application
that receives commands to execute the programs. It would be nice and small.
 
A

Andrew Thompson

Marc said:
So my question is: what are the preferred methods of doing things like
this...having one machine execute programs on other servers?

Not sure, but RMI would seem to fit here.
 
M

Marc E

i'm clueless about RMI, so maybe I'm wrong, but don't I need a server for
that? like JMS or some such thing?
 
A

Abhijat Vatsyayan

Since you have posted to a java newsgroup, I will try to restrict my
approaches to use java and related technologies -

You state that machine B can not run an application server. Can you run
RMI (server) on it ? What kind of work will machine B be performing ?
If you want to execute arbitrary scripts and specify the script to
execute through the remote interface, you will be introducing a serious
security hole.

A tempting approach is to use JMS. Machine B can listen(subscribe) to
JMS messages (which will contain information about the work to do and
the data ). You do not need any server on machine B. Just the JMS client
libraries (and any other libraries as required by the JMS provider).
You do need "a" server somewhere that machines A.B and C should have
access to . When it (machine B) receives a message, it can process
(perform work) and then send the result out as another JMS message. This
message can then be processed by Machine C. I am not sure how this will
work if the amount of data being transfered through messages is very
larger. JMS should handle security and remoting for you and you can
concentrate on the business interface implementations.

In general, if you can not start a regular server on machine B, it must
subscribe to some kind of event and JMS would be a good way to go about it.

Of course you can always design and implement your own protocol and
write your sever and clients from scratch (using sockets) etc. but I
would never recommend it for something like this.

Abhijat
 
M

Marc E

Thanks Abhijat,
Reading more about RMI, it looks like that's a contender. No, I
wouldn't be running arbitrary scripts; I'd just be running methods from a
class or two. Based on what I've read so far, RMI seems reasonably simple to
get set up, although I can tell right away that the hardest part will be
dealing with permissions and security; we're locked down pretty tight, so
I'd need to learn all about that.
Maybe setting up Tomcat on machine B with webservices, and having service
clients on machine A, will be the most reasonable solution after all.
 
R

Roedy Green

I have 3 machines: I want Machine A to run a program on Machine B. Machine B
will be manipulating a file and then storing it to Machine C. These are all
windows servers.

if all machines are in the same building on a LAN, they can leave
files for each other on each other's machines. You can have some
little C program that wakes up periodically and looks it there is any
work to be done -- files in a magic directory. If so, it spawns them
one after the other and arranges some how to check again in a while
via sleeping or restart.

If the machines are remote to each other, you could set up a tiny
server that does nothing but listen ot the other machines over some
SSL sockets. The messages are just the parameters to exec.

See http://mindprod.com/products1.html#ECHO
for what the core of such a tiny server might look like.
 
S

SDB

: Greetings all,
: I have what is probably a simple networking question here:
:
: I have 3 machines: I want Machine A to run a program on Machine B. Machine
B
: will be manipulating a file and then storing it to Machine C. These are
all
: windows servers.
:
<snip>
:
: So my question is: what are the preferred methods of doing things like
: this...having one machine execute programs on other servers?
:
: Thanks for any guidance.
:
: Marc

How about using SOAP to launch the app on B from A?
SOAP works pretty well when the parameters used to launch the app are well
defined.

How about using FTP to move file to C when done?
SOAP would be an option as well.

http://ws.apache.org/soap/
http://www.samspublishing.com/articles/article.asp?p=26666&rl=1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top