Solved

Another Corba question

Posted on 2004-08-26
5
165 Views
Last Modified: 2011-04-14
I think I am having trouble understanding how Corba might work for me.

Basically, I need to run an app on a windows machine, that sends a signal to a linux machine, and makes the linux machine run commands that run a linux based program, the linux based program prompts for information, so the windows app would have to supply that information, run the script, then get the results of the script and put the variables in a database.

Is that possible?

Thank you.
0
Comment
Question by:k41d3n
5 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 11903846
Yes it is possible. What will the client and server be written in, Java? Or you need CORBA for different architectures?


Regards
0
 
LVL 2

Author Comment

by:k41d3n
ID: 11904139
I can do both in Java I suppose.

On the windows end, it has to integrate with Test Director, but I know I can do that in Java, I just don't fully understand how to issue the commands to the linux machine and then return the values to the windows machine.
0
 
LVL 35

Expert Comment

by:girionis
ID: 11904245
You have to have a server on the linux machine listening for commands. Then the server will translate these commands to actions. For example (lets say) if the server on Linux receives the "RUN LS" then it should run the "ls" command and return a message back. This should be done for all possible commands you want to implement.

In order to issue the command you will have to think about the protocol. A good suggestion would be TCP/IP but you can use any other protocols rally (HTTP, RMI etc). You will need to get the i/o stream of the sockets and then exchange data through them.
0
 
LVL 7

Expert Comment

by:lhankins
ID: 11904403
BTW - if you're going to have Java on both ends, it would probably be much easier for you to use RMI instead of CORBA.

0
 
LVL 14

Accepted Solution

by:
existenz2 earned 500 total points
ID: 11908962
Most suitable for doing this would be using Corba or RMI. Corba has the advantage that it works with lots of different languages, but if you can make the server also in Java. RMI is also a good possibilty. It's more a question of what you think is the easiest:
Corba:
http://www.omg.org/gettingstarted/
http://java.sun.com/developer/onlineTraining/corba/corba.html
http://www.cs.indiana.edu/~kksiazek/tuto.html

RMI:
http://java.sun.com/docs/books/tutorial/rmi/

eg:
Runtime.getRuntime().exec("ls")
Runtime.getRuntime().exec(new String[] { "ls", "-la" })

Or when you want to have the output back:
Process process = Runtime.getRuntime().exec("ls -la");
InputStream input = process.getInputStream();



0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This video teaches viewers about errors in exception handling.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now