JSP, session, 'caching'

From: Rico (ras_nas_at_yahoo.com)
Date: 12/17/04


Date: Sat, 18 Dec 2004 02:17:25 +0800

I'm working on this JSP page that's supposed to display data retrieved
from a database let's say 20 rows at a time. Currently, when we need the
x'th set of 20 rows, what's being done is to select the top 20 rows that
are not in the first (x-1) set of 20 rows.

Something tells me that somebody is just being naive here because a lot of
data is being requested for the purpose of being thrown away. I'm thinking
that it would be better if we could read the data into memory, suitable
data structures, and extract the rows from there as the user navigates
from one set/page of 20 rows to another.

However, the user would also be able to make modifications to the data. I
can either update the modified rows in the data structures accordingly or
throw everything away and refresh the data structures with the latest
contents of the database.

I'll be looking up some example of how to use what I think should be
'session' scope to achieve what I described. Suggestions welcome though.

I'm mainly wondering if there could be any tools or libraries that would
ease the implementation of this kind of, how to call it... caching? that
I am considering?

Thanks.

Rico.



Relevant Pages

  • Re: Critique of Robert C. Martins "Agile Principles, Patterns, and Practices"
    ... layer babysitting a database. ... Relations are the only needed data structures. ... object is defined as a set of n-tuples". ... the network model, you are trying to hijack the relational model. ...
    (comp.object)
  • Re: My project (new file system)
    ... > suggestions about the implementation (data structures and so on). ... I believe that a light database that is stored partly in memory would do.. ... I would propose a flat filesystem and a light prevalence-like database ...
    (comp.programming)
  • Re: Using 2003 within 2007
    ... My thinking now is that someone left the database open ... Each of these controls can "open" a table under the covers in order to ... this in my applications by closing the current form when the user navigates ... opening for filtering options. ...
    (microsoft.public.access.macros)
  • Re: Critique of Robert C. Martins "Agile Principles, Patterns, and Practices"
    ... The most common data structures used in current programming languages ... are lists and maps, so I think we can limit ourself to these ... there are no lack of ignorant software developers. ... advices about how to use a SQL database. ...
    (comp.object)
  • Re: creating database
    ... > I'm trying to create a database using ada. ... As an ada novice, I'm struggling. ... There are many well-known data structures to choose from, ...
    (comp.lang.ada)

Loading