People need to talk more about streams. Here's a stream I wrote for Haraka that stores lines of text (of emails for Haraka, but kind of irrelevant), and overflows to a file when it gets too big. The main aim was to be able to just .pipe() into something else, but with a customisable filter in the path of the stream (for example to turn /^\./m => '..' for certain things).
It's not finished yet, but might be fun to learn from (it's also why I moaned on twitter about how Streams are currently too hard, but also very very cool). https://gist.github.com/1996244 Matt. On Thu, Mar 15, 2012 at 6:38 PM, Marco Rogers <[email protected]>wrote: > The call for speakers is open for NodeConf 2012. I want to talk about > streams in node. Last year I only got a half hour to cover a large topic. > This may be a simliar situation. But at a high level you an vote for any or > all of these. > > - What do we mean by streams? require('stream'). How these relate to net > sockets and fs streams. > - What are some best practices for working with streams? > - How to take advantage of custom streams to do cool things in node > without breaking things or ruining efficiency > - How to add stream compatibility to your module > - How to maintain state across streams. When would you even want to do > this? See https://github.com/polotek/procstreams > > Feel free to suggest others. Dont forget to fill out the form. > > http://www.nodeconf.com/ > > :Marco @polotek > > -- > 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 [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > -- 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
