my dog learned polymorphism*
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "JDBC vs. RMI" Watch "JDBC vs. RMI" New topic
Author

JDBC vs. RMI

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: 860
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 ]

http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC vs. RMI
 
Similar Threads
How to store in a database
multi tiered jdbc driver?
how to receive a result set
Does SCJP 1.5 includes Networking?
Protocol of JDBC drivers using