views:

10

answers:

0

The functionality that i have now enables me to generate charts(graphs/tables etc), from the XML data created by manipulating results extracted from the database. This works good when i have a limited amount of data. But as the data grows the time to generate charts increases substantially.

Following is an example scenario that describes the type of data i m dealing with:

  1. I extract list of test (test1, test2 ...... test5000);

  2. Now i extract the status of each of the test for past x number of days.

  3. Compare the status history of each test w/ the others, and generate an XML.

  4. This XML is returned to the client side for a Flash based charting app. to render.

I m looking for techniques on the server side which allow me to skip some steps (at least 1 and 2) for duplicate requests when i know that the data has not changed.

I've been thinking on the following lines, but i'm looking for other suggestion as well. I want to use a formal/tested approach to this problem - as it includes many different charts and if the solution isn't clean it can get messy soon. :-)

I've been thinking about saving the data/XML to the disk. And each time a request is made i return the already created XML. But i'm unaware of the pros/cons. I'm curious if there is a framework which enables such kind of implementations?

P.S I'm not looking for database caching/optimization techniques. Technologies im using are JSP/Struts/AJAX/MySQL