?
Solved

RMI Performance Slow... Any Help?

Posted on 1998-01-16
4
Medium Priority
?
846 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 200 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month12 days, 11 hours left to enroll

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