You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Alan D. Cabrera" <li...@toolazydogs.com> on 2009/11/28 04:41:07 UTC

Sending a 1TB image

I want to send a 1TB image and am not clear how to do so.  It seems  
that ProtocolEncoder is only called once and that one must allocate a  
buffer a to fit the whole image.  I tried to follow up the encoder  
calls to see if there was a lower level place to do this and got  
totally lost.


Regards,
Alan


Re: Sending a 1TB image

Posted by Emmanuel Lecharny <el...@apache.org>.
You have a special object calld FileRegion which is a wrapper on top
of a FileChannel. Using it will allow MINA to send a huge file without
storing it in memory, AFAIK

I'm not sure it can be encoded with the codec FILTER though (my
understanding is that the file is considered as already encoded, and
bypass the encoding process).

On Sat, Nov 28, 2009 at 6:23 AM, Alan D. Cabrera <li...@toolazydogs.com> wrote:
> I could but what I really want to know is how to send a message w/out
> serializing the whole thing in memory first.
>
>
> Regards,
> Alan
>
> On Nov 27, 2009, at 8:10 PM, Christopher Popp wrote:
>
>> Have you considered breaking the image up into multiple messages?
>>
>> Chris
>>
>>
>>
>> ________________________________
>> From: Alan D. Cabrera <li...@toolazydogs.com>
>> To: dev@mina.apache.org
>> Sent: Fri, November 27, 2009 9:41:07 PM
>> Subject: Sending a 1TB image
>>
>> I want to send a 1TB image and am not clear how to do so.  It seems that
>> ProtocolEncoder is only called once and that one must allocate a buffer a to
>> fit the whole image.  I tried to follow up the encoder calls to see if there
>> was a lower level place to do this and got totally lost.
>>
>>
>> Regards,
>> Alan
>>
>>
>
>



-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Re: Sending a 1TB image

Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
I could but what I really want to know is how to send a message w/out  
serializing the whole thing in memory first.


Regards,
Alan

On Nov 27, 2009, at 8:10 PM, Christopher Popp wrote:

> Have you considered breaking the image up into multiple messages?
>
> Chris
>
>
>
> ________________________________
> From: Alan D. Cabrera <li...@toolazydogs.com>
> To: dev@mina.apache.org
> Sent: Fri, November 27, 2009 9:41:07 PM
> Subject: Sending a 1TB image
>
> I want to send a 1TB image and am not clear how to do so.  It seems  
> that ProtocolEncoder is only called once and that one must allocate  
> a buffer a to fit the whole image.  I tried to follow up the encoder  
> calls to see if there was a lower level place to do this and got  
> totally lost.
>
>
> Regards,
> Alan
>
>


Re: Sending a 1TB image

Posted by Christopher Popp <ch...@yahoo.com>.
Have you considered breaking the image up into multiple messages?

Chris



________________________________
From: Alan D. Cabrera <li...@toolazydogs.com>
To: dev@mina.apache.org
Sent: Fri, November 27, 2009 9:41:07 PM
Subject: Sending a 1TB image

I want to send a 1TB image and am not clear how to do so.  It seems that ProtocolEncoder is only called once and that one must allocate a buffer a to fit the whole image.  I tried to follow up the encoder calls to see if there was a lower level place to do this and got totally lost.


Regards,
Alan