directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niklas Therning <nik...@trillian.se>
Subject Re: [MINA] OutOfMemoryError on streaming large files
Date Wed, 14 Dec 2005 10:02:48 GMT
Johannes Zillmann wrote:
> --- Johannes Zillmann <jz8_blue@yahoo.de> schrieb:
> 
>>I tried also the messageSent() variant, but without
>>success...
> 
> 
> 
> I'm sorry, i made a mistake.
> Now i tried Niklas 'messageSent() variant' and it
> seems to work very good!
> 
> Do one of you if it could be a problem if the reader
> is much slower then writer ?
> That means if writer has successfully witten 100MB but
> read just reads it step by step.
> 
> Thank you so much for helping!
> Johannes

So you've tried both approaches and the synchronous one (using 
WriteReuqest.join()) doesn't work while the asynchronous (using 
messageSent()) does? That's very interesting!

I'm sensing a bug here. I will write a test tonight to see if I can find 
anything.

No, it shouldn't matter if the reader is slower than the writer. Your 
OS's write buffer will be filled and MINA won't get notified until 
there's room in the buffer for more data again. And your handler or 
filter won't get notified (through messageSent()) until MINA is notified 
by the OS. The same SHOULD also be true for WriteRequests when using join().

/Niklas

Mime
View raw message