cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianugo Rabellino <gian...@apache.org>
Subject Re: WebDAV proxy available
Date Mon, 01 Sep 2003 15:54:05 GMT
Bertrand Delacretaz wrote:
> 
>>   <match type="request-method" pattern="PUT">
>>     <act type="syncmetadatadb">
>>      <generate type="webdavproxy">
>>         <parameter name="url" value="http://whatever/dav/{../1}"/
>>      </generate>
>>      <serialize/>
>>     </act>
>>   </match>
> 
> 
> I think the webdav backend is much more likely to fail than syncmetadb 
> in such cases (due to insufficient authorizations etc), which would 
> create inconsistencies between the backend and meta db if the sync is 
> done with actions.

You're right, we need a safer approach.

> 
> It might be better to sync the meta db based on the results of the 
> backend, in which case I'd go for a Transformer to post-process the PUT 
> result from the backend, feeding sql code to a downstream SQLTransformer:
> 
> PUT operation:
> WebdavProxy -> DaslTransformer -> SQLTransformer

It doesn't really work. Every operation carried on by the WebDAV proxy 
is actually "eating" the request, so what you get in case of a PUT 
operation is just a status code. What you need to do, then, is to issue 
a PROPFIND to the backend server and get your metadata.

This however raises a new issue: the whole operation should be atomic 
and (somehow) transaction-aware. If for any reason the Dasl component 
cannot update the database, an error should be thrown and the operation 
should fail. Interesting problem, and I don't actually see a way to 
solve it OOTB.

Ciao,

-- 
Gianugo Rabellino
Pro-netics s.r.l. -  http://www.pro-netics.com
Orixo, the XML business alliance - http://www.orixo.com
     (Now blogging at: http://blogs.cocoondev.org/gianugo/)


Mime
View raw message