Solved

Another Corba question

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
servlet example 17 32
hibernate example using maven 12 42
jboss wildfly 10.1 10 94
Desingning Refactoring existing code 2 24
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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 tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

777 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