substack/stream-handbook — pull request #1 by Raynos (2012-08-26 08:03:02+00:00)
Title: more streams

- pause / resume / drain. We should talk about what those should do. Especially drain. (I never use drain)
- destroy. Make sure to talk about destroy and how that should be done, implemented, etc.
- from is create for creating readable only streams (for example arrow-keys should be a from stream. need to refactor that)
- duplexer. Is an alternative way to create a duplex stream by glueing a readable & writable stream together.
- buffer-stream. It's a duplex stream that buffers both the readable & writable side. useful if you want to create a stream right now but need to wait for the stream to be actaully open. Return the buffer and empty the stream into the buffer once it's open.
- event-stream. It's a grab bag but has useful stuff in it. mostly pipeline.
- auth-stream. It's complex but it allows you to wrap a stream with an authentication layer in a similar way you expose an auth / secret method with dnode before returning the real object
- discovery-network (relay streams). It allows you to open direct stream connections to other browsers, so is pretty awesome.
- stream-serializer. (trumpet was a duplicate). This is sweet because you just wrap a stream with it and it does all the json serializing and deserializing
- attribute. creates a delta stream from an element. Every delta send sets an attribute on the element
- data-bind. Creates a delta stream from an element. Every delta { key: value } send to it finds a child node of the element who has data-key set and sets value as the text content of that child node.
- stream-spec: A great documentation of what streams do & also a way to test streams
- stream-router. It assumes the mux-demux meta property exists and then basically gives you an url router on that meta property (stream.meta instead of req.url). Really nice for a mux-demux server where you want to open different types of streams and send them to different handlers.
- multi-channel-mdm. Stupid name but it's basically an echo chamber. Takes a stream and places it in the echo chamber. Any data emitted on that stream will now be written to every stream in the echo chamber, including itself.

You don't need to include all of this but i think they all have merit.