• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Performance Tuning

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
In Fact i build a web application developped under Oracle Jdeveloper 9i.
This web application contains a jsp files and java classes.
The web application communicates with oracle database 8i through JDBC Driver.
The Web server is hosting in Lebanon - Beirut.
The database is located in France - Paris .
These two servers are connected through a secure VPN.
I made testing for my web application in my lab where the connexion between these two servers are LAN and the time response was good.
The problem resides on hosting this web application
on the real web server located in lebanon and the database located in Paris that the response time is too high.
Can anyone advise me technically [programming level] where we can performing my code or give me some document that talks about performing our web application using java technology.
in Case of help please my email is fouad.fares@saradar.com and i will give a sample of my web pages.
Best Regards,
Fouad Fares.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Fouad,
Well the gist of it is that you need to reduce your network/database traffic. A good way to do that it is to eliminate all unnessary data being returned from your query.
If you post more details, people might be able to give you a more specific answer.
 
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Fares:
I am going to suggest some ways that might enhance the speed of your application caching your data on your web server as much as possible and then transferring the block data to your database server; you might consider value object pattern in this case to reduce network traffic if you are not already doing that. Also think about batch updates - which means sending data to your database serverin batches where possible.
 
Fouad Fares
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I think that batch idea is more logical then having direct access from web server to DB server through VPN .
In case of batch i create a DB Server connected to the web server with lan. and the new DB server will be refreshed through batch program that make update data from the original DB server located in Paris.
But in this case i can have the data as a real time.
So from your point of view the problem resides in the architecture and not in the application code.
In this case to simulate the problem, i will create an image DB connected to the web server as LAN and make the comparison in response time for the cases [LAN - VPN] with a dial up conection to the web server.
I will give you the comparison when done ASAP.
Thank you for your collaboration.
Best Regards
Fouad Fares
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perhaps it's more on the Design Architecture of your application.
The following consists of some of the points that come across my mind, perhaps someone mentioned that above already. I have limited them to Programming level:
(1) Try to do sorting and grouping in database, and make sure the set of Resultset returned should be kept to the minimum.
(2) Try to "cache" lists of data into session object, especially for those lists that are mostly "read-only" by users at the front end. Therefore in your code, only fetch the database if a certain list is absent in your session. This saves the communications beteen Business Tier and Database Tier.
(3) For every necessary database operation, try to do it by one SQL statement instead of several statements. This argument is obvious ...
(4) If you find out the main bottleneck is not in the physical connection (VPN vs LAN) level, then try to use a more efficient data structure as possible, while without violating the system integrity. For example, consider using ArrayList instead of Vector (for faster add(...) and get(..)). Or replace LinkSortedSet with pre-sorting done in Database Tier etc.
(5) Apply index to your tables in database, and make sure all SQL statements that have join tables are optimized. Using Left Inner Join / Right Inner Join, Outer Join appropriately will definitely enhance performance.
just my 2 cents, and hope I am getting to you point!
Wendal
[ May 07, 2004: Message edited by: Wendal Park ]
 
He puts the "turd" in "saturday". Speaking of which, have you smelled this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic