You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by VN <dr...@mail333.com> on 2010/12/24 14:06:22 UTC
[AsyncWeb] dealing with large responses
Hello,
I am implementing an avatar server which handles http request and sends
several pictures (avatars) in multi-part response. It works but the
whole response should be placed into HttpResponse object (containing
IoBuffer) before sending it to network. This causes constant garbage
allocation.
I have found the following discussion from Feb 2008:
http://markmail.org/message/dkoidsnvazm337ng#query:asyncweb%20chunked+page:1+mid:dkoidsnvazm337ng+state:results
"
Special care needs to be taken to ensure that we can handle LARGE
responses without loading the entire request into memory. We also need
to provide an elegant way to deal with chunked-encoding in an
event-driven fashion.
"
(written by Mike Heath)
Are there any changes somewhere in asyncweb code or maybe any plans to
support it?
Thanks
Victor N
Re: [AsyncWeb] dealing with large responses
Posted by VN <dr...@mail333.com>.
I will try and let you know if I get something working ;)
Victor N
On 12/24/2010 04:37 PM, Emmanuel Lecharny wrote:
> On Fri, Dec 24, 2010 at 2:06 PM, VN<dr...@mail333.com> wrote:
>
>> Hello,
>>
>> I am implementing an avatar server which handles http request and sends
>> several pictures (avatars) in multi-part response. It works but the whole
>> response should be placed into HttpResponse object (containing IoBuffer)
>> before sending it to network. This causes constant garbage allocation.
>>
>> I have found the following discussion from Feb 2008:
>>
>> http://markmail.org/message/dkoidsnvazm337ng#query:asyncweb%20chunked+page:1+mid:dkoidsnvazm337ng+state:results
>>
>> "
>> Special care needs to be taken to ensure that we can handle LARGE responses
>> without loading the entire request into memory. We also need to provide an
>> elegant way to deal with chunked-encoding in an event-driven fashion.
>> "
>> (written by Mike Heath)
>>
>> Are there any changes somewhere in asyncweb code or maybe any plans to
>> support it?
>>
>
> Note that I know of. If you feel, like proposing a patch for it, we will
> consider injecting it into the code base !
>
>
>
Re: [AsyncWeb] dealing with large responses
Posted by Emmanuel Lecharny <el...@apache.org>.
On Fri, Dec 24, 2010 at 2:06 PM, VN <dr...@mail333.com> wrote:
> Hello,
>
> I am implementing an avatar server which handles http request and sends
> several pictures (avatars) in multi-part response. It works but the whole
> response should be placed into HttpResponse object (containing IoBuffer)
> before sending it to network. This causes constant garbage allocation.
>
> I have found the following discussion from Feb 2008:
>
> http://markmail.org/message/dkoidsnvazm337ng#query:asyncweb%20chunked+page:1+mid:dkoidsnvazm337ng+state:results
>
> "
> Special care needs to be taken to ensure that we can handle LARGE responses
> without loading the entire request into memory. We also need to provide an
> elegant way to deal with chunked-encoding in an event-driven fashion.
> "
> (written by Mike Heath)
>
> Are there any changes somewhere in asyncweb code or maybe any plans to
> support it?
>
Note that I know of. If you feel, like proposing a patch for it, we will
consider injecting it into the code base !
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com