cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Diephouse <...@envoisolutions.com>
Subject Re: Flush Problem with HTTPCondit
Date Thu, 21 Sep 2006 17:08:08 GMT
Glynn, Eoghan wrote:

> 
>
>  
>
>>-----Original Message-----
>>From: Dan Diephouse [mailto:dan@envoisolutions.com] 
>>Sent: 21 September 2006 16:03
>>To: Li, Tao (Tom)
>>Cc: cxf-dev@incubator.apache.org
>>Subject: Re: Flush Problem with HTTPCondit
>>
>>Li, Tao (Tom) wrote:
>>
>>    
>>
>>>Hi Dan,
>>>
>>>If there's transforming interceptor, it must use a stream 
>>>      
>>>
>>which can cache all the data generated by other interceptor 
>>before it doing its transforming work, so our api providing a 
>>AbstractCachedOutputStream to enable caching, and provide 
>>some callback like doFlush & doClose for customization, and I 
>>think the AbstractCachedOutputStream can serve as a base 
>>class for output stream used by transforming interceptor. 
>>    
>>
>>> 
>>>
>>>      
>>>
>>I don't think thats true. I could create a piped stream which 
>>unzips the data as I pull it through. There is no requirement 
>>that it be cached before I can unzip it as far as I know.
>>    
>>
>
>I think Tom was referring to the outbound dispatch as opposed to the inbound, i.e. the
process of zipping up rather than unzipping.
>
>In my naïve understanding of how data compression works, it performs best on fairly decent
chunks of data (i.e. a large block size) as opposed to being drip-fed data in small increments
(e.g. individual XML elements). 
>
>Hence the motivation for caching all (or at least reasonable chunks of) the payload before
applying the compression.
>  
>

You could still do it a chunk (100K?) a at a time over a large messge - 
and this would alleviate the need to write to disk or hold too much in 
memory.

I'm just trying to make the point that we don't ever want to make the 
assumption that there is a particular type of OutputStream as people may 
replace it with a different type.
- Dan

-- 
Dan Diephouse
(616) 971-2053
Envoi Solutions LLC
http://netzooid.com


Mime
View raw message