Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to spawn Linux process from Windows application?

My interactive 32-bit Windows app (now moving from Delphi [Ent] 2007 to 2009) uses command-line interactions to spawn child processes that do computationally-intensive tasks, which in turn write text files that the GUI parent app parses and analyzes - resulting in an interactive graphical display of the results.

I have access to a multiprocessor (multi-user) Linux cluster (via ssh), and would like to off-load the heavy lifting to that cluster. My question is how to spawn the processes in Linux from my Windows app. I can envision using secure FTP to put and get files, but not sure how to spawn the child processes in Linux.

Some leads for further reading would be fine - but code/pseudocode would be ideal. I can imagine that this may be more about Windows-Linux interaction than Delphi.

like image 608
Argalatyr Avatar asked Apr 30 '09 01:04

Argalatyr


1 Answers

if you have access to ssh, one option is to issue commands through that. For example:

ssh user@host ls -l ~

will in the ssh terminal show the files in the user's home directory. I'm not sure if this is what you really want. But it would likely work.

If you do this, you almost certainly want to setup SSH password less logins

However, A more ideal solution would likely be to setup a daemon on the linux boxes whose sole job is to run specific long running tasks in the background and let you fetch the results later.

like image 147
Evan Teran Avatar answered Nov 01 '22 13:11

Evan Teran