Return-Path: Delivered-To: apmail-roller-user-archive@www.apache.org Received: (qmail 17608 invoked from network); 21 May 2010 16:09:50 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 May 2010 16:09:50 -0000 Received: (qmail 75888 invoked by uid 500); 21 May 2010 16:09:50 -0000 Delivered-To: apmail-roller-user-archive@roller.apache.org Received: (qmail 75841 invoked by uid 500); 21 May 2010 16:09:49 -0000 Mailing-List: contact user-help@roller.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@roller.apache.org Delivered-To: mailing list user@roller.apache.org Received: (qmail 75822 invoked by uid 99); 21 May 2010 16:09:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 May 2010 16:09:49 +0000 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [68.142.199.182] (HELO web306.biz.mail.mud.yahoo.com) (68.142.199.182) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 21 May 2010 16:09:38 +0000 Received: (qmail 14025 invoked by uid 60001); 21 May 2010 16:09:15 -0000 Message-ID: <738184.12639.qm@web306.biz.mail.mud.yahoo.com> X-YMail-OSG: 1dqxhEMVM1lVc1Or.fTVMfdScSU79qZLUZ_C1hntQbJCAbZ _R5dMZDirvgAtkcE0P7cMp6YC8rmUDRBLOSjcHRIguQ6v2Th8KdqUEIpDyn_ CxjQiQ7LXKc1lPfiw7LnNfXtezpCA_jCLn3ft2bPis9wbmPwCEHORraXtpp7 tv1zs8vB9hw44mIiT5sEAXS7iFGh96yszwH85U77KNsiHM3cKpCXwFPdCwi3 mm9AK782CaLPb.mHyikYUqhWV5SZiKKTo Received: from [70.91.36.14] by web306.biz.mail.mud.yahoo.com via HTTP; Fri, 21 May 2010 09:09:15 PDT X-Mailer: YahooMailClassic/11.0.8 YahooMailWebService/0.8.103.269680 Date: Fri, 21 May 2010 09:09:15 -0700 (PDT) From: "\(David\) Ming Xia" Reply-To: david.ming.xia@ibol.biz Subject: Roller's implementation on conditional Get To: Mailing List Apache Roller User , Mailing List Apache Roller Developer MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-535299582-1274458155=:12639" X-Virus-Checked: Checked by ClamAV on apache.org --0-535299582-1274458155=:12639 Content-Type: multipart/alternative; boundary="0-130773141-1274458155=:12639" --0-130773141-1274458155=:12639 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Everyone. =C2=A0=C2=A0 This is about the implementation of conditional Get in Roller = 4.0.1. =C2=A0=C2=A0 As far as I see, Roller 4.0.1 supports conditional Get. Upon r= equest, Roller checks the =E2=80=98If-Modified-Since=E2=80=99 field in the = http header, and compares it with =E2=80=98Last-Modified=E2=80=99 attribute= on server side.=C2=A0 And then either responds with a fresh page with stat= us code 200, or responds with a status code 304.=C2=A0=C2=A0=C2=A0=C2=A0=20 =C2=A0 What I feel concerned is the part retrieving =E2=80=98Last-Modified= =E2=80=99.=C2=A0 It is implemented in org.apache.roller.weblogger.ui.render= ing.servlets.PageServlet.=C2=A0 Attached you can see the sequence diagram, = which depicts the related class.=C2=A0 Every time a weblog entry is added o= r changed, the=C2=A0 =E2=80=98last-modified=E2=80=99 field of corresponding= website table will be updated.=C2=A0 For any http request, PageServlet has= to go through a JPA named query to get the =E2=80=98last-modified=E2=80=99= value.=C2=A0 That value is not cached in memory, and it is not kind of way= that the entities float across context (any how...).=C2=A0 So as far as I = can see, it is hard query.=C2=A0=20 =C2=A0=C2=A0 But for one page query, there are usually at least ten http qu= ery, including query for text/html file, css file, js file, images, and so = on.=C2=A0 So for 10000 simultaneous page requests, there will be at least 1= 00000 simultaneous database queries.=C2=A0=C2=A0Furthermore, for any seriou= s production environment, database and application server are on different = tiers and the connection is encrypted with SSL.=C2=A0 So the picture to me = it that, for limited concurrent users it is fine, but=C2=A0when request vol= ume goes up, the server may suddenly chocked up. =C2=A0 =C2=A0=C2=A0 I would appreciate if some=C2=A0one could respond and explain = this, or=C2=A0provide some good advices=C2=A0 =C2=A0 =C2=A0 Thank you very much. =C2=A0 =C2=A0 David --0-130773141-1274458155=:12639 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi, Everyone.

   This is about the implementation of conditional Get i= n Roller 4.0.1.
   As far as I see, Roller 4.0.1 supports conditional Get. U= pon request, Roller checks the =E2=80=98If-Modified-Since=E2=80=99 field in= the http header, and compares it with =E2=80=98Last-Modified=E2=80=99 attr= ibute on server side.  And then either responds with a fresh page with= status code 200, or responds with a status code 304.   &nbs= p;

  What I feel concerned is the part retrieving =E2=80=98Last-= Modified=E2=80=99.  It is implemented in org.apache.roller.weblogger.u= i.rendering.servlets.PageServlet.  Attached you can see the sequence d= iagram, which depicts the related class.  Every time a weblog entry is= added or changed, the  =E2=80=98last-modified=E2=80=99 field of corre= sponding website table will be updated.  For any http request, PageSer= vlet has to go through a JPA named query to get the =E2=80=98last-modified= =E2=80=99 value.  That value is not cached in memory, and it is not ki= nd 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 ht= tp query, including query for text/html file, css file, js file, images, an= d so on.  So for 10000 simultaneous page requests, there will be at le= ast 100000 simultaneous database queries.  Furthermore, for any s= erious production environment, database and application server are on diffe= rent tiers and the connection is encrypted with SSL.  So the picture t= o me it that, for limited concurrent users it is fine, but when reques= t volume goes up, the server may suddenly chocked up.
 
   I would appreciate if some one could respond and exp= lain this, or provide some good advices 
 
 
Thank you very much.
 
 
David
--0-130773141-1274458155=:12639-- --0-535299582-1274458155=:12639--