Return-Path: Delivered-To: apmail-roller-user-archive@www.apache.org Received: (qmail 76366 invoked from network); 25 May 2010 12:48:21 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 May 2010 12:48:21 -0000 Received: (qmail 98722 invoked by uid 500); 25 May 2010 12:48:20 -0000 Delivered-To: apmail-roller-user-archive@roller.apache.org Received: (qmail 98386 invoked by uid 500); 25 May 2010 12:48:20 -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 98168 invoked by uid 99); 25 May 2010 12:48:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 May 2010 12:48:19 +0000 X-ASF-Spam-Status: No, hits=-0.4 required=10.0 tests=AWL,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of snoopdave@gmail.com designates 209.85.160.50 as permitted sender) Received: from [209.85.160.50] (HELO mail-pw0-f50.google.com) (209.85.160.50) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 May 2010 12:48:14 +0000 Received: by pwi10 with SMTP id 10so1428723pwi.9 for ; Tue, 25 May 2010 05:47:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Vpa5SGPdj1KZs1rAv3EdC0OCpAQzwFFdjmfSPDeL8zg=; b=hJFOUBO2tcl4VmatI67jn6I3cLxdBARpd6ZsFOcV4TPz+xGxKkliSNa83kmQ1hT74f kiO2Vwnb2JU0ed5S1nm73qmK8GaET3vqAUHjYIWkpg1RahegCZ4tz0iaoIN2+ngNX/7Z 6TrtyxIOv9tX2hwSj3oVG99xTbjrljj8rjvdg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=gKptd2dz7TGLpAdZeTQcPdm2Xm2cKZ7VvEa1+0gHGVUM6Y9mK2lbS+KEqC1CTKe2ID nQaQgJ0ZmOH7JeDXjLTWBf2j4Fx8ZZbIeVlT7qMTGxVoKm/8lfcXuuEQuWn79qf8X+dF /cNymUJZ8ptjI5RUBvFjWV1b6WYLiAIy8WDtw= MIME-Version: 1.0 Received: by 10.142.74.9 with SMTP id w9mr4427868wfa.305.1274791674099; Tue, 25 May 2010 05:47:54 -0700 (PDT) Received: by 10.143.157.14 with HTTP; Tue, 25 May 2010 05:47:54 -0700 (PDT) In-Reply-To: <738184.12639.qm@web306.biz.mail.mud.yahoo.com> References: <738184.12639.qm@web306.biz.mail.mud.yahoo.com> Date: Tue, 25 May 2010 08:47:54 -0400 Message-ID: Subject: Re: Roller's implementation on conditional Get From: Dave To: user@roller.apache.org, david.ming.xia@ibol.biz Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On Fri, May 21, 2010 at 12:09 PM, (David) Ming Xia wrote: > =A0=A0 This is about the implementation of conditional Get in Roller 4.0.= 1. > =A0=A0 As far as I see, Roller 4.0.1 supports conditional Get. Upon reque= st, Roller checks the =91If-Modified-Since=92 field in the http header, and= compares it with =91Last-Modified=92 attribute on server side.=A0 And then= either responds with a fresh page with status code 200, or responds with a= status code 304. That is true for blog pages and feeds only. > =A0 What I feel concerned is the part retrieving =91Last-Modified=92.=A0 = It is implemented in org.apache.roller.weblogger.ui.rendering.servlets.Page= Servlet.=A0 Attached you can see the sequence diagram, which depicts the re= lated class. I don't see any sequence diagram. This mailing list does not accept attachments. Perhaps you could post the picture somewhere and send a URL? Every time a weblog entry is added or changed, the=A0 =91last-modified=92 field of corresponding website table will be updated.=A0 For any http request, PageServlet has to go through a JPA named query to get the =91last-modified=92 value.=A0 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. > =A0=A0 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. Right, but CSS files and JS files that are file systems resources (theme files, etc.) are served directly by the Servlet Engine, which has its own conditional GET implementation, and NOT through the Roller PageServlet. > So for 10000 simultaneous page requests, there will be at least 100000 si= multaneous database queries.=A0=A0Furthermore, for any serious production e= nvironment, database and application server are on different tiers and the = connection is encrypted with SSL.=A0 So the picture to me it that, for limi= ted concurrent users it is fine, but=A0when request volume goes up, the ser= ver may suddenly chocked up. When something in a weblog changes, we invalidate the weblog's cache and this works well because lot more reads than writes. There might be a couple of bloggers and thousands of readers and subscribers. So, the cache is rarely invalidated. And like I said, the page servlet caches only pages so what you said about 100,000 database queries is not true unless you are storing CSS, JS and other static resources as Roller page templates -- which you should not be doing. - Dave