stream
Data that flows between a program and a source or destination piece by piece, rather than all at once.
In more detail
Files, network connections, the keyboard and the terminal are all reached through streams. A program holds a handle or stream object, reads or writes through it, and closes it when finished. Processing a stream in chunks keeps memory use small even for very large data.
Example
Node.js has four stream types, all EventEmitters: Readable, Writable, Duplex and Transform.Related terms
- chunk — One piece of a larger piece of data delivered by a stream.
- Readable stream — A Node.js stream you read data from, such as a file being read, an incoming HTTP request or a socket.
- Writable stream — A Node.js stream you write data to, such as a file being written, an HTTP response or a socket.
- backpressure — A slow consumer signalling a fast producer to pause, so data does not pile up in memory faster than it can be handled.
Taught in
- Native Compression: node:zlib & Streaming Codecs — Node.js Internals & Backend Services
- Stream Mechanics: Readable Streams & Flowing Modes — Node.js Internals & Backend Services
- Writable Streams: Drain Events & highWaterMark — Node.js Internals & Backend Services
- Backpressure Engineering: Handling Mismatched I/O — Node.js Internals & Backend Services
- Transform Streams: Custom Packet Decoding & Codecs — Node.js Internals & Backend Services
- Stream Pipelines: pipeline, AbortSignal & Teardown — Node.js Internals & Backend Services
- Native HTTP Server: Request & Response Lifecycles — Node.js Internals & Backend Services
- Handlers, args, raise And assert — PCAP Certified Associate in Python Programming (PCAP-31-03) Exam Prep
- Exception Classes Of Your Own — PCAP Certified Associate in Python Programming (PCAP-31-03) Exam Prep
- Closures: Functions That Remember — PCAP Certified Associate in Python Programming (PCAP-31-03) Exam Prep
- Streams, Handles And Open Modes — PCAP Certified Associate in Python Programming (PCAP-31-03) Exam Prep
- read, readline, errno And bytearray — PCAP Certified Associate in Python Programming (PCAP-31-03) Exam Prep
- Comprehensions, Closures And Files Sprint — PCAP Certified Associate in Python Programming (PCAP-31-03) Exam Prep
- Twelve Traps, Mostly Objects — PCAP Certified Associate in Python Programming (PCAP-31-03) Exam Prep