Solved

RMI Performance Slow... Any Help?

Posted on 1998-01-16
4
806 Views
Last Modified: 2012-06-22
I have developed a RMI application in visual age for java, but the perform is very slow. (P.C. : 266MHz Pentium 2, 64MB, 600MB free hard disk space).

For example, to retrieve and populate 3 lists with data from  informix database is about 16sec.

The network that I am working on is Token Ring.

Is there any way I can improve RMI performance?
0
Comment
Question by:kiatyian
  • 2
4 Comments
 
LVL 6

Expert Comment

by:jpk041897
ID: 1232238
One of the problems you might be running into (without seeing the pertinent parts of the code) is that you might be transfering a single field (or record) at a time. This causes considerable network overhead plus causing the DB to re-querry each time

If this is the case, try building a record that transfers an array, thus buffering the information, or building a large string  (or group of large strings) containing the result set of your Querry.

In general, what you need to pursue is to transfer large blocks of data per RMI transaction.

You could also implement an RMI buffering mechanism, but this is probably more work than is wort for your application.
0
 

Author Comment

by:kiatyian
ID: 1232239
Hi jpk,

In fact, the result set retrieved from the database has been buffered into an array. The number of records retrieved for the 3 list boxes are 60, 200, 200 respectively.

According to your experience, have you encountered such performance problem in RMI? If you don't, how did you do that?

Thanks for your reply.


0
 
LVL 6

Expert Comment

by:jpk041897
ID: 1232240
I dropped RMI in favor of CORBA. RMI's binding mechanism is slow.

Best way to check if your problem is network centered or binding centered is to bind over a local loopback (127.0.0.1).

Time this close loop, if your problem is Binding oriennted, than you might want to consider changing dynamic binding to static binding. If the times are slow, look for proxy servers, firewalls, trafic and/or combinations of the above. Also check for your DB servers response times and work load. RMI is slow, but not nearly as slow as you are experiencing.
0
 
LVL 5

Accepted Solution

by:
fontaine earned 100 total points
ID: 1232241
Your problem is probably related to this FAQ:

"Why does naming bind and lookup takes an extraordinarily long time on Windows?"

http://java.sun.com/products/jdk/rmi/faq.html#bind

Be also sure your RMI server connects once for all to the database, instead of opening a new database connection for each new query, for example.


0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now