Solved

Another Corba question

Posted on 2004-08-26
5
164 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
copyEndy  challenge 15 58
factorial example challenge 10 62
count7 challenge 12 70
firstChar challenge 13 86
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
The viewer will learn how to implement Singleton Design Pattern in Java.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

746 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

14 Experts available now in Live!

Get 1:1 Help Now