Hi David, If you are concerned with performance then you should use memcached to cache JPA lookups. You can also set explicit cache expires on your files. The last-modified issue you have specified above is the same on most dynamic systems where last-modified support based on time or etag is used.
J On 21 May 2010 17:09, (David) Ming Xia <[email protected]> wrote: > Hi, Everyone. > > This is about the implementation of conditional Get in Roller 4.0.1. > As far as I see, Roller 4.0.1 supports conditional Get. Upon request, > Roller checks the ‘If-Modified-Since’ field in the http header, and compares > it with ‘Last-Modified’ attribute on server side. And then either responds > with a fresh page with status code 200, or responds with a status code > 304. > > What I feel concerned is the part retrieving ‘Last-Modified’. It is > implemented in > org.apache.roller.weblogger.ui.rendering.servlets.PageServlet. Attached you > can see the sequence diagram, which depicts the related class. Every time a > weblog entry is added or changed, the ‘last-modified’ field of > corresponding website table will be updated. For any http request, > PageServlet has to go through a JPA named query to get the ‘last-modified’ > value. That value is not cached in memory, and it is not kind of way that > the entities float across context (any how...). So as far as I can see, it > is hard query. > But for one page query, there are usually at least ten http query, > including query for text/html file, css file, js file, images, and so on. > So for 10000 simultaneous page requests, there will be at least 100000 > simultaneous database queries. Furthermore, for any serious production > environment, database and application server are on different tiers and the > connection is encrypted with SSL. So the picture to me it that, for limited > concurrent users it is fine, but when request volume goes up, the server may > suddenly chocked up. > > I would appreciate if some one could respond and explain this, > or provide some good advices > > > Thank you very much. > > > David > -- _____________ John G. Moylan
