Discussions

EJB programming & troubleshooting: Handle with large result set

  1. Handle with large result set (1 messages)

    Hi,
    According to our requirement our J2EE application need to handle with large result set. (That’s mean some search criteria will return few thousands of items as search results. We are thinking apply Value Handler List pattern with DAO. But I need to evaluate how can we implement Value Handler List pattern with JDO. I need to compare and contrast DAO approach and JDO approach to Implement the said pattern.
    Can anyone like to share your practical experience with us? If you can tell your idea we may able to think in new dimensions.

    BR
    Senaka
  2. In one of my recent projects we had to display up to 10 thousands of entries in a table view.
    Table has a natural scroller rather then these ugly Next Page / Prev. Page artifacts at bottom. It shows only certain part of data, count of rows to send back to client was calculated as ViewPort size in rows multiply by some factor > 1, AFAIR, it was 4. All of these allowed user to scroll smoothly through data staying on the same page. So the data retrieval/transport part of program had to execute extremely fast.
    We used DAO pattern to return specified set of items, so called "page". We applied database-specific equivalents of FROM & COUNT to gain maximum efficiency (MS SQL 2000, Oracle 8.1.6+, PostgreSQL). The query was re-executed each time we need a "page". Then data was directly serialized in XML via identity transformation on our "SAX source over ResultSet". XML was passed directly back to client browser (IE 5.5+ / Mozilla 1.2+) and transformed via XSLT.

    It works superior for 50+ simultaneous users on JDK 1.4.1 / Linux / 512Mb / 1.1 GHz.

    Well, it’s not simply a DAO vs JDO comparison but rather a whole stack description. But, anyway, hope this will be helpful for you.

    VS