By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,542 Members | 1,097 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,542 IT Pros & Developers. It's quick & easy.

best way to remotely display a java GUI

P: n/a
This is all on linux using jdk1.3. My application is written in AWT,
no swing.

The application requires running it on the host machine and tunneling
the GUI back to a client. I've been doing this via an ssh session.
In the building the GUI works pretty much as if I was running it
directly from the host machine, no lags or performance problems. Over
longer distances I start to see some lagging, the GUI loses some
responsiveness, it's not really a handicap at that point, but the
delays are definitely noticeable.

From home logged in via my roadrunner connection, I see substantial
delays, that really impact the usefulness of the system. I can run
GTK based applications over the same ssh session, and those respond
beautifully.

Obviously there's some performance problem there, and I'm trying to
figure it out, and how to get around it. I've tried xhost from a
telnet session, didn't really help much, so I'm guessing it's not SSH.

So several questions come up:
1. What programming issues could I have ignored or missed that are
causing this to happen? What things can I tighten up in my GUI code
to add vigor to the GUI?

2. Is there a way of tunneling the GUI back that would get around
these problems? The GTK based apps are rocking beautifully, even with
the the poorer connection. Why don't they take the same performance
hit? It doesn't seem like it's a straight java vs. native code issue.
Is the support in X that different?

I'd seen pretty horrible performance tunneling Swing applications
before, so I've shied away from Swing.

I tried the j2sdk v. 1.4.2, and actually got worse performance. Is
that a clue?

Thanks,

-Charles

ps. please email me at lo******@ifa.hawaii.edu
Jul 17 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Have u heard of code mobility? Its a bit complicated - it invloves
sending class files over from the remote host to the local machine.
Once there, the classes can be loaded and the application can be run
locally.

Of course this requires some advanced coding and makes some
assumptions such as the local host having the JRE etc. read up on it
if interested.

--
Fahd Shariff
http://www.fahdshariff.cjb.net
"Let the code do the talking..."
Jul 17 '05 #2

P: n/a
isn't Linux beautiful....!

i've got a dual boot machine here and right now i'm writing to from
windows xp..... AWK!!!!!!!!!!!!!!!!

what the hell am i'm doing.....??????

one moment please....

- perry

Zach wrote:
This is all on linux using jdk1.3. My application is written in AWT,
no swing.

The application requires running it on the host machine and tunneling
the GUI back to a client. I've been doing this via an ssh session.
In the building the GUI works pretty much as if I was running it
directly from the host machine, no lags or performance problems. Over
longer distances I start to see some lagging, the GUI loses some
responsiveness, it's not really a handicap at that point, but the
delays are definitely noticeable.

From home logged in via my roadrunner connection, I see substantial
delays, that really impact the usefulness of the system. I can run
GTK based applications over the same ssh session, and those respond
beautifully.

Obviously there's some performance problem there, and I'm trying to
figure it out, and how to get around it. I've tried xhost from a
telnet session, didn't really help much, so I'm guessing it's not SSH.

So several questions come up:
1. What programming issues could I have ignored or missed that are
causing this to happen? What things can I tighten up in my GUI code
to add vigor to the GUI?

2. Is there a way of tunneling the GUI back that would get around
these problems? The GTK based apps are rocking beautifully, even with
the the poorer connection. Why don't they take the same performance
hit? It doesn't seem like it's a straight java vs. native code issue.
Is the support in X that different?

I'd seen pretty horrible performance tunneling Swing applications
before, so I've shied away from Swing.

I tried the j2sdk v. 1.4.2, and actually got worse performance. Is
that a clue?

Thanks,

-Charles

ps. please email me at lo******@ifa.hawaii.edu


Jul 17 '05 #3

P: n/a
zach:

i think what you have to consider are the fundamental differences
between how the GTK applications and Java. for one thing the gtk apps
over ssh have had a long time to be engineered properly to run most
efficiently over an ssh connection, whereas the defaul behaviour for ssh
to run an application that it may not be directly familiar with is to do
a literal binary copy (upload) to the client with respect to java. Now
java does not have to run in this fashion, however.

the big question is, what exactly is the java app you are sending over?
is it just the jar file or the whole jre ? and once it gets over, why
the lag in performance ? alot depends on the client/server framework
your app is based on. are you relying on the default remote protocol for
java apps, that is, RMI? that can be a bit taxing when on by default...

