librelist archives

« back to archive

Merged in >2G Support, Please Check my git-fu

Merged in >2G Support, Please Check my git-fu

From:
Zed A. Shaw
Date:
2011-06-02 @ 07:12
I merged in staticfiles-bigger-2g and looked at it real quick.
Hopefully I did the merge right, but could someone with more git-fu see
if it's kosher?

For example, I did a merge but the network doesn't show it as a merge,
so, yeah wtf?

And, test out the >2G support.  What this merge does is send the file as
1G sized chunked-encoding pieces until it's done.

-- 
Zed A. Shaw
http://zedshaw.com/

Re: [mongrel2] Merged in >2G Support, Please Check my git-fu

From:
Dalton Barreto
Date:
2011-06-03 @ 01:12
2011/6/2 Zed A. Shaw <zedshaw@zedshaw.com>:

> And, test out the >2G support.  What this merge does is send the file as
> 1G sized chunked-encoding pieces until it's done.
>

I was thinking about this implementation. HTTP chunked responses is
better suited when we don't know the size of the response. So my idea
is to change this implementation to just write chunks to the IOBuf,
but not HTTP chunked encoded.

I think this will do fine, will make some tests. It will probably be
done by the weekend.

Thanks for the merge.

-- 
Dalton Barreto
http://daltonmatos.wordpress.com
http://wsgid.com

Re: [mongrel2] Merged in >2G Support, Please Check my git-fu

From:
Zed A. Shaw
Date:
2011-06-03 @ 22:07
On Thu, Jun 02, 2011 at 10:12:01PM -0300, Dalton Barreto wrote:
> 2011/6/2 Zed A. Shaw <zedshaw@zedshaw.com>:
> 
> > And, test out the >2G support.  What this merge does is send the file as
> > 1G sized chunked-encoding pieces until it's done.
> >
> 
> I was thinking about this implementation. HTTP chunked responses is
> better suited when we don't know the size of the response. So my idea
> is to change this implementation to just write chunks to the IOBuf,
> but not HTTP chunked encoded.

Ah, the *only* problem with that is that there's a very good chance the
receiving side can't handle a content-length that big.  My thinking with
the chunked-encoding is that it will work without having to set a giant
content-length header at the beginning.

I'd say leave it as-is, it's not much of a difference and has some
advantages.  I also refactored it so take a look to see how I improved
it some.

-- 
Zed A. Shaw
http://zedshaw.com/

Re: [mongrel2] Merged in >2G Support, Please Check my git-fu

From:
Dalton Barreto
Date:
2011-06-03 @ 23:56
2011/6/3 Zed A. Shaw <zedshaw@zedshaw.com>:
> On Thu, Jun 02, 2011 at 10:12:01PM -0300, Dalton Barreto wrote:
>> 2011/6/2 Zed A. Shaw <zedshaw@zedshaw.com>:
>>
>> > And, test out the >2G support.  What this merge does is send the file as
>> > 1G sized chunked-encoding pieces until it's done.
>> >
>>
>> I was thinking about this implementation. HTTP chunked responses is
>> better suited when we don't know the size of the response. So my idea
>> is to change this implementation to just write chunks to the IOBuf,
>> but not HTTP chunked encoded.
>
> Ah, the *only* problem with that is that there's a very good chance the
> receiving side can't handle a content-length that big.

Actually maybe this is already happening, as for a static file with
1.9GB mongrel2 is
responding with a response this big. Do you really think that this
could be a problem?

> My thinking with
> the chunked-encoding is that it will work without having to set a giant
> content-length header at the beginning.
>
> I'd say leave it as-is, it's not much of a difference and has some
> advantages.  I also refactored it so take a look to see how I improved
> it some.

Alright. I didn't see this mail and actually I committed the
modification to remove the http chunked encoding logic. But if http
chunked is really better I can revert the changes, no problem.

Alex tested the implementation on a OSX and it was not working, did
you tested it yourself on a OSX? did it worked?

Let me know and I will revert the changes I made today. And sorry for
the "commit noise".

Thanks!

-- 
Dalton Barreto
http://daltonmatos.wordpress.com
http://wsgid.com

