1 | # Glossary
|
2 |
|
3 | ## read (end, cb)
|
4 |
|
5 | A function that retrives the next chunk.
|
6 | All readable streams (sources, and throughs)
|
7 | must return a `read` function.
|
8 |
|
9 | ## reader (read,...)
|
10 |
|
11 | A function to create a reader. It takes a `read` function
|
12 | as the first argument, and any other options after that.
|
13 |
|
14 | When passed to `pipeable` or `pipeableSource`,
|
15 | a new function is created that adds `.pipe(dest)`
|
16 |
|
17 | ## Lazy vs Eager
|
18 |
|
19 | Lazy means to avoid doing something until you know you have
|
20 | to do it.
|
21 |
|
22 | Eager means to do something early, so you have it ready
|
23 | immediately when you need it.
|
24 |
|
25 | ## [Source](sources/index.md)
|
26 |
|
27 | The first stream in the pipeline. The Source is not a reader (not writable).
|
28 |
|
29 | ## [Sink](sinks/index.md)
|
30 |
|
31 | The last stream in the pipeline. The Sink is not readable.
|
32 |
|
33 | ## [Through](throughs/index.md)
|
34 |
|
35 | The stream (or streams) in the middle of the pipeline, between your source and sink. A through is a reader and readable.
|
36 |
|
37 | ## Push vs Pull
|
38 |
|
39 | A pull-stream is a stream where the movement of data
|
40 | is initiated by the sink, and a push-stream
|
41 | is a stream where the movement of data is initiated
|
42 | by the source.
|
43 |
|
44 | ## Reader vs Writable
|
45 |
|
46 | In push streams, destination streams (Through and Sink),
|
47 | are _writable_. They are written to by the source streams.
|
48 |
|
49 | In pull streams, destination streams _read_ from the source
|
50 | streams. They are the active participant, so they are called
|
51 | _readers_ rather than _writables_.
|