Sockets maybe a much better way to go.....

Typically, in a distributed app, java applications need to be
distributed in a jar file. This can require an initial d/l lag
accordingly. Here's where the brains of a good architect come into play.
Trying to design slim clients and not fat ones....

just a few ideas...

- perry
ps.
i'm now writing to you from my red hat client (shrike), ouitside of the
sound card problem, everything else is working beautifully...
Zach wrote:
This is all on linux using jdk1.3. My application is written in AWT,
no swing.

The application requires running it on the host machine and tunneling
the GUI back to a client. I've been doing this via an ssh session.
In the building the GUI works pretty much as if I was running it
directly from the host machine, no lags or performance problems. Over
longer distances I start to see some lagging, the GUI loses some
responsiveness, it's not really a handicap at that point, but the
delays are definitely noticeable.

From home logged in via my roadrunner connection, I see substantial
delays, that really impact the usefulness of the system. I can run
GTK based applications over the same ssh session, and those respond
beautifully.

Obviously there's some performance problem there, and I'm trying to
figure it out, and how to get around it. I've tried xhost from a
telnet session, didn't really help much, so I'm guessing it's not SSH.

So several questions come up:
1. What programming issues could I have ignored or missed that are
causing this to happen? What things can I tighten up in my GUI code
to add vigor to the GUI?

2. Is there a way of tunneling the GUI back that would get around
these problems? The GTK based apps are rocking beautifully, even with
the the poorer connection. Why don't they take the same performance
hit? It doesn't seem like it's a straight java vs. native code issue.
Is the support in X that different?

I'd seen pretty horrible performance tunneling Swing applications
before, so I've shied away from Swing.

I tried the j2sdk v. 1.4.2, and actually got worse performance. Is
that a clue?

Thanks,

-Charles

ps. please email me at lo******@ifa.hawaii.edu


Jul 17 '05 #4

P: n/a
one thing to consider if you want to use sockets or a packet approach
over ssh is that you may have to resort to a file sharing operation. i
would imagine ssh is designed to allow the ssh client to open files on
the server. this would also be a cool way to develop you app as you
don't need to develope it while using a ssh client session.

cheers

- perry

Zach wrote:
This is all on linux using jdk1.3. My application is written in AWT,
no swing.

The application requires running it on the host machine and tunneling
the GUI back to a client. I've been doing this via an ssh session.
In the building the GUI works pretty much as if I was running it
directly from the host machine, no lags or performance problems. Over
longer distances I start to see some lagging, the GUI loses some
responsiveness, it's not really a handicap at that point, but the
delays are definitely noticeable.

From home logged in via my roadrunner connection, I see substantial
delays, that really impact the usefulness of the system. I can run
GTK based applications over the same ssh session, and those respond
beautifully.

Obviously there's some performance problem there, and I'm trying to
figure it out, and how to get around it. I've tried xhost from a
telnet session, didn't really help much, so I'm guessing it's not SSH.

So several questions come up:
1. What programming issues could I have ignored or missed that are
causing this to happen? What things can I tighten up in my GUI code
to add vigor to the GUI?

2. Is there a way of tunneling the GUI back that would get around
these problems? The GTK based apps are rocking beautifully, even with
the the poorer connection. Why don't they take the same performance
hit? It doesn't seem like it's a straight java vs. native code issue.
Is the support in X that different?

I'd seen pretty horrible performance tunneling Swing applications
before, so I've shied away from Swing.

I tried the j2sdk v. 1.4.2, and actually got worse performance. Is
that a clue?

Thanks,

-Charles

ps. please email me at lo******@ifa.hawaii.edu


Jul 17 '05 #5

P: n/a
hey zach,

Code mobility is a very new thing which is mainly used in mobile and
adaptive systems. I have to admit, i do not know much about it nor
have i actually programmed anything that uses it but i can point you
to some research papers that i have read:

Adaptable Mobile Applications: Exploiting Logical Mobility in Mobile
Computing
http://www.cs.ucl.ac.uk/staff/c.mascolo/www/mata03.pdf

Understanding Code Mobility
http://www.elet.polimi.it/upload/pic.../icse00tut.pdf

--
Fahd Shariff
http://www.fahdshariff.cjb.net/
"Let the code do the talking..."
Jul 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.