cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <dani...@nada.kth.se>
Subject Re: Postable block protocol
Date Wed, 25 Oct 2006 19:52:01 GMT
Lars Trieloff skrev:
> Hi Daniel,
> 
>> A drawback with using the some extension of the VPCs for inter block 
>> communication is that it ties the communications to the specific 
>> sitemap component APIs, so they are not usable for communication with 
>> non sitemap blocks.
>>
>> What I would propose is to create some new pipeline components that 
>> calls postable sources, and make the block protocol postable. Then we 
>> have four cases for the different combinations of XML or non XML input 
>> and output respectably:
>>
>> non XML -> non XML
>> <map:read type="service" src="block:b:/foo1"/>
>>
>> non XML -> XML
>> <map:generate type="service" src="input.txt">
>>   <map:parameter name="service" value="block:b:/foo2"/>
>> </map:generate>
>>
>> XML -> XML
>> <map:transform type="service" src="block:b:/foo3"/>
>>
>> XML -> non XML
>> <map:serialize type="service" src="block:b:/foo4"/>
> 
> I think this is the way we should do it. Using the source interface it 
> is possible to communicate with simple servlets, with the sitemap 
> components, it is easy to use from the sitemap.

Great.

>> A tricky thing is of course to get rid of buffering and serializing 
>> followed by parsing steps for calls to services that have XML input 
>> and/or output. But I think that 1) the problem is solvable and 2) we 
>> don't have to solve it in the first implementation.
> 
> What is the exact interface that the BlockSource has to implement? Then 
> I could start looking into implementing the interface.

It needs to implement org.apache.excalibur.source.ModifiableSource. Take 
a look at 
http://svn.apache.org/repos/asf/excalibur/trunk/components/sourceresolve/src/java/org/apache/excalibur/source/impl/HTTPClientSource.java

together with the patch in 
http://issues.apache.org/jira/browse/COCOON-871 for how I did the 
HTTPClientSource postable.

> Anyway: Is it possible to apply Alexander's original patch, as we need 
> it in our application and it does not seem to invasive from my point of 
> view?

If you refer to COCOON-1943, it is already done. If you refer to the 
{params-to-uri:request-param} input module that he refered to but not 
submitted, please apply it if you feel like it.

/Daniel

Mime
View raw message