LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 05-20-2006, 04:39 AM   #1
cynthia_thomas
LQ Newbie
 
Registered: Oct 2005
Posts: 28

Rep: Reputation: 15
remote pgm execution in C


hi,
i want to exectute a C pgm in another linux m/c from my linux m/c using a C pgm . both m/c's are connected to a common network. Is there any way of doing this . I am totally baffled . If anybody knows please help me

thanks and regards
cynthia thomas
 
Old 05-20-2006, 04:45 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 39,800

Rep: Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111
pgm?? m/c? is it too hard to write "program" or "machine"? what do you want to achieve? there are plenty of ways to execute programs remotely, ssh, rexec etc...
 
Old 05-20-2006, 01:14 PM   #3
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: LFS-Version SVN-20091202, Arch 2009.08
Posts: 1,450

Rep: Reputation: 63
hahahaha


"common network" hmmmm what is a common network exactly.

Yes as stated before ssh or somthing else might be what your after unless your trying to program a program to run a program on another computer.
 
Old 05-20-2006, 03:10 PM   #4
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,858
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

I think what you're asking falls under the (extremely broad!) category of "distributed processing".

If you were starting out with a specific platform, your choices might relatively straightforward. A Java programmer, for example, would likely go straight to RMI (low level) or J2EE (an entire infrastructure). A Windows programer would go straight to .Net (an amorphous term that basically means "Buy Microsoft, Use Visual Studio, and Don't worry about that Man Behind the Curtain!").

But in reality, your choices are almost limitless. You can use rexec and ssh (as suggested above) to run existing programs on specific hosts. You can implement your own protocol with your own programs using sockets or RPCs. You can take an SOA/Web Services approach. You can take an HPC approach. Or a Grid computing approach. You might even be able to write a simple Ruby on Rails web app and be done with it! Etc etc. The possibilities are endless.

SUGGESTED STARTING POINTS:
Please scan these articles, and post back new questions about specific technologies that might look appropriate for your project:

1) Relatively technical, but good overview:
http://www.new-npac.org/users/fox/te...full-0807.html

2) Wikipedia definitions:
http://en.wikipedia.org/wiki/High%5F...ce%5Fcomputing
http://en.wikipedia.org/wiki/Distributed_computing
http://en.wikipedia.org/wiki/Distrib...Grid_computing
http://en.wikipedia.org/wiki/Service...d_Architecture
http://en.wikipedia.org/wiki/Remote_invocation

3) Do your own google search on keywords like:
"distributed computing"
"Remote Procedures"
"concurrent programming"
"parallel programming"
"client/server"

Last edited by paulsm4; 05-20-2006 at 03:13 PM.
 
Old 05-20-2006, 05:20 PM   #5
BSchindler
Member
 
Registered: May 2006
Location: Los Angeles, CA USA
Distribution: RHAS3, RHAS4, RHEL4, RH6, RH7.2, FC2-7, Gentoo, DSL
Posts: 49

Rep: Reputation: 15
A very simple solution, assuming I understand your problem, is to run a server on a machine and make requests to it. A good choice is to make a cgi request to a webserver.

CGIs can be written in lots of languages and the arguement(s) can specify parameters. This is cheap and dirty but extremely simple to implement. Another advantage, btw is that you also have lots of ways to have the requestor call the program on the remote machine as, again, you have lots of language choices. Almost all of them, including C understand an http request construct ...

From the nature of your question you are not too savvy about distributed computing (no offence meant). However, making "web based" requests is simple and you do not need to write or install rpc daemons which may be unfamiliar to you.
 
Old 05-20-2006, 08:45 PM   #6
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,858
Blog Entries: 1

Rep: Reputation: Disabled
Hi, Bschindler -

No offense ... but CGI is so 1995 ;-)

Assuming that "system ("rexec myprog")" doesn't work out, I suspect Cythia_thomas might feel comfortable writing a sockets app ... and might even enjoy using this as an opportunity to play with Ruby on Rails:

http://www.rubyonrails.com/

IMHO .. PSM

Cythnia_thomas - please take a glance at the links I gave you. I honestly think it'll help you make a better-informed, more intelligent decision!

Last edited by paulsm4; 05-20-2006 at 08:47 PM.
 
Old 05-21-2006, 09:07 PM   #7
BSchindler
Member
 
Registered: May 2006
Location: Los Angeles, CA USA
Distribution: RHAS3, RHAS4, RHEL4, RH6, RH7.2, FC2-7, Gentoo, DSL
Posts: 49

Rep: Reputation: 15
It is VERY obvious that Cynthia is not too network/linux saavy and I fear may not be up for writing server daemons or socket apps.

I was just trying to give her a very simple way to get started. Yes, cgi is 1995, but I manage 10000+ servers for over 850 domains. 80% + still use cgi (or a derivitive). New apps are rolled out daily -- using cgi. Even my broker uses PHP with GET/POST to .php (which is a cgi).

Were Cynthia to start writing socket apps, I think we would be here till next year helping to debug the code.

When I was teaching at "the farm", I quickly learned to start programmers off with relatively simple methods to get jobs done -- where conceptually the student began to grasp the underlying concepts -- in this instance as it applies to distributed computing. Later, when the light went on the better students immediately said "Uh hah, there is a better way ..." --time to introduce more advanced concepts.

If this is a business app this type of solution can be rolled out in an hour or two. Compare that with several man/women weeks learning socket programming and debugging what would probably be a poorly designed application.

So just my two cents. Were I managing the project I would encourage Cynthia to get the app out ... refine it later if the need merits additional resource committments.
 
Old 05-21-2006, 09:16 PM   #8
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Etch/Lenny/Squeeze
Posts: 3,477

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
Striking that most of the posters exhaust themselves in trying to guess what the OP means, and provide lengthy explanations of that, while the OP does not even take the effort to elaborate on what her problem is.

No offense, sometime I am so stupid myself, or I google for the poster, and reply with the first of the 2.765.897 links found.

Sometimes...

jlinkels
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote Script execution from the central location anil_garg5 Linux - General 5 05-11-2006 03:29 PM
Remote Execution issinho Linux - Networking 5 07-08-2005 01:11 PM
rcmd for remote execution shivaligupta Linux - Networking 3 06-10-2005 06:19 AM
Thorny remote execution question davidcrawley Linux - Software 3 09-03-2004 02:32 PM
Remote Command Execution via mobile phone Sammy2ooo Linux - Software 6 06-27-2003 03:42 AM


All times are GMT -5. The time now is 10:50 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration