I've been trying to follow this thread, but there's a lot here. I apologize 
in advance if I'm retreading anything that's already been said.

I have a simple question first. Are you considering having both the 
flexible cork/uncork api and also putting a nice api on top of it with C/D 
option? That sounds nice in theory, but complex in execution and 
maintenance. If we're considering only one option to address this use case, 
then D is a huge pain in the ass. Building up an object for each chunk is 
onerous. C is a little nicer but as you mentioned, the buf/enc matchings 
wouldn't be explicit and might be error prone.

I'm not sure if I see the best API solution here. But I don't have a better 
idea yet. Have we considered B cork/uncork as the api, but then wrapping 
the complexity in pipe like we've done with most other things? This sounds 
like a use case that not everyone will need. And the people that do will 
take the time to do it right. But most people won't need it and shouldn't 
even have to care about it.

:Marco

On Wednesday, April 24, 2013 9:29:16 AM UTC-7, Isaac Schlueter wrote:
>
> Matt, 
>
> Yeah, I'm kind of in agreement here.  TCP_CORK is a venerable old TCP-ism. 
>
> Functionally, though a top-level writev([{chunk,encoding}],cb) or 
> writev([chunks],[encodings],cb) *seems* a bit simpler, it's actually 
> not saving much complexity, compared with what it adds to the Writable 
> user.  (Node *uses* a lot of streams, as well as implementing them, so 
> this is a relevant consideration from the "keep core simple" point of 
> view.) 
>
> Anyone unfamiliar with TCP_CORK should read this: 
> http://baus.net/on-tcp_cork 
>
> On Wed, Apr 24, 2013 at 11:09 AM, greelgorke 
> <greel...@gmail.com<javascript:>> 
> wrote: 
> > stream.end should uncork and +1 (or see my prev post) 
>
> Yes, that is a good idea. 
>
>
>
> On Wed, Apr 24, 2013 at 8:30 AM, Matt <hel...@gmail.com <javascript:>> 
> wrote: 
> > On Wed, Apr 24, 2013 at 11:09 AM, greelgorke 
> > <greel...@gmail.com<javascript:>> 
> wrote: 
> >> 
> >> stream.end should uncork and +1 (or see my prev post) 
> >> 
> >> Am Mittwoch, 24. April 2013 15:18:08 UTC+2 schrieb Matt Sergeant: 
> >>> 
> >>> I'm gonna go against the crowd and ask for B:cork/uncork here. It's 
> far 
> >>> easier for when you don't have a bunch of pre-composed buffer objects, 
> and 
> >>> would fit into something streaming lines to the output a lot better. 
> Yes you 
> >>> can fuck up, but there's a million ways the programmer can fuck up 
> with node 
> >>> anyway. 
> > 
> > 
> > Also worth noting that experienced network programmers are used to doing 
> > cork/uncork already, so this will be familiar to them. 
> > 
> > -- 
> > -- 
> > Job Board: http://jobs.nodejs.org/ 
> > Posting guidelines: 
> > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines 
> > You received this message because you are subscribed to the Google 
> > Groups "nodejs" group. 
> > To post to this group, send email to nod...@googlegroups.com<javascript:> 
> > To unsubscribe from this group, send email to 
> > nodejs+un...@googlegroups.com <javascript:> 
> > For more options, visit this group at 
> > http://groups.google.com/group/nodejs?hl=en?hl=en 
> > 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "nodejs" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to nodejs+un...@googlegroups.com <javascript:>. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> > 
> > 
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to