Streams 101 - Deepstash

Streams 101

There are four fundamental stream types in Node.js: Readable, Writable, Duplex, and Transform streams.

  • A readable stream is an abstraction for a source from which data can be consumed. An example of that is the fs.createReadStream method.
  • A writable stream is an abstraction for a destination to which data can be written. An example of that is the fs.createWriteStream method.
  • A duplex streams is both Readable and Writable. An example of that is a TCP socket.
  • Transform streams are basically a duplex stream that can be used to modify or transform the data as it is written and read.

9

56 reads

CURATED FROM

IDEAS CURATED BY

isaactu

Telecommunications researcher

The idea is part of this collection:

Metaverse

Learn more about computerscience with this collection

Find out the challenges it poses

Learn about the potential impact on society

Understanding the concept of Metaverse

Related collections

Similar ideas to Streams 101

Implementing Duplex/Transform Streams

The readable and Writable sides of a duplex stream operate completely independently from one another. A transform stream is the more interesting duplex stream because its output is computed from its input. 

For a transform stream, we don’t have to implement the read or write methods, we onl...

Observation as fact

An observation as fact is information that is observed to be true. 

Facts are verifable data that we all see and which can be quantifed. 

For example, we can verify that a smartphone is rectangular-shaped, broccoli is a source of iron, or that 600,000 people attended an event.

Observation as interpretation

An observation can also be an interpretation, a source of narrative data based on personal beliefs or prior experience.

For example, we believe that broccoli is a healthy food choice, or that we attended the biggest event of the year

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Personalized microlearning

100+ Learning Journeys

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates