Search code examples
javaperformanceclient-serverrmi

How to improve the performance of Client-Server Architecture Application?


We have a product built on the Client-Server architecture. Some details about the technology stack used.

  • Client - Java Swing
  • Server - RMI
  • Java Database - Oracle

The clients are located at different parts of the world but the java server & the oracle database are located on the same machine in Sweden. Because of this there is a lot of network latency. The clients located at distant locations have terrible performance. The application is used for processing files with the size over 50MB. Each operation in general requires about over 1000 Network calls.

Based on your experience, how do you tackle this problem and improve the performance?

EDIT: To answer a few questions

  1. Files contains the actual business data which needs to be processed and updated to the database cannot be sent in part.
  2. Some of the network calls could be batched but it would require major refactoring of the code. This is a very old application written way back in 2001. And the design of the application is such that, the server holds all the services and they are made reusable across the code and the business logic is written on the client side. So, this business logic calls server numerous times and hence the astronomical figure.

-Snehal


Solution

  • Decrease your number of round trips

    1000 round trips for a single operation is an astronomic figure. No way you should be seeing those numbers.

    You still have a problem though with the 50MB files. In which case, you will either need to find a way to make the transfer more efficient (transfer only deltas between two similar files?), or employ caching of some sort.

    The WAN traffic is killing your app, and it sounds like you have major refactoring to do.