►
From YouTube: "Bob" Streams in Node js
Description
OpenJS Foundation Collaborator Summit, Berlin, 2019
More details: https://github.com/nodejs/summit/issues/172
A
A
A
A
A
B
A
A
A
A
You
have
a
Sinkin
source,
the
source
is
providing
the
data,
but
the
see
past
you
pull
right,
that's
to
say
when
it's
ready
and
the
state
model
is
greatly
simplified,
that
you
only
have
the
one
read
right
and
if
you
read
there's
no
data
available
and
say
right
away.
If
it's
an
error,
reading
or
failure
right
away,
there's
very
few
state
transitions,
as
you
are
actually
reading
the
data
another
part
of
it.
A
Is
it
emphasizes
being
memory
stable
so
rather
than
the
rather
than
the
source,
allocating
memory
and
then
pushing
it,
and
then
this
receiver
having
to
copy?
Did
it
right?
We're
notifying
this.
Of
course,
when
it's
done,
the
puller
would
allocate
the
source
port
and
the
source
location
ready
to
explore
right.
So
the
intent
is
to
hopefully
reduce
the
number
of
men
copies
and
actually
become
I.
Think.
C
C
It's
the
very
same
thing
still
continue
to
discuss,
regardless
of
that,
so
I'm
gonna
go
over
like
you
sliced
it.
I
do
have
perhaps
a
little
bit
more
quickly
than
my
stocking
I'm
already
discussed
some
things,
written
them
so
yeah
we
went
over
white
skull
that
and
future
question
or
streams
or
stream
like
things
so
I'm
just
up
here,
there's
kind
of
like
why
a
little
bit
of
a
fool's
API
status
discuss.
C
C
C
There
is
also
claiming
agnostic
as
much
as
also
as
much
as
we
can
get
out
of
it.
We
don't
need
to
worry
about
it.
Next
extend
the
best
like
you
currently
do
no
buffering
in
the
protocol,
so
we
would
like
the
underlying
classes
do
not
have
buffering
logic
and
any
buffering
that
is
done.
She
doesn't
mean
a
component
to
where
it
actually
needs
to
be
done
rather
than
all
the
time,
and
also
the
error
should
be
able
to
be
in
line
and
sort
of
like
ends
or
Enzo.
C
Files
should
also
be
able
for
you
in
line
message,
so
I
think
what
was
doing
and
unfortunately
is
late
in
the
day
and
I'm
still
going
to
show
you
code,
which
I
regret,
but
that's
what
it
is
I'm.
So
the
sing
API
of
this
essentially
looks
like
this
rather
simple
code,
there's
a
method
to
kind
of
find
things
together,
descent
into
singing
to
the
source,
so
you
get
the
protocol
and
then,
on
the
same,
which
is
the
thing
that
is
going
to
receiving
data.
C
They
can
be
filled
out
a
bit
more,
so
this
actually
more
or
less
kind
of
like
works
together
and
then
in
your
next
wave
yep
there
you
would
be
once
you
are
done
receiving
and
processing
data.
You
are
going
to
pull
it
again.
These
are
pulleys,
so
you
request
data
always
and
the
source
API
is
kind
of
like
this.
We
go
to
methods
that
are
the
other
side,
equivalents
classic
and
pull
this
cold
and
that
maybe
fill
those
two
once
you
get,
the
data
send
that
back
to
the
sink
next
and
quickest.
C
So
imposing
these
things
into
something
you
can
actually
like
stream
data
through
is
kind
of
like
not
you
know
perfectly
Pleasant
like
now,
a
header
would
be
appreciated
or
like
as
a
rain
cover
is
probably
going
to
be
the
ideal
to
or
to
just
change
the
planning
mechanism.
I
love
it
rough
like
that.
That
is
kind
of
it.
It's
got
its
most
simplest
and
brought
for
discussion,
and
so,
if
you
want
to
put
a
transform
any
community,
basically
now
you're
saying
binds
to
sources.
C
So
how
do
you
pinch
for
inviting
to
your
source
and
then
your
sequence
then
bind
to
that
transform
and
doing
the
way
most
of
this
right
now
is
so
that
kind
of
like
one
night,
we
start
there's
some
stuff
I
basically
broke
like
this
very
minimal
thing
on
like
what
we
may
want
to
add
to
that
or
extensions
I'm,
not
sure
that's
life,
but
in
cases
where
you
have
the
network
sockets
it's
nice
to
be
able
to
start
that
explicitly.
You
know
how
to
privately
start
from.
C
So
all
this
is
system
on
my
in
my
in
repose,
under
fish
or
23
/,
thanks
to
everything,
and
if
you
give
diagrams,
you
can
blank
these
diagrams.
So
this
shows
you
the
entire
flow
on
where
there
is
no
point
or
anything.
But
you
you
start
down
where
the
funny
that's
kind
of
thing
is,
you
know,
cut
for
yourself
is
and
then
you
go
and
you
pull
up
the
stream.
C
How
they
need
to
do
some
buffering,
so
it
made
times
and
then
you're
going
to
get
down
to
the
bottom,
and
it's
going
to
repeat
as
many
times
it's
necessary
and
when
that's
done,
you
will
get
a
message.
They're
complying
this
everything
or
you
go
an
error,
in
which
case
the
error
flow
looks
very
similar.
The
error
could
be
emitted
anywhere,
it
bubbles
up.
So
the.
C
We
princesses,
if
I,
have
some
various
modules
published
they're
published
in
nvm
they're
steep
up
sources
for
these
things,
I'm
buck
status
at
the
source
at
the
sink,
do
look
transform,
they
do
work
and
then
there's
something
which
kind
of
attempts
to
make
a
network
socket.
Oh,
this
requests
with
that
sucker
work
with
the
server
server
looks.
C
D
C
A
Top
of
including
all
the
stars
so
leave
the
paprika
juiciness
is
basically
just
an
attic
as
a
separate
new
streams,
implementation
right
in
Carlos.
So
what's
there,
the
existing
streams
API
would
continue
to
exist
untouched
right,
but
there
would
be
a
map
layer
on
top
of
this.
That
would
give
a
little
lazy
stream
mapping
on
top
of
all
right,
yeah.
A
A
So
what
are
the
other
intents
of
this
was
to
give
a
the
new
little
stream
primitive
upon
wish
something
like
whatever
you
shins
could
be
built
right
now,
the
existing
streams
and
note
if
we
try
to
do
that,
what
the
new
Jean
implementation
on
top
of
that
the
performance
will
be
rather
bad
and
there's
the
model
system
quite
thick.
With
this,
we
should
be
rather
straightforward
to
build
what
W
stream
to
the
fish
Mart.
On
top
of
this
furniture.
B
A
B
B
A
C
Eventually
expose
it
because
they
would
be
much
cheaper
to
do
and
it
is
much
simpler
than
there
and
it
is
much
more
cheaper.
Do
it's
much
more
performant
than
what
will
do
speeds
for
ours?
What
we
do
streams
can
be
built
on
top
of
your
problem.
What
we
do
streams
are
first
base
when
you
are
in
the
screening,
but
the
actual
like
end
points
of
consuming
something
or
giving
data
somewhere
or
actually
so
just
find
this
also.
A
C
A
So
this
is
intended
to
reduce
as
much
as
possible.
You
know
when
we
do
have
a
source
which
isn't
far
host,
then
it
will
have
to
buffer
what
we're
when
we.
What
the
goal
is
is
right
now
on
the
streams,
for
course,
offering
at
every
layer
like
rewritable,
hungry
beautiful,
has
this
buffering.
We
want
to
isolate
the
buffering
where
it
only
when
it
where
it's
absolutely
needed.
A
There
are
some.
Unfortunately,
the
lot
of
the
underlying
protocol
now
are
giving
us
options
for
providing
flow
control
in
the
protocol
HP
to
wait,
for
instance,
we
can
actually,
if
we're
not
reading,
we
can
tell
the
sender,
stop
right.
Some
of
the
other,
the
other
protocol
just
will
have
to
buffer
inside
of
that
of
that
one.
C
C
Another
thing
that's
not
gonna
give
that
I'd
like
to
mention
is
kind
of
like
a
live,
even
layer
of
things,
so
in
in
my
circuit
work.
This
is
also
implemented
in
a
sequel
plus
and
should
be
also
so
along
at
the
system
level.
A
lot
of
calls
you
make
the
network
one
way
or
there
being
like
a
request
from
from
the
operating
system,
which
kind
of
max
lot
better
to
replace
things
than
most
big
streams.
New
and
let
me
be
currently
exposed
quickly
streams,
but
would
expose
patients
potentially
in
a
way
that
made
more
sense.
C
A
One
thing
we
haven't
touched
on,
sir:
the
turn
streams
API
has
both
the
readable
and
writeable
interfaces
right.
Another
two
very
scenic
things
with
this:
there's
only
one
protocol
that
works
for
both
right,
so
maybe
on
the
writable
side.
What
your?
What
your
and
implementing
is
a
it
is
a
source
right
and
then
he
will
provide
your
brother
than
pushing
data
into
it.
You're
you're,
essentially
just
waiting
for
whatever
your
destination
to
pull
data
out,
so
there
would
be
a
slightly
different
model.
A
A
A
F
C
C
C
C
You
just
want
to
like
this
is
the
errors
or
something
for
some
reason
that
way,
another
thing
is
okay.
This
is
from
a
space.
It's
not
only
the
apparently
callback
based
here,
it's
kind
of
just
like
objects
that
talk
to
each
other.
They
call
each
other
than
others,
but
consuming
a
foolish
thing
with
a
async
iterator,
also
not
very
well
in
spacing
good
razors
are
essentially
full
length
less
and
less
this.
C
A
The
one
thing
that
I
will
see
the
current
API
was
just
universe,
your
employer.
Next
there
is
one
limitation
there.
You
know
that
we
have
a
quick,
for
instance,
if
they
might
also
think
we
have
to
hold
on
to
the
buffer
data
until
is
explicitly
acknowledged.
So
we
have
to
write
it
again,
so
it's
perceived
I
should
sir,
we
might
need
to
add
one
additional.
D
A
A
F
It
has
been
a
fantastic
experiences
thing
for
everybody,
and
I
will
open
an
issue
to
receive
to
collect
feedback
on
repo
so
that
we
can
improve
for
next
time,
so
things
FM
for
our
system
didn't
work
and
teaser.
Do
you
mind
if
we
might
do
better
next
time,
I've
seen
that
a
bunch
of
people
who
like
to
a
main
tax,
which
is
a
fantastic
thing,
because
it
means
that
more
people
that
doesn't
know
each
other
coming
to
these
events?
So.