Re: [mongrel2] Merged in >2G Support, Please Check my git-fu

From:
Zed A. Shaw
Date:
2011-06-04 @ 04:01
On Fri, Jun 03, 2011 at 08:56:10PM -0300, Dalton Barreto wrote:
> Alright. I didn't see this mail and actually I committed the
> modification to remove the http chunked encoding logic. But if http
> chunked is really better I can revert the changes, no problem.

Well, leave it without chunked-encoding then and then I'll try both and
see what I like best.

> Alex tested the implementation on a OSX and it was not working, did
> you tested it yourself on a OSX? did it worked?

I only tested it on linux.

-- 
Zed A. Shaw
http://zedshaw.com/

Re: [mongrel2] Merged in >2G Support, Please Check my git-fu

From:
Dalton Barreto
Date:
2011-06-04 @ 13:15
2011/6/4 Zed A. Shaw <zedshaw@zedshaw.com>:
> On Fri, Jun 03, 2011 at 08:56:10PM -0300, Dalton Barreto wrote:
>> Alright. I didn't see this mail and actually I committed the
>> modification to remove the http chunked encoding logic. But if http
>> chunked is really better I can revert the changes, no problem.
>
> Well, leave it without chunked-encoding then and then I'll try both and
> see what I like best.

Alright. Maybe we will never find out a client that does not handle
big responses and this implementation will be just fine. Let's see.

>
>> Alex tested the implementation on a OSX and it was not working, did
>> you tested it yourself on a OSX? did it worked?
>
> I only tested it on linux.
>

Ok.

-- 
Dalton Barreto
http://daltonmatos.wordpress.com
http://wsgid.com

Re: [mongrel2] Merged in >2G Support, Please Check my git-fu

From:
Alex Gartrell
Date:
2011-06-04 @ 04:37
>
>
> > Alex tested the implementation on a OSX and it was not working, did
> > you tested it yourself on a OSX? did it worked?
>
> I only tested it on linux.


Yeah it's screwed up.  bsd_specific's sendfile has been needing some TLC for
a while, so I'll do that and see if I can't sort things out on the OS X side
tonight.

Re: [mongrel2] Merged in >2G Support, Please Check my git-fu

From:
Dalton Barreto
Date:
2011-06-04 @ 13:16
2011/6/4 Alex Gartrell <agartrell@cmu.edu>:
>>
>> > Alex tested the implementation on a OSX and it was not working, did
>> > you tested it yourself on a OSX? did it worked?
>>
>> I only tested it on linux.
>
>
> Yeah it's screwed up.  bsd_specific's sendfile has been needing some TLC for
> a while, so I'll do that and see if I can't sort things out on the OS X side
> tonight.

Great, Alex. Let us know when you change bsd's sendfile so we can test
the chunked responses implementation and see if it starts working.

Thanks

-- 
Dalton Barreto
http://daltonmatos.wordpress.com
http://wsgid.com

Re: [mongrel2] Merged in >2G Support, Please Check my git-fu

From:
Yaroslav Shirokov
Date:
2011-06-02 @ 16:11
On Jun 2, 2011, at 3:12 AM, Zed A. Shaw wrote:

> I merged in staticfiles-bigger-2g and looked at it real quick.
> Hopefully I did the merge right, but could someone with more git-fu see
> if it's kosher?
> 
> For example, I did a merge but the network doesn't show it as a merge,
> so, yeah wtf?

If the code is all there then it most likely resolved as fast-forward, 
meaning no merge actually took place, just a head moved to a new revision 
resulting in a straight tree.  If you love useless merge commits, you can 
use merge --no-ff 

--
Slava

Re: [mongrel2] Merged in >2G Support, Please Check my git-fu

From:
Zed A. Shaw
Date:
2011-06-02 @ 16:52
On Thu, Jun 02, 2011 at 12:11:52PM -0400, Yaroslav Shirokov wrote:
> If the code is all there then it most likely resolved as fast-forward,
> meaning no merge actually took place, just a head moved to a new
> revision resulting in a straight tree.  If you love useless merge
> commits, you can use merge --no-ff 

Ah, that explains it then.  Awesome.

-- 
Zed A. Shaw
http://zedshaw.com/