Applet communication differences

An applet I've installed on different platforms performs really bad in certain cases. When installed on Tomcat under Windows on a local PC, the performance is excellent. As soon as I install it under the same version of Tomcat on one of our Linux hosts, the performance is about ten times slower. I also tried installing it on OC4J on the same Linux host and the performance is almost as bad. What I noticed in tracing the applet with the Java console is that with the Windows install (which is on the same subnet and domain as my PC), the communication seems to be simple. There is a short JSESSIONID cookie. With the connection to the Linux machine (on a different domain and subnet), the console trace shows very long JSESSIONID cookie that I assume is some sort of certificate.

Can someone explain this and tell me how to get the same performance on the remote (Linux) host?

I'm using Tomcat 6 with JDK 1.5 and the local JVM is 1.6.

[957 byte] By [Zeoa] at [2007-11-27 5:14:48]
# 1

you are being misguided here. For one you think an applet runs on the host, but it is downloaded to the client and executed in the JVM running in the client browser, your host has nothing to do with the performance problems. Unless your applet is making a connection to the host, then I would know where the trouble is, in the network settings.

The real problem is: the problem is not in the code most likely, it is "something" in the running environment. Bad network settings causing a severe connection hang up or bad videocard drivers, a very active firewall, I don't know and I can't know. I don't have access to your system and I don't know what your applet does.

gimbal2a at 2007-7-12 10:36:51 > top of Java-index,Java Essentials,New To Java...
# 2
I did a YATT trace and the applet is performing HTTP communication with a listener servlet. On the Windows machine, 100 records are sent and recieved on one connection (about 50K of data) with 100 Posts. On the linux machine each post is in a different connection.
Zeoa at 2007-7-12 10:36:51 > top of Java-index,Java Essentials,New To Java...
# 3
That would have an impact, certainly. However, I'm not sure why the same version of Tomcat on 2 different platforms would behave differently with regards to keeping HTTP connections alive. Unless there's something specified differently in the startup batch and shell scripts.
bsampieria at 2007-7-12 10:36:51 > top of Java-index,Java Essentials,New To Java...
# 4

Looking at the trace, one of the developers here says he thinks that the container or servlet is loosing track of the session. I'm not so sure. I think it's rather an application error. The same "set-cookie" is visible in each HTTP response on the connection for the remote server, whereas it is not present on the local windows server.

Zeoa at 2007-7-12 10:36:51 > top of Java-index,Java Essentials,New To Java...
# 5

I passed an Ethereal trace of sessions against both servers and I see that on the bad connection there are [RST,ACK] packets sent from the client to the server, but I'm not very good at reading such things.

We've installed the app in several configurations:

LocalPC -> LAN -> LocalPC: Fast

LocalPC -> WAN -> Tomcat/Linux: Slow

LocalPC -> WAN -> OC4J/Linux: Slow

RemotePC -> LAN -> OC4J/Linux: Fast

LocalPC -> WAN -> Tomcat/AIX: Slow

LocalPC -> WAN -> OC4J/AIX: Slow

LocalPC -> WAN -> Tomcat/Windows: Slow

So for me it's obvious it is the WAN that is causing the problems. I tried seeing if there is a way to set the Applet to run with different socket parameters such as TCP_NODELAY, but I need to uncompile the code and set it in the code as there does not seem to be a system property for that.

Any ideas?

Zeoa at 2007-7-12 10:36:51 > top of Java-index,Java Essentials,New To Java...