• Post Reply Bookmark Topic Watch Topic
  • New Topic

Remote Program Invocation  RSS feed

 
josh Varma
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following code is an excerpt from a cppvm implemented cluster computing program. Here, cppvm spawns a connection to a remote system and invokes a precompiled program "slave_pgm" in the remote system which accepts objects by value from the master program. How can I perform the same function in java platform(without a server waiting for a connection ie, dynamic invocation of a remote program). Which technology in java will do the needful with high performance as the constraint ?
object1 obj1;
object2 obj2;
object3 obj3;
cppvmReceiveStream rs[10];
cppvmSendStream ss[10];
for (int i = 0; i < numberOfNodes; i++)
{
child[i]
= new cppvmSpawnConnection("slave_pgm", "", PvmTaskHost,
const_cast<char*>(nodeList[i].c_str()));
ss[i].set(*child[i], CPPvmSBchild);
rs[i].set(*child[i], CPPvmRBchild);
ss[i] << obj1 << obj2 << obj3 ;
}
 
Chris Shepherd
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Erm, I don't know that you can do that with java. The problem comes in the front when you have to invoke the new program on the remote machine. You specified that you needed to do this without a server waiting for a connection on the target machine. I actually submit to you that this code you gave depends on having a server of some type waiting for this code to connect to it, or else you already had a known connection between the pc running this code and the target. So in that sense java could do the same thing by a small java stalling app on the target that starts the registry and then twiddles its thumbs until you attempt to connect.
The only other option is if you execute system commands or call a batch file that essentially connects to and runs a batch file on the target. If you can run a batch file, you can do almost anything.
Any other qualifiers that you didn't mention that would make my solution invalid? You didn't mention the computer type or OS.
Chris
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!