►
From YouTube: Demo - libp2p Interfaces Part 2 - David Dias
Description
Originally recorded during the Berlin Developers Meetings from July 9-13, 2018.
A
One
got
me
inspired
to
do
an
extra
one
Q
and
the
first
one
is
going
to
be
a
continuation
on
this
interface
discussion
and
I'm,
basically
going
just
like
to
show
things
are
done,
but
from
the
Jeff
or
at
least
how
we
have
prepared
the
things
to
be
done
by
multiple
languages,
but
they're
not
mostly
used
by
the
GSI
and
so
yeah.
We
prepared
there's
one
of
things.
We
just
came
from
a
talk
on
interfaces
on
peer-to-peer
interfaces.
A
We
discuss
our
our
reputed
fear
is
like
this
set
of
modules
that
work
very
nicely
with
each
other.
If
that
each
module
has
a
very
specific
defined
interface
so
that
we
can
just
like
swap
them
and
put
new
pieces
upgrading.
Our
networking
stack
I
should
show
some
images
I
like
what
the
city
faces
look
like,
but
just
to
give
an
idea
like
for
each
of
these
pieces,
like
for
each
other,
like
this
building
blocks
that
you
are
used
to
see
an
Olympian
appear.
A
You
get
like
one
of
these
repos
and
they
always
start
with
a
two
face
and
then
the
pipe
and
then
on
that
repo.
You
get
like
modules
that
people
make
the
interface
like.
If
you
ever
went
your
own
you're
welcome
to
submit
up
or
requester
that
to
the
list,
you
guys
really
not
a
nice
match,
so
that
people
recognize
on
your
report.
I
back,
you
implement
interface,
it's
like
a
reputed
for
your
compatible
module.
A
You
can
like
some
code
to
just
set
up
test,
and
this
is
like
those
kind
of
things
that
when
you
do
JavaScript
you
have
to
deal
with,
because
we
don't
have
nice
interfaces
and
so
the
way
that
we
overcome
nice
way
to
describe
interfaces
for
programs
implement
and
so
a
way
to
overcome
that
just
like
create
a
set
of
tests
that
people
can
import
and
use,
and
one
of
them
very
good
examples
here
is
the
stream
boxer.
So
the
stream
max
here
was
actually
the
original
interface
repo
for
a
leap
utopia.
A
A
A
A
It's
important
so
so
now
I
know
I
can
go
into
my
lip.
You
do
peer
bundle
and
just
like
replace
one
three
months
by
the
other
and
both
will
work
on
my
stack
so
yeah.
That's
that's
how
we
we
get
to
play
with
multiple
building
blocks
on
peer-to-peer
and
cool.
This
was
one
you
can
find
all
the
other
interfaces
for
peer.
All
things
for
content
routing
for
experience,
call
ray.
You
always
get
a
nice
badge
and
yeah,
that's
it
okay.
This
was
the
first
part
of
the
demo
or
the
first
demo.
A
The
second
one
is
really
all
to
plug
these
things
together
and
I'm
going
pretty
quickly.
You
will
find
all
the
code
that
will
run
on
that
gently
peer-to-peer
repo
on
the
examples
folder
you
can
find
a
bunch
of
examples
like
I'll
transport
protocol
and
stream.
Multiplexing
works
good.
You
have
a
voice
here,
so
if
we
go
to
that
kills,
I
was
already
there.
A
Second,
so
most
of
these
examples
always
like
a
create
notes
function,
and
this
is
just
like
reading
a
peer
info
and
adding
a
multi
other
to
it.
There
is
a
and
there's
always
a
part
where,
like
the
action
happens-
and
here
we
are
just
like
starting
nodes
and
like
creating
a
connection
between
both,
but
but
what
I
really
want
you
to
pay
attention?
Is
this
bundle
right
like
this
constructor
for
the
way
peer-to-peer
node?
So
here
we
can
see
that
it's
pretty
simple,
like
we
actually
I
think
this
is
a
laser
pointer.
A
All
right,
I
got
your
tip,
and
so
you
have
the
bundle
here.
It
accepts
the
way
peer
to
peer
class,
get
a
constructor
any
of
the
defaults,
so
I
as
a
user
of
a
peer
to
peer
exceeded
my
own
Whipple
P&L.
That
extends
that
way
peer
to
peer
skeleton
and
I,
say
I
want
to
use
transport
TCP.
So
this
is
pretty
much
like
a
weight
will
appear
stack
that
does
the
protocol
multiplexing,
but
doesn't
do
any.
Second,
you
know
doesn't
do
any
peer
discovery,
just
like
TCP.
So
if
I
run
this
code.
A
Okay,
so
no
one
is
listening.
No
two
is
listening,
one
dials
to
the
other,
one
on
the
Nile
protocol
thing
and
right,
ll
peer-to-peer
world
and
the
message
passes
so
very
simple
got
pro
comedy
passing
over
TCP.
This
is
not
very
exciting,
like
anyone
could
just
like
require
that
module
enter
the
fingering.
So
let's
go
to
the
stream
max
our
example
protocol
and
mixing.
A
So
here
we
have
again,
we
have
again
like
my
default.
The
the
rest
of
the
code
is
pretty
much
the
same.
It's
tying
on
protocols
and
I,
think
I
know
now
I'm,
but
now
I'm
using
TCP
and
I'm,
saying
that
I
have
a
stream
at
sir,
am
I
using
speedy
for
this
one,
and
so,
when
I
do
multiple
dial
protocols
to
from
node
1
to
node
2,
instead
of
creating
multiple
raw
sockets
I'm,
actually
creating
much
streams
of
over
that
stream
axis
and
reusing
the
connection
and
for
the
user.
This
is
pretty
much
for
yeah.
A
A
Put
OB
another
corner
new
per
copy,
so,
by
the
way,
just
in
terms
of
API,
you
have
tile
protocol,
you
basically
specify
the
pier
and
if
you
want
to
dial
the
protocol
in
which
you
want
to
talk
with
appear
here,
I
say
like
I
want
to
talk
on
protocol
a
it
could
be
any
kind
of
string
here.
Protocol
B
and
here
is
like
so
when
they'll
die
on
student
note,
you
can
open
even
multiple
connections
to
the
same
protocol,
so
multiple
wasters
for
the
same
protocol.
A
A
A
Gets
even
more
conflicts,
so
there
is
many
other
things
discovery
so
like
detecting,
using
something
like
multicast
dns
to
find
peers
on
the
local
area
network.
Same
thing
like
peers
will
find
each
other
just
for
a
second
time.
Players
won't
fight
each
other
to
disappear
discovery
and
once
they
discover
the
peer,
they
just
say:
okay,
I
found
the
peer
on
this
local
area
network,
but
also
you
can
do
things
like
pyridine.
A
In
periodic,
so
we
this
example
is
more
advanced
one.
We
are
already
saying:
I
want
to
use
TCP,
and
this
could
be
multiple
transports
again.
I'm
saying
I
want
to
use
em
plex
I'm
saying
buy
one
buy
encryption
of
a
my
connection.
Con
encryption
to
be
secure
and
I
want
to
use
this
DHT
module,
which
gives
the
peer
routing
and
content
routing
superpowers
to
my
ability,
a
bundle
then
I
also
have
my
config
values,
and
this
is
like
the
standard
config
like
the
giant
objects.
A
That's
like
has
some
config
options
and
I
do
the
same
thing
if
I
create
nodes,
I
use
these
properties
to
connect
them.
So
here,
like
knelled
wand,
I
also
know
to
know
mm
o
tree
and
then
the
old
one
is
going
to
use
content
routing
to
provide
and
then
like
the
content.
Low
tree
will
find
the
providers
of
that
no
other
one
getting
into
the
folder
pirata
your
content,
driving
well
nevermind
mix.
It
shows
that.
A
Yeah
example:
one
spear
well
things
about
to
is
content
routing,
so
just
make
sure
I
didn't
lose
you,
because
no
one
is
going
to
say
hey
like
if
you're
looking
for
something
come,
find
me
and
I
know
tree
is
going
to
find
the
nodes
that
have
that
are
providing
that
see
ad.
Does
it
make
sense
to
everyone?
No
cool,
so
again,
creature
nodes
does
the
thing
and
eventually
we'll
bring
the
results.
A
Yeah,
okay:
this
is
something
that
was
broken
this
morning.
I'm
sorry.
This
is
a
boards
yeah,
okay,
which
it
is
evening
you'll
be
able
to
find
this
example
working
and
so
yeah,
like
you
get
all
of
these
properties.
As
you
saw
it's
very
easy
to
like
configure,
we
could
appear
in
the
remaini.
You
get
like
an
example
of
like
all
the
things
you
can
do:
yeah
yeah.
If
the
transports
you
can
pass
the
class
types
or
even
a
nuisance.
A
So
if
you
have
a
transport
with
a
little
bit
of
setup,
you
can
pass
the
instance
of
the
transport
you
can
even
I
use
multiple
stream
multiplexers.
At
the
same
time,
why
not?
You
might
want
to
talk
with
different
parts
of
the
network
that
have
to
support
boats?
You
can
also
that's
why
this
is
always
an
array
like
you
can
support
multiple
encryption
encryption
channels
can
support
multiple
peer
discovery
mechanisms.
A
You
can
have
multiple
periodic
things
you
have
like
all
these
configuration
values,
some
experimental
flags,
yes
with
beautify,
also
exposes
pub/sub
and
then,
if
you
want
to
learn,
identify
some,
we
peer-to-peer
we're
not
a
bunch
of
things
here
from
my
starting
emails
and
something
in
there.
That's
raw
like
this
is
a
another
thing
in
the
2000
table,
so
we
have
a
distinct
p2p
nodes
start
and
then
we
could
do
like
a
tile
and
Daniel
and
I
opera
call.
A
The
distinction
is
really
like
this
warms
up
the
connection
so
I
can
down
to
someone
and
like
do
the
second
you
and
shake
this
remark,
sir.
All
those
things
but
I'm
not
going
to
create
a
MOOC
stream
to
that
nodes.
Yet
I
was
just
going
to
warm
it
up
and
then,
if
I
want
to
dial
on
a
specific
protocol
me
as
a
user
of
a
peer-to-peer
like
bits
up,
for
example,
I,
say
I
want
to
dial
bits
up
to
this
pier,
so
it
does
the
final
protocol
multiplexing
to
appear.
A
We
have
a
the
the
close
connection.
We
tell
it
hang
up,
because
if
we,
if
I
hang
up,
some
people
have
different
opinions
about
the
name
of
this.
They
don't
fear
routing
with
frontier
content.
Routing,
like
the
two
things
I
was
showing
you
you
can
handle
multiple
protocols.
This
is
how
you
do
it,
like
you
say
the
string
for
your
protocol,
the
and
the
word
fund
and
the
matching
funk
and
the
match.
Funk
is.
A
A
Is
that
where
you
are
listening,
the
adverse
is
that
other
peers
see
you
from
the
outside
world
and
you
also
get
the
Maps
API,
which
is
the
same
API
that
I
just
like.
If
s
exposes
so,
if
are
familiar
with
that
one,
you
got
this
one
as
well.
There's
other
things
here,
there's
also
a
stats
API,
so
you
get
kind
of
like
data
from
oh.
You
are
interacting
in
the
notes
that
are
on
your
swarm
and
in
many
other
things,
I
think
this
is
it
showing
I'll
to
configure
only
peer-to-peer
nuts
any
questions.
A
A
Available
so
when
you
dial
to
the
pier
so
I
hear
the
only
thing
this
pier
could
be
appearing
foe,
which
has
the
protons
at
the
pier
supports,
or
that
we
know
that
the
peer
supports
or
its
PID
or
it's
not
the
other,
once
we
dial
to
them
and
we
do
the
identify
and
check
its
where
the
other
peer
tells
the
protocols
that
they
support.
So
we
can
just
go
to
this
object,
which
is
in
our
pearbook
kind
of
like
the
yellow
pages
of
would
appear
and
you
can
see
which
protocol
to
the
other
peer
supports.
A
But
then
again
it's
identify
and
identify
only
happens
once
when
we
first
connect
to
each
other.
So
imagine
your
application
that
can
like
end
all
protocols
and
I
know
multiple
times.
It
doesn't
mean
the
fact
that
is
up-to-date,
so
the
best
thing
you
have
to
do
is
really
well.
You
can
use
that
as
a
like
a
and
every
six
to
know
if
you
should
dial,
but
you
can
always
try
to
dial
on
a
protocol
and
the
other
thing
I
can
tell
you
that
it
is
or
it
isn't
supported,
did
I.
A
A
A
Okay,
all
right,
yeah,
I
guess
it
would
be
pretty
useful
for
tests.
So
you
could
very
easily
use
these
configurations
and
then
run
them
across
the
same
tests.
Yes,
yeah
and
so
I
guess.
The
question
is
like
how
complex
does
that
language?
You
need
to
be
like
if
we
have
identifiers
for
each
of
the
protocol
implementations
if
we
are
just
like
a
a
moody
cause
I'd
like
for
the
booty
pop
rerouting
the
multiple
transfers,
etc?
A
It
becomes
more
complex
if
you
want
to
say
in
that
language
or
I
want
to
use
PD,
but
in
a
special
way
right.
That's
where
it
gets
a
little
bit
more
complex
to
do
that.
Multiple
language,
alright,
like
I'm,
trying
to
avoid
like
having
a
huge
by
Chen,
I,
didn't
know
we
can
do
something
very
quickly
that
serves
a
lot
of
purposes.
A
A
You'll
see
like
all
these
badges
because
it
really
does
all
these
things.
At
the
same
time
right
it
has
periodic
in
front
of
the
peers.
It
is
cut
and
routing
because,
like
we
get
to
know
where
the
content
is
and
as
well
as
peer
discovery,
because
when
you
run
a
more
waka
DHT,
you
are
discovering
random
peers
and,
like
refreshing,
your
routing
tables,
which
is
super
useful.
But
ideally
this
is
not
bad
but
like.
A
Ideally,
all
these
pieces
that
are
here
inside
this
spawn
package
should
be
also
separated,
so
that
when
you
are
loading
it
into
a
pure
peer,
you
can
say:
I
want
to
just
load
these
periodic
module
and
it's
to
other
content
routing
right
now.
We
do
that
by
enable
disabling
parts
of
it
like
we,
you
get
the
whole
package
and
then
you
can
disable
a
little
bit
of
it.
If
you
want
to
other,
probably
most
of
people
that
will
use
the
digital
to
use
the
whole
thing
anyway,
10
little
cool,
any
more
questions.