Hi,
> We are workin on creating an intranet solution. We have an item table
>
> with around 5000 records which will keep growing.
>
> This table is accessed on almost all pages by all users. (approx 500
>
> users)
>
> Which is the most efficient way of providing the access.. considering
>
> that response time is very crutial.
>
> 1. Bring all records to client side and manipulate in javascript.
Uh..5000 records for each and every of 500 clients is a shit ton of
bandwidth. Forget this option completely. Plus..avoid JavaScript if you
possibly can..so your site will work on more browsers.
> 2. Populate a vector on the server side and keep it in application
Yes and no. First, if you have a good database, it usually provides some
sort of caching..so why cache the whole thing yourself? Let the database
(and JDBC2.0) handle this stuff for you..it will most likely do it better
anyways.
Second, application scope is not the solution..at least if you plan to
update any of these records. If they are only for viewing then it should be
ok since multiple threads can access the same data without any concurrent
exceptions being thrown. Just make sure its not updatable.
Third, how about the familiar multi-page approach, where by you list 10
items per page, and a series of numbers that are links that represent the
next 10, 100, etc records? This way the user can jump to a given range of
results. You can allow them to specify the number of rows per page to view
as well..increasing download time, but decreasing the number of pages to
search through.
>
> scope.
> 3.Use an XML file to parse from the JSP instead of hitting the database
Well, using a RDBMS gives you a number of other capabilities, but using XML
to store the values might not be bad. I think Oracle and some other
databases have support or adding support for an XML field type so that you
can search through an XML field for a specific column in the XML tree..but
not sure on this. Personally, I would keep it as a full set of rows/columns
in standard RDBMS notation..using EJB if possible or at least sticking to
JDBC2.0 and using the containers connection pooling and resource management
as much as possible. By utilizing EJB and at that, CMP, the container can
better optimize searches, updates, etc for the JDBC 2.0 database.
>
> directly.
>
> Thanks in advance,
> Vini
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets