DZone Forums
Go Back   DZone Forums > Community > Languages & Frameworks > Java
Reload this Page nobody has this problem? Slow down using RMI in Webstart?
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Mar 2008
Default nobody has this problem? Slow down using RMI in Webstart? - 09-23-2008, 02:17 PM

Hi

i searched and searched over the internet but nobody seems to have this problem that we have. I guess nobody uses RMI in a Webstart application?

First we had something like this remote method:

public MyReturnData performQuery(String, Integer)

This was just fast. but we changed our way of doing and now we do this:

public MyReturnData performQuery(OurCustomObject)


And now suddenly RMI calls are way slower especially if the client and server are pretty far from each other (europa and usa)
We searched and searched and suddenly noticed that for doing that simple call a lot of data that didnt even fit in 1 tcp package (1500 bytes). but it took between 4000 and 6000+ bytes.. So instead of 1 tcp package it where 3 or 4 packages. If we looked at the content we suddenly see for those things an enormous classpath in the data for pretty much every call!

This is because of

RMIClassLoader
public static String getClassAnnotation(Class<?> cl)

for a class that is loaded from the jnlpclassloader that will return a long string of all the urls that are in the classloader! But why we dont want that because our server has already those classes because the jnlp classloader got it from there!

The only thing that could help was setting the:

System.getProperty("java.rmi.server.RMIClassLoader Spi");

But that property which is a classname is loaded like this:

Class providerClass =
Class.forName(providerClassName, false,
ClassLoader.getSystemClassLoader());

with the system classloader! but my class that i set is ofcourse loaded by the jnlp loader so i get a ClassDefNotFound error... So this option is out.

I looked at looked and as far as i can see there is only 1 solution.. rewrite all our remote methods to something like this:


public MyReturnData performQuery(byte[])

and do our our object->byte[] first and back again on the other side..
This is really stupid...

But as i started, does really nobody see this? Or does everybody just accepts and thinks rmi is that slow when using with webstart?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PreparedStatement slow down the query execution? yanhua Java 1 09-26-2008 07:08 AM
Eclipse is too slow for editing Groovy code sontrang91 Eclipse 0 09-24-2008 12:55 AM
ant/eclipse/java 1.6.0_06 very slow dpm Eclipse 0 04-16-2008 03:07 AM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com