Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 9585 invoked from network); 9 Apr 2004 07:19:40 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 9 Apr 2004 07:19:40 -0000 Received: (qmail 63261 invoked by uid 500); 9 Apr 2004 07:19:14 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 63035 invoked by uid 500); 9 Apr 2004 07:19:12 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 63018 invoked from network); 9 Apr 2004 07:19:12 -0000 Received: from unknown (HELO moutng.kundenserver.de) (212.227.126.185) by daedalus.apache.org with SMTP; 9 Apr 2004 07:19:12 -0000 Received: from [212.227.126.161] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1BBqIO-0008EW-00 for dev@cocoon.apache.org; Fri, 09 Apr 2004 09:19:24 +0200 Received: from [212.185.225.31] (helo=[10.10.10.5]) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1BBqIO-0000rm-00 for dev@cocoon.apache.org; Fri, 09 Apr 2004 09:19:24 +0200 Subject: Re: [New Repository] Major design issue concerning state From: Rolf Kulemann Reply-To: dev@cocoon.apache.org To: dev@cocoon.apache.org In-Reply-To: <1081492487.2238.34.camel@gideon.rkunet.org> References: <1081492487.2238.34.camel@gideon.rkunet.org> Content-Type: text/plain Message-Id: <1081495344.2238.41.camel@gideon.rkunet.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Fri, 09 Apr 2004 09:22:25 +0200 Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:c408b0f8563583d0fd6dd04c3a89f985 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Fri, 2004-04-09 at 08:34, Rolf Kulemann wrote: > Hello, > > I see I'm lucky "moving that quick", because otherwise I never would > have found out the following. > > I did a small sample with the WebDAVRepository. I'm creating docs, read > and write properties and version the docs via the WebDAV impl. of the > "new repository". Lets have a look at the requirement to create a newly > and LOCKED file in the repository. Using i.e. slides commandline client > for WebDAV u simple execute a) "lock newfilename.xml" and b) "put > src.xml newfilename.xml". BUT this only works within the same session. > > That means if I lock into the webdav server a second time with the same > user, b) is not possible, because the lock is not only associated with > the user, but also bound to special session, here the first session. > > To avoid this, the repsoitory impls. MUST act on the same WebdavResource > during a user session, but this is not possible by design! > > Why?: Normally the Sources i.e. c) WebDAVSource are wrapping a special > d) WebdavResource. c) acts in all requests on the same d) which maintain > the state. > > I have thought about alternatives, but all lead to concept where we > "need to pass around sth." reflecting the state. And that sth. is a > Source imho. Ok, I found maybe a solution for my special problem to create locked resources in order to avoid races. I try to forget now, that there maybe more state issues. So it could be useful to add the following methods to the Repository inteface or to the RepositoryVersioningHelper. - createResource(String url, String content, boolean locked) I think this would solve my major issue, because during the call, the rep. impl can act for both operations (lock and put) on the same WebdavResource. Of course this could be different implemented for other repositories than WebDAV, but WebDAV behaves that way. I will try to test such a method today. Thoughts?? -- Regards, Rolf Kulemann