roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "\(David\) Ming Xia" <>
Subject Roller's implementation on conditional Get
Date Fri, 21 May 2010 16:09:15 GMT
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
Thank you very much.

  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message