?
Solved

Another Corba question

Posted on 2004-08-26
5
Medium Priority
?
171 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
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…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month9 days, 20 hours left to enroll

762 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