Hi!

I’m really excited to read about the new streams2 interfaces. They make a 
lot of sense when you are dealing with binary/string data. The automatic 
splice()-ing and join()-ing is awesome.
But they kind of fall short when it comes to handling arbitrary objects 
(these may also be plain strings).

Lets just consider that I have a binary Readable stream and I want to pipe 
it to a Transform stream that parses the binary data into js objects.
Later on, I want to read() a single object or read(n) objects. Or maybe 
even read(0) to read all the objects until 'end'. So the stream interface 
itself would take care of buffering and the likes.

Also the other way around:
How can I create a Writable (Transform) stream that serialized arbitrary 
objects into binary data that I can then just pipe into tcp or onto disk?

Other than the streaming parser/serializer, I can also think of complete 
pipelines that manipulate arbitrary objects in a streaming manner.

Something like
```
Readable(…)
  .pipe(parser())
  .pipe(filter('a >= 10'))
  .pipe(map('a'))
  .pipe(inGroupsOf(4))
  .pipe(sum('a'))
  .pipe(serializer())
  .pipe(…)
```

Note that those “arbitrary objects” might be strings or Buffers themselves.

So any pointers on how to achieve such a thing with streams2 would be much 
appreciated.
-Arpad

-- 
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

Reply via email to