►
From YouTube: State of ADLs
Description
Recorded at DataSystems September 2021 Colo. Join us in #retrieval-market on filecoin slack to ask questions or build an open data transfer stack with us!
A
So
this
talk
is
going
to
be
about
ipld
adls
and
I
believe
adl
starts
stands
for
advanced
data
layout,
which
sounds
pretty
complex,
but
it's
actually
pretty
simple.
At
the
core
of
ipld.
Prime
you've
got
this
node
interface,
which
actually
just
got
moved,
so
I
need
to
go
there
and
this
interface
is
sort
of
like
the
way
you
interface
interface,
with
any
node
from
go
so
at
the
center
of
it.
You've
got
the
kind
method,
and
that
tells
you,
what
kind
am
I
so
you
can
have?
A
A
Node
come
on
agenda;
no,
that's
good,
so
the
code
gen,
what
it
does
is
it
generates,
for
example,
here's
a
map
from
strings
to
something.
A
A
You
have
methods
like
the
kind
and
it
tells
you.
What
kind
am
I
in
it?
This
is
code
gen,
so
it's
just
statically,
I'm
always
an
end.
You've
got
other
methods
like
lookup
by
string,
and
these
methods
are
defined,
as
I
am
only
valid
when
my
kind
is
x.
So,
for
example,
lookup
by
string
is
only
valid
for
maps
for
map
kinds.
So
in
this
case,
if
you
call
it
on
something,
that's
not
an
end
in
this
case,
statically
is
always
an
end.
A
So
usually,
if
you're,
using
if
you're
using
ipld
prime
nowadays
with
code
gen,
that's
that's
what
it
looks
looks
like
so
going
back
to
the
type
node
interface.
A
That's
all
fine
for
what
you
would
call
data
model
nodes,
because
they're
pretty
basic.
What
you
see
is
what
you
get
what
adls
do
is
they
allow
you
to
essentially
build
arbitrary
behavior
into
this
stuff?
So
you
could,
for
example,
have
a
node
that
implements
this
interface
by
having
a
behavior
that
doesn't
directly
map
to
what
data
you
have
on
memory
or
what
data
you
have
encoded
in
json,
for
example,
and
I
thought
I
would
show
what
that
means
with.
A
Go
ipld
hand
and
so
a
hand
what
it
is
it's
sort
of
like
a
hashmap,
that's
designed
for
content
addressability,
or
at
least
it
works
decently,
well
for
in
that
world,
and
essentially
you
can
think
of
a
map,
as
you
know,
a
list
of
buckets
that
has
a
tree
and
then
more
buckets
and
so
on.
So
that's
essentially
what
a
hand
is
defined
as,
but
then
in
ipld,
prime,
when
you
want
to
use
this,
you
essentially
end
up
with.
Let's
look
at
types,
for
example,.
A
If
you
want
to
actually
use
a
hand
because
then
you
would
have
to
manually
be
manipulating
the
buckets
and
rebalancing
and
everything
you
want
to
use
a
library
that
abstracts
all
of
that
away
and
then,
when
I
set
foo
the
key
food
to
the
value
bar,
it
just
automatically
deals
with
all
the
bucketing
and
all
that
stuff,
and
this
is
what
the
ideal
layer
does
for
you.
So
if
I
go
into
node,
I
think
so.
This
is
the
node.
A
This
is
the
node
that
actually
implements
the
node
interface,
but
with
the
layer
of
I'm
going
to
deal
with
all
this,
for
you
so
kind
kind
is
always
a
map,
so
this
is
similar
as
before,
but
when
we
go
into
lookup
by
string,
this
is
where
it
gets
interesting.
So
look
up
by
string.
It
doesn't
just
use
the
data
model
stuff
that
it
has
it
hashes
the
key,
and
then
it
looks
up
into
the
buckets.
What
to
do.
A
Oh,
that's
actually
pretty
cool,
so
yeah,
it's
essentially
gonna,
be
it's
gonna,
go
down
into
the
right
node
and
into
the
right
bucket,
and
it's
just
gonna
fetch
the
value
that
you
want.
Am
I
in
a
bucket
look,
look
in
the
bucket.
Am
I
going
down
one
level
then
go
down
one
level.
A
And
then
there's
a
bunch
of
to-do's,
because
I
didn't
have
time
to
finish
this,
but
you
can
get
an
idea
of
why
it's
useful
to
implement
this
interface
for
things
that
are
not
as
static
or
not
as
direct
directly
mapped
to
the
data
model
that
you
might
think,
that's
pretty
much
it
does.
Does
anybody
have
any
questions
about
what
an
adl
is
or
why
it's
useful.
A
Yeah,
so
that's
possibly
the
biggest
kind
of
worms
that
I've
got
left
to
do
because
in
in
ipld,
prime
nodes
are
immutable
right.
So
if
you
want
to
modify
an
if
you
want
to
set
or
modify
or
delete
a
value
in
an
existing
map,
what
you
could
do
right
now
is
copy
all
the
values
from
an
old
map
into
a
new
map
and
then
just
copy
all
the
copy,
all
the
data
and
generate
a
new
map
from
scratch.
It's
going
to
be
really
slow.
A
The
better
way
would
be
to
essentially
batch
a
bunch
of
operations
like
adding
deleting
setting
and
so
on,
and
then
efficiently
apply
those
and
only
copy
the
data
model
nodes
that
you
need
to
update.
So,
for
example,
if
you
only
need
to
update
one
bucket
that
node
would
update
and
then
the
cid
is
all
the
way
to
a
root
word
update,
but
everything
else
would
be
the
same,
cids
and
nodes
same
blocks.
C
A
Right
now,
yes,
with
eric,
we
talked
about
well,
actually,
if
you're
implementing
an
adl,
you
usually
want
to
say
I
want
to
implement
a
map
adl,
and
then
you
only
need
to
implement
a
few
methods.
All
the
others
you
don't
care
about.
You
only
need
to
implement
kind,
is
going
to
be
static
as
map
you
want
to
implement
lookup
by
string.
C
A
A
Yeah
yeah,
but
I
think
I
think
in
general,
adls
are
backed
by
ipld
data
model
data.
If
that
makes
sense
because,
for
example,
a
hand
is
the
actual
data
you've
got
in
the
data
model,
there's
a
bunch
of
buckets
and
trees
and
stuff,
but
then
you've
got
the
ideal
layer
that
shows
it
to
you
as
a
map,
and
that
has
the
extra
logic.
A
A
A
A
Yeah
so
I
added
this
essentially
and
then
you
can
say
essentially
when
you
start,
but
you
could
set
this
later,
probably
yeah
yeah
yeah,
and
then
it
just
remembers
this.
So
when
it,
for
example,
when
it
tries
to
cross
a
boundary
and
it
doesn't
have
a
block,
it
will
then
use
the
links.
E
A
A
Yeah,
it's
also
true
that
there's
a
bit
it's
not
just
about
getting
by
string
because
that's
as
far
as
I
got
I,
but
you
also
have
look
up
by
node,
because
your
map
could
be
keyed
by
anything.
You
also
have
iteration
and
iteration
might
be
a
little
bit
harder
to
plug
in
well.
I
guess
you
would
provide
the
implementation
of
this.
Maybe.
D
There's
also
like
I
mean,
if
you
do
it
generated
like
I
don't
know
like
if
you
do
a
generated
type
with
the
code
jam
like
you
also
like
it
often
generates
like
other
convenience
methods
that
are
not
part
of
the
node
interface,
but
like
are
useful
because
they
give
you
less
generic
types.
If
you
want
to
use
them,
yep
yeah,
there's
like
a
camera,
there's
like
an
iterator
or
like
it
generates
just
an
iterator
that
will
give
you
like.
A
It's
also
worth
pointing
out
that
something
that
hannah
mentioned
the
other
day
about
codegen
here
is
that
if
you
look
at
my
implementation
of
the
hand
when
I
actually
use
the
code
gend
hashmap
root,
I
I
cheat
all
the
time
because
I'm
way
too
lazy
so,
for
example,
the
pocket
size-
I
just
fetch
it
with
the
unexported
fields.
C
A
C
A
C
D
I
don't
know
what
it
is,
though.
Okay,
no,
no!
No,
it's
cool.
As
long
as
I
have
a
web
browser,
I
can
make
this
yeah,
I'm
just
showing.
D
Okay
yeah,
so
this
is
an
interesting
implementation
of
an
adl,
so
basically
unix.
The
unix
of
sd1
is
really
weird
in
the
sense
that
it
isn't
unix
of
sp1.
Is
they
coded
with
protobuf
nodes
using
the
like,
dag
proto
specification,
which
is
like
dag
proto,
is
like
a
very
early
ipld
codec
that
does
not
support
the
whole
data
model.
It's
got.
You
know
like
it's
definitely
like.
D
We
were
just
a
long
long
time
ago
that
it
came
into
being
and
one
of
the
things
that's
interesting
about
the
structure
of
dag.
D
How
a
dad
protobuf
works
is
that
it's
basically
got
two.
It
always
has
two
fields:
there's
a
data
and
a
links
field
and
the
links
is
a
list
like
like
a
an
order
list
and
then,
but
then
each
element
in
the
link
in
the
links
field
has
a
name
for
the
link.
So
it's
like
it's
like
the
structure
is
list,
but
each
element
has
like
of
the
list,
has
a
name,
and
that
name
is
actually
probably
more
useful
than
the
index
in
the
list
and
so
yeah.
A
D
This
everywhere
they
look
up
things
but
map
key.
So
we
have
this
so
the
the
way
this
actually
got
started.
Is
we
had
this
interesting
problem.
We
were
trying
to
integrate,
go
ipld,
prime
into
go
ipfs
where
we
had
done
all
this
work
with
to
to
decode
protobufs
in
go
ipld
prime
dan
wrote
go
kodak
dab
tv
which
does
which
does
reading
sorry.
Do
you
go
by
nickname,
daniel
dan
or
just
daniel
I'll?
D
Do
daniel
sorry
about
that
daniel
wrote:
go
code
act
pb
which,
like
deserializes,
deserializes,
dag
proto
into
ipld
prime
nodes,
but
it
it
deserializes
them
in
like
the
way
you
would
expect
a
go.
Ipl
the
go
ipld
prime
data
model
to
work
which
is
like
the
the
links
field
is
a
list
right,
and
so
we
were
trying
to
figure
out.
We
wanted
to
be
able
to
run
selectors
on
protobuf
nodes
and
the
selectors
were
almost
always
going
to
be
path.
Selectors
that
expected
named
keys.
D
So
the
original
way
this
got
started
is
we
were
trying
to
write
a
version
of
go
of
a
merkle
bag,
node
or
dag
proto
node,
that
you
could
call
look
up
by
string
on
and
iterate
like
a
map,
and
so
that's
actually
this
with
the
very
fir
first
route
version
was
a
path
pb
node,
and
this
and,
like
literally
all
this
thing
is,
is
like
it's
basically
a
it
has
underneath
like
here's
path,
p,
b,
node
and
underneath
it
it
has
a
so-called.
D
Is
the
underlying
node
that
that
we're
using
and
if
you
look
at
this,
like
the
main
methods,
are
like
look
up
by
string
and
then
look
up
by
node
and
then,
like
everything
else,
just
differs
to
the
substrate
which
itself
just
errors
you
know
like
so
so
that
makes
it
easy
and
you
know
like,
and
then
we
have
like,
we
did
write
an
iterator
or
a
unix,
fs
iterator
and
then,
like
I'm,
trying
to
think
what
other
methods.
D
So
you
can
see
that
here
again
we're
just
differing
to
the
substrate
element,
and
then
we
like
added
these,
like
these-
are
like
those
weird
like
generated
code,
gen
methods
like
iterator,
which
is
not
a
mapping
or
a
list
iterator,
but
a
nice
like
super
type
iterator
that
allows
you
to
do
stuff
so
yeah.
This
is
what
we
built
and
then
it
kind
of
like
so
then
it
like
went
from
there
and
we
were
like
okay.
Well,
we
did
that
and
then
we
were
like.
D
I
think
that
was
the
very
first
implementation.
We
were
just
trying
to
get
go
path
to
work
with
selectors
and
it
was
working
until
we
got
to
the
point
of
getting
a
unix
fs
sharded
amp
directory,
which
is
a
thing
that
you
need
to
be
able
to
support.
Unix
fs
has
two
direct
two
directory
models.
D
One
is
a
a
regular
map
directory
where,
like
in
the
the
merkle,
dag
is
represented
or
the
dag
photo
is
like
the
data
and
then
the
links
is
just
the
list
of
like
files
and
or
directories
in
the
directory.
It's
essentially
the
ls
of
the
the
directory.
The
other
version
is
that
the
way
the
directory
list
is
maintained
is
actually
a
camp
that
is
embedded
in
the
links
field
of
the
dag
proto,
that's
a
unix
of
sharded
directory,
and
so
at
that
point
we're
like
okay.
D
Well
now
we
need
to
support
this
and
then
that
required
finding
out,
like
the
the
very
first
version,
was
like.
Oh
we'll,
just
support
lookup
by
string,
and
then
we
were
like
wait
a
second.
If
we
need
to
support
this
other
version,
we
need
to
actually
look
at
each
unix
fs,
like
file
and
or
directory
to
determine
exactly
what
type
it
is
the
way
unix
fs
basically
works
is
that
the
data
member
of
the
dag
protobuf
structure,
encodes
in
itself,
a
nested
protobus
structure,
which
describes
what
the
unix
fs
thing
is.
D
So
that's
how
we
ended
up
writing
this
like
okay.
Well,
I
guess
we
better
write
some
unix
at
best
stuff.
Where
is
that
stuff?
I
don't
even
remember
iteration
utilities,
hemp
directory
right,
I
think
data
is
where
we
first
like.
This
is
just
like
the
thing
to
like
what
does
this
thing?
Do
I
can't
remember
what
this
does.
Oh,
my
god,
oh
it
looks
generated.
Let's
look
at
the
code
gen.
The
code
is
the
easiest
way
to
figure
out
what
this
scheme
is.
I'm
pretty
sure
this
schema
was
like
yeah.
D
This
is
written
real.
This
is
a
fast
right
right,
so
this
is
like
this
is
we
we
are
building
an
ipld
node
to
like
deserialize,
the
unix
fs
protobuf
into
an
ipld
node.
So
we
can
look
at
methods
on
it,
and
so
then
we
have
like
unix
fs
data
which
has
like
these
fields,
and
then
I
don't
remember
how
we
use,
how
that
did
we
actually
deserialize
it?
I
don't
there
must.
D
There
must
be
some
code
to
unmarshal
and
marshal
it
anyway,
sorry
right
and
then
how
how's
that,
on
marshall,
I'm
fascinated
consu
decode,
unix,
fs
data,
oh
okay,
oh
right,
there's
like
basically
some
like
proto
buff
consuming
code
to
like
read
it.
I
just.
I
actually
took
this
from
your
protobuf
method
and
I
just
was
like
okay
well.
This
is
how
dan's
doing
and
I'll
just
do
this,
but
with
all
the
fields
that
I
am
aware
of
so
yeah,
it's
actually
re
consuming
the
protobuf,
but
then
building
it
ipld
out
of
it.
D
So
yeah,
so
that's
reading
that
and
then
like
we're
like
so
then
we
have
node,
and
then
we
have
a
hamp,
the
shard
of
hampton
implementation.
This
is
pure.
This
is
the
this
is
one
fun
fact
is
that
in
the
world
of
protocol
stack,
we
have
two
different
concepts
of
a
hamp.
One
is
like
a
general
purpose
hampt,
which
is
like
the
thing
that
daniel
wood
had
implemented
and
then
the
other
is
this
thing
in
the
units
of
s1?
D
It's
like
the
sharded
directory,
which
is
like
a
totally
different
implementation
of
I
mean
it's
still
a
hamps,
but
like
it's
a
different
implementation,
different
code,
all
that
stuff-
and
it
is
specifically
for
directories
so
yeah.
We
have
this
implementation
here
and
I
believe
the
big
main
function
here
is
like
getting
look
up
by
string
to
work
which
is
like
pretty
funky
in
here.
If
I
remember
correctly,
let's
see
we
have
look
up
by
segment.
Where's,
look
up
by
string,
look
by
node
with
lookup
attempt.
D
Oh
my
god,
right
there
was
a
lot
of
stuff
going
on.
We
have
this
internal
lookup
functioning
and
you
can
see
it's
like.
Actually
quite
a
complicated
function
and
then
and
then
it's
like
trying
to
like
load
the
next
node,
because
you
know
like
a.
F
D
That's
like
a
multi-node
structure
and
eventually
like
I
believe
it
produces
like
something
at
the
end,
and
this
is
largely
taken
from
the
existing
unix
fs
code
and
like
moved
over.
But
it's
not
that
bad.
Sorry,
it's
no
problem.
D
One
thing
that
is
obviously
important
here
is
that
this
has
to
have
a
link
system
in
it
right.
So
that's
a
that's
a
tricky
little
element
and
then
one
thing
that
got
implement
got
it
got
sort
of
like
thrown
in
the
mix
here
as
a
result
of
doing
this,
so
we
ended
up
doing
this,
for,
like
all
of
the
the
cool
thing
is
that
it
works
for
basically
for
all
for
all
of
the
read
functions
for
the
most
part
in,
oh
sorry,
no
we
did.
D
We
did
a
unix,
fs
read
for
directories
and
chartered
directories.
We
haven't
done
one
for
an
edl
for
files
themselves.
It's
not
clear
exactly
what
that
adl
should
look
like.
Obviously
one
version
would
be
to
just
have
the
bytes
field
return
all
of
the
bytes
in
the
file,
but
that
may
not
be
that
useful.
We
may
want
it
to
actually
be
able
to
do
like
byte
ranges
and
stuff.
D
D
What's
it
called
iplds
link
system
itself,
which
is
the
you
can
set
on
the
link
system,
the
so-called
node
refire,
and
what
this
will
do
is
at
the
at
the
at
the
very
end
of
the
node
loading
process,
the
point
where
it
gets
like
the
regular
ipld
node.
D
You
can
specify
a
refire
function,
reifying,
I'm
not
exactly
sure
why
that's
the
word
we're
using,
but
it
is
how
you
reifying
means
going
from
the
original
to
the
adl
and
in
this
case
like
what
we're
doing
this
is
a
node
ref
refining
function
and
we're
like
okay.
If
we
have
a-
and
this
runs
on
like
every
node
that
gets
loaded
by
the
ipl,
the
link
system
like
what
we
do
is
we're.
Like
okay
did
we
get
do
we
have
a
dag,
proto
buff
node?
D
If
not
just
return
it
as
is.
Do
we
have
a
data
node,
in
which
case
I
believe
what
it
will
do?
Is
it
will?
If
there's
no
sorry,
if
there's
no
field
data,
then
it
will
assume
that
it
is
like
not
a
unix
at
s
node,
and
so
therefore
it
will
treat
it.
I
believe
the
default
refire
here
is
just
to
return
this
like
path
node.
So
we're
saying.
D
Nodes
we'd
prefer
to
treat
as
path
pp
nodes,
meaning
like
we
can
look
up
the
links
by
string
just
because
that's
useful
and
then
right
and
then
what
is?
What
is
this
thing?
I
can't
remember
so
like
then
we
like
look
at
okay,
it
has
the
data,
so
we
try
to
decode
it
as
unix
fs.
If
that
doesn't
work,
we
just
go
back
to
returning
a
path,
pb
node
and
then
like.
D
D
So
essentially,
when
you
load,
if
you
use
this,
whenever
you're,
using
like
your
selector
traversal,
when
you
load
a
unix
node
it
or
a
merkle,
dag
node,
it
will
either
convert
it
to
a
path
node,
in
which
case
like
you
can
use
lookup
by
string
on
it
or
if
it's
unix
at
best
node
it'll
con,
convert
it
to
either
a
regular
directory
or
a
or
a
shardi
directory.
So
that
was
the
thing
we
ended
up
doing.
It
was.
D
Yeah
so
but
like
it
is
still
useful
for
compatibility
and,
like
also
like
you
know,
it
was
kind
of
cool
that,
like
we
did
this
and
like
all
of
a
sudden
in
like
a
week,
we
ended
up
implementing
like
a
lot
of
the
read
side
of
unix
fs
in
v1
in
ipld,
prime,
which
is
unique,
and
we
even
implemented
it
with
that.
What
is
the
uxfs
1.5
edition?
I
think
there's
like
some
additional
bytes
that
you
get
in
enxsv
1.5
that
doesn't
exist
in
regular
unix
fsd1,
and
we
added
it
to
this.
D
So
if
we
were
to
finish
this
one
of
things,
that's
interesting,
I
think,
like
an
open
development
question
and
I
feel
the
prime
is
like
we
didn't
attempt
to
implement
any
of
the
like
writing
or
modification
inside
of
this
because,
like
it's
not
like,
the
builder
interfaces
are
tricky
for
how
you're
going
to
do
all
that
and
like
and
then
like
the
other
ideas
that
will
there
be
this
like
select
or
traversal
with
modification
and
there's
like
an
implementation
of
that
sort
of,
but
like
really
not
built
out.
So
it's
an
interesting
question.
A
A
I
haven't
thought
about
it
enough,
but
I
think
we
could
do
some
things
about
like
make
it
easier
for
maps
and
lists,
and
I
think,
on
the
other
side
there's
we
need
to
figure
out
some
interfaces
for
update
and
bulk
operations
because,
for
example,
if
you
want
to
do
some
bulk
modify
operations
and
a
hand
or
a
unixfest
or
an
amt
or
whatever
else,
I
think
the
interface
should
be
somewhat
intuitive
and
common,
because
otherwise
we're
just
reinventing
the
wheel
in
every
single
idea,
and
once
we
have
those
two
things
I
think
they've
been
table.
B
I
guess
the
other
thing
that
I
wanted
to
bring
up
is
like
adl
integration
into
the
rest
of
the
world.
So
right
now,
we've
got
this
on
a-link
system.
We
can
put
one
adl
as
the
reoffire
or
we
can
find
one
refi
function
to
try
and
say
great
I've
got
nodes
in
this
link
system
context.
This
is
like
you
know.
I
can
have
some
heuristic
set
of
things
to
try
and
apply
adls
in
some
cases.
B
It
is
plausible,
like
there
continues
to
be
thought
about
like
where,
where
and
when
you
went
to
invocations,
and
so
one
of
the
places
that
has
been
talked
about
that,
I
think
generally
people
haven't
been
too
unhappy
about-
is
long
term.
It
might
make
sense
to
put
adls
on
selectors.
B
So
in
a
selector,
you
might
be
able
to
convey
at
some
point
in
this
lecture.
I
now
have
just
noted.
I
would
like
to
interpret
this
note
with
this
adl
so,
for
instance,
I'm
traversing
through
some
large
dag,
but
in
this
place
I
need
to
now
interpret
it
as
a
hand,
because
I
want
you
know
this
logical
map
key
out
of
it,
but
I'm
I'm
not
wanting
to
convey
the
chord
path.
The
chord
jumps
through
the
actual
implementation
of
that
or,
I
might
not
even
know
them
in
some
cases.
B
A
B
B
I'll
show
you
this
like
a
quick
factory
ids,
but
once
the
id
points,
the
type
information
on
schedule,
the
selector
that
you
get
whatever
and
the
second
half
of
the
cid
points,
the
actual
data.
But
this
gets
complicated
when
you've
never
solved.
A
B
A
multicollector
either
yeah-
you
wouldn't
have
seen
it
personally
or
you
could
have
some
like
some
description
of
the
admin
on
how
it
works.
Potentially,
it
wasn't
program
or
some
other
information
as
far
as
how
to
actually
access.
But
again,
this
stuff
started
getting
into
a
lot
of
land,
and
just
you.
B
You
know,
basically,
this
is
probably
another
one
that
should
be
similar
right.
It's
the
parts
like
you
don't
know,
it's
not
part
of
this
laughter.
This
is
basically
you
don't
know
that
part
of
the
selector
right.
Okay.
I
would
like
to
be
able
to
actually
negotiate
this
really.
If
I
give
you
a
selector,
you
can
execute
something.
Then
I
would
like
you
to
be
able
to
just
tell
me
here.
I
know
something
so
continue
on
until
you
know
something
then.