File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Performance and the fly likes JDBC vs. RMI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "JDBC vs. RMI" Watch "JDBC vs. RMI" New topic


Mr. C Lamont Gilbert
Ranch Hand

Joined: Oct 05, 2001
Posts: 1170

For communicating between client and server, which do you think is better performancewise?

To issue SQL calls through a JDBC driver that is connecting over a remote socket, or to get the same data through RMI?
steve souza
Ranch Hand

Joined: Jun 26, 2002
Posts: 862
Performance isn't the biggest issue here. Being as each alternative presumably serves the same purpse I would code to an interface (i.e. methods like getMyData()) and code the easiest most maintainable solution (or a simplified version for test purposes). Test this for performance and change it if it doesn't meet your performance needs. Being as you are coding to an interface it would be easy to swap implementations later if you need to.

An easy way to monitor your interface is to use JAMon. You simply have to add the following line of code and all method calls against your interface will be timed.

If you give a better feel for what you are trying to do (such as how many queries will be issued, how big are the tables etc that would be helpful as all these factors and more need to be known before answering the question).
[ January 03, 2007: Message edited by: steve souza ] - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
I agree. Here's the link:
subject: JDBC vs. RMI
It's not a secret anymore!