Improving ServletConnection to make it cache-aware
Hello, I would like to discuss making ServletConnection cache-aware. Daniel suggested earlier to utilize standard HTTP protocol concepts. I totally agree with his opinion and would like to propose solution, but first let's discuss requirements. Requirements Requirements that ServletConnection must meet are really simple: 1. ServletConnection should provide data that can be used for constructing small validation object. 2. ServletConnection should expose functionality for checking if previous response is still valid taking as input validation object only. 3. We would like ServletConnection to make as few as possible round trips in every situation it encounters. To satisfy these requirements I propose to use concept of HTTP conditional gets[1], more precisely If-Modified-Since request-header[2] field. This way we have following cases: * ServletConnection does not have information needed to create If-Modified-Since header, but response includes Last-Modified header and full content. Validity object can be created. * ServletConnection does not have information needed to create If-Modified-Since header and response does not include Last-Modified header but includes full content. Validity object cannot be created. * ServletConnection does have information needed to create If-Modified-Since. Resource has not been modified so 302 status code is returned as response and response does not include full content. Thus ServletConnection can just tell that content is still valid and can be fetched from cache. * ServletConnection does have information needed to create If-Modified-Since. Resource has been modified so 200 status code is returned as response and response includes full content. ServletConnection tells that cached content is invalid and returns fresh content. Requirements are satisfied: 1. Last-Modified header can be used to construct validation object. 2. Taking date from validation object enables ServletConnection to formulate conditional GET and then response HTTP code settles if resource is still valid. 3. In every case we have only one round trip. Implementation proposal === We should start from making pipelines more HTTP-compliant. This demands taking If-Modified-Since headers into account and returning appropriate status code when caching pipeline is processed. Behavior of non-caching pipelines should not change. Then we should implement setIfModifiedSince and getIfModifiedSince from java.net.URLConnection and construct requests according to value of that property. Also getResponseCode method should be implemented. All changes proposed above will enable us to implement source validation of ServletSource very easily. Comments? Thoughts? I can start implementing this as soon as we came with agreement on this. However, I would like to point out that I'll need some support to make changes in pipeline stuff. I've taken a look on code and not everything seems to be clear. Any volunteer on the board? ;-) Last remark. I know that my English is quite poor and it could be that I do not express my thoughts clearly enough. I'm really working on it and you should not hesitate to ask when something is hard to understand. [1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3 [2] http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.25 -- Grzegorz Kossakowski
[jira] Updated: (COCOON-1993) Make Forms resources loaded directly
[ https://issues.apache.org/jira/browse/COCOON-1993?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Grzegorz Kossakowski (aka g[R]eK) updated COCOON-1993: -- Attachment: cocoon-forms-sample-patch-3.txt cocoon-forms-sample-patch-3.txt: Patch adapted to the latest changes of servlet-service-fw, see http://article.gmane.org/gmane.text.xml.cocoon.cvs/23271 for details. > Make Forms resources loaded directly > > > Key: COCOON-1993 > URL: https://issues.apache.org/jira/browse/COCOON-1993 > Project: Cocoon > Issue Type: Sub-task > Components: Blocks: Forms >Affects Versions: 2.2-dev (Current SVN) >Reporter: Grzegorz Kossakowski (aka g[R]eK) > Fix For: 2.2-dev (Current SVN) > > Attachments: cocoon-forms-impl-patch-1.txt, > cocoon-forms-impl-patch-2.txt, cocoon-forms-impl-patch-3.txt, > cocoon-forms-sample-patch-1.txt, cocoon-forms-sample-patch-2.txt, > cocoon-forms-sample-patch-3.txt > > > Steps required to achieve this goal are the same as in > https://issues.apache.org/jira/browse/COCOON-1992 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (COCOON-1993) Make Forms resources loaded directly
[ https://issues.apache.org/jira/browse/COCOON-1993?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Grzegorz Kossakowski (aka g[R]eK) updated COCOON-1993: -- Attachment: cocoon-forms-impl-patch-3.txt cocoon-forms-impl-patch-3.txt: Patch adapted to the latest changes of servlet-service-fw, see http://article.gmane.org/gmane.text.xml.cocoon.cvs/23271 for details. This patch also makes use of servletLinkRewriterReader introduced in COCOON-1997. This way, refactoring of resources locations seems to be complete. This applies to the resources exposed to browser (html code, js, etc). I'm thinking of refactoring links in server-side resources (xsl, js for flowscript) but it's not priority-critical. > Make Forms resources loaded directly > > > Key: COCOON-1993 > URL: https://issues.apache.org/jira/browse/COCOON-1993 > Project: Cocoon > Issue Type: Sub-task > Components: Blocks: Forms >Affects Versions: 2.2-dev (Current SVN) >Reporter: Grzegorz Kossakowski (aka g[R]eK) > Fix For: 2.2-dev (Current SVN) > > Attachments: cocoon-forms-impl-patch-1.txt, > cocoon-forms-impl-patch-2.txt, cocoon-forms-impl-patch-3.txt, > cocoon-forms-sample-patch-1.txt, cocoon-forms-sample-patch-2.txt > > > Steps required to achieve this goal are the same as in > https://issues.apache.org/jira/browse/COCOON-1992 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Re: Releasing from trunk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 9 Feb 2007, Jorg Heymans wrote: Date: Fri, 09 Feb 2007 22:19:22 +0100 From: Jorg Heymans <[EMAIL PROTECTED]> Reply-To: dev@cocoon.apache.org To: dev@cocoon.apache.org Subject: Re: Releasing from trunk Giacomo Pati wrote: It's the default of Continuum to build a modularized M2 project in isolation (see build command in the Continuum Config Page). We build our modularized M2 project as a hole and do not have the problem you mentioned above. It is just a matter how you define your project in Continuum. You mean you configured it as a shell project ? Not sure i can follow you here. We're talking about CI 1.0.3 right ? No, no, I've removed the "--non-recursive" flag from the invocation command and only have the root pom be built. Ciao - -- Giacomo Pati Otego AG, Switzerland - http://www.otego.com Orixo, the XML business alliance - http://www.orixo.com -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.1 (GNU/Linux) iD8DBQFFzZqoLNdJvZjjVZARAj0KAKCLxdI4QiNpaPi1BLHr8VNbD9oPQwCcDdzV azhHyhb3TsV7+NXBFviNC9o= =RzoG -END PGP SIGNATURE-
[jira] Updated: (COCOON-1997) Configure servlet: links rewriting
[ https://issues.apache.org/jira/browse/COCOON-1997?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Grzegorz Kossakowski (aka g[R]eK) updated COCOON-1997: -- Attachment: cocoon-servlet-service-components-linkrewriting-patch-2.txt cocoon-servlet-service-components-linkrewriting-patch-2.txt: This patch introduces new reader discussed here: http://article.gmane.org/gmane.text.xml.cocoon.devel/70027 This is my first Spring component written for Cocoon, I hope it will work as expected. NOTE: LinkRewriterReader does not implement caching yet. I'm going to implement it later. Patch includes changes from cocoon-servlet-service-impl-linkrewriting-transformer-patch-1.txt. Changes made in cocoon-webapp-switch-to-servlet-service-patch-1.txt are already committed. > Configure servlet: links rewriting > -- > > Key: COCOON-1997 > URL: https://issues.apache.org/jira/browse/COCOON-1997 > Project: Cocoon > Issue Type: Sub-task > Components: - Blocks Framework >Affects Versions: 2.2-dev (Current SVN) >Reporter: Grzegorz Kossakowski (aka g[R]eK) > Fix For: 2.2-dev (Current SVN) > > Attachments: > cocoon-servlet-service-components-linkrewriting-patch-2.txt, > cocoon-servlet-service-impl-linkrewriting-transformer-patch-1.txt, > cocoon-webapp-switch-to-servlet-service-patch-1.txt > > > This issue is on configuring (or creating new) transformer that will take > care of servlet: link rewriting. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.