►
From YouTube: Ceph Tech Talk: Going NATS
Description
A
Welcome
everybody
to
stuff
tech
talk
today,
we're
joined
by
martin
brisman
on
specifically,
this
is
gonna,
be
a
long
one.
How
to
use
lewis
scripting,
together
with
nat's
blue,
a
client
to
add
gnats
to
the
list
of
bucket
notifications
at
some
point
or
simply
going
nuts.
So.
B
B
Yeah,
so,
as
you
mentioned,
we
I'm
gonna
describing
how
we
can
integrate
with
blue
and
nuts
together
with
seth.
I
work
on
this
project
this
summer
with
evaluations
during
google
summer
2021,
and
I'm
gonna
begin
by
showing
a
small
background
explaining
so
bucket
notification.
A
small
explanation,
bucket
notification
are
a
mechanism
to
send
notification
when
certain
events
like
putting
an
object
in
the
bucket
removing
the
scope
in
it
happening
on
the
bucket.
B
As
I
said,
to
external
systems,
a
bucket
notification
has
become
widespread
in
many
applications:
artificial
intelligence,
machine
learning,
edge
computing
and
even
more
simple
use.
Cases
like
automating
automated
data
pipeline
with
k
native
and
trigger
serverless
function
and
message
queue
api
for
serverless
computing.
I'm
gonna
be
going
into
more
detail
on
one
of
the
examples
how
we
can
here.
We
can
see
a
data
pipeline
with
step
notification
and
knowledge
serving
in
this
pipeline.
What
we
are
trying
to
achieve
is
basically,
whenever
we
upload
an
x-ray
photo
of
a
patient
in
a
clinic.
B
What
we
want
to
do
is
assert
the
risk
for
a
disease
and
send
it
back
to
the
clinic
after
we
asserted
the
after.
We
asserted
if
it's
dangerous
or
not,
and
if
it
is,
what
we
want
to
do
is
anonymize
it
and
send
it
for
researchers
using
a
different
bucket.
So
here
you
can
see
we
push
the
image
to
a
bucket
called
x-ray.
Data
in
seth
is
sending
a
bucket
notification
with
a
storage
topic.
B
A
k-native
evented
component
is
defined
as
a
consumer
to
the
storage
topic
and
it
will
fetch
the
message
and
pass
it
to
the
k
natives
to
the
k
native
serving
service
and
the
service
will
launch
an
image
processes
container
and
pass
its
contact
to
the
message
there.
It
will
assess
the
risk
and
print
it
on
an
image,
send
it
back
to
the
clinic
to
the
bucket
called
x-ray
data
in
process
and
if
it,
if
it
did,
detect
a
risk,
it
will
send
it
anonymized
to
a
research
bucket.
B
B
B
This
is
the
script
we
can
see
the
script.
I
will
go
into
more
detail
in
that
later
now.
What
I
want
to
do
is
upload
the
script
to
rgw
to
set,
so
I'm
going
to
be
using
a
rgw,
the
rgw
admin
command
with
script.
Boot
give
it
file,
location
and
the
context.
The
content
is
post
request,
so
it's
gonna
execute
the
script
for
every
request.
B
Now
we
can
use
the
the
guest
comment
to
actually
see
that
the
script
is
uploaded
and
this
is
the
script
we
want
to
execute.
Each
time
we
receive
a
request,
a
new
request,
but
now,
first
before
executing,
we
can
see
we
need
to
install
some
packages.
The
lua
script
is
using
two
packages
called
luna
json
and
not
to
integrate,
if
not
so,
to
install
those
packages.
B
C
B
Now,
after
doing
that,
I
will
be
listening,
subscribing
to
the
nut
server.
I
have
locally
running
with
the
topic
bucket
notification,
so
it
will
be
listening
to
this
topic
and
for
each
request
for
each
bucket
notification.
With
this
topic,
it
will
show
us
so
now.
This
is
the
first
request
we're
going
to
make
to
our
bucket
with
the
s3
cmd
command.
B
B
I
will
show
here
again
the
script
as
you
can
see
it's.
It
has
access
to
all
the
request
fields,
meaning
it
can
integrate
with
any
other
thing.
Besides,
not
it
doesn't
have
to
be
nuts,
it
could
be
any
other
message
broker
and
for
this
specific
cause
we
can
set
the
host
and
the
port
to
our
not
server
here
it's
set
by
default
right
now,
because
it's
local,
but
we
can
change
it
in
the
script
and.
B
It
so
this
white
was
the
quick
demo
to
to
this
integration
to
listening
to
another
server.
What
we
as
you
as
we
saw
it,
is
it's
opening
a
door
to
a
numerous
integration.
B
There
are
the
rpls
right
now
to
integrate
with
elasticsearch
and
prometheus,
and
any
other
integration
can
be
possible
using
this
without
touching
the
source
code,
and
still
there
is
more
to
come,
meaning
we
are
still
working
now
on
another
context,
the
the
context
I
I
showed
you
in
the
demonstration
was
the
post
request,
we're
also
working
on
a
background
which
will
be
more
useful
to
monitoring
and
saving
cash
between
requests
and
use
it
for
later
causes.
B
B
Quite
new
at
this-
oh,
this
is
actually.
This
is
the
first
open
source
project.
I've
been
working
on
with
you,
while
yeah,
so
I
wish
this
opportunity
to
thank
him
for
working
with
me.
He
actually
guided
away
from
me
and
showed
me
how
to
work,
and
so
it
was
a
really
nice
experience.
Experience
for
me.
D
So
I
have
a
quick
question:
yeah
yeah
go
ahead:
what
what
are
the
sort
of
str?
As
you
say,
we
can
do
amazing,
new
things
with
fluid
scripting.
As
we
add
lewis,
scripting
hooks
to
more
parts
of
the
code,
what
are
sort
of
the
strengths
and
weaknesses
of
the
lua
approach
in
this
project
and
and
which
things
that
what
lessons
did
you
learn
about?
What
what,
in
addition
to
back,
maybe
you
could
talk
more
about
background
is
one
of
them.
What
are
some
of
the
lessons
and
or
ideas
you
learned
while
working
on
this.
B
One
of
the
lessons
I
learned
is,
as
I
said,
while
talking
that
that
we
don't
quite
need
to
change
our
source
code
for
reaching
new
feature
or
new
system
which
is
coming
to
to
a
world
we
with
the
lewis
scripting.
As
I
said,
we
have
access
to
the
relevant
fields
we
need
and
we
can
export
them
using
the
the
lua
to
to
any.
B
B
C
I
do
want
to
mention
a
couple
of
of
drawbacks
with
with
this
approach
that
we
ran
ran
into
so,
for
example,
the
fact
that
we
cannot
cache
stuff
between
runs
so
lua
is
really
a
lightweight
virtual
machine
and
we
kind
of
create
a
separate
virtual
machine
for
each
request.
This
is
extremely
useful
for
separation
and
for
concurrency,
but
for
example,
in
our
case,
we're
reopening
the
connection
with
the
nat
server
for
each
and
every
execution,
because
we
cannot
really
cache
the
connection
and
keep
it
open
between
executions
of
the
lua
script.
C
So
this
is
a
bit
inefficient.
There
are
other
things
that
might
require
us
to
cast
stuff.
I
think
that
matan
mentioned
it
a
little
bit.
C
About
the
fact
that
we
want
to
have
a
background,
a
background
script
and
even
more
important,
a
background
data
structure
that
can
hold,
for
example,
counters.
C
So
if
you
want
to
to
count
all
kind
of
things
that
are
happening
in
the
system,
lua
is
extremely
efficient
way
to
do
that,
because,
instead
of
having
hard-coded
counter
in
your
you
know,
sql
plus
code
base
and
modifying
them
or
configuring
them
in
all
kind
of
ways,
you
can
actually
write
whatever
kind
of
logic.
C
Counting
logic
you
want
in
your
script,
but
you
need
to
persist
it
you
can't
let
it
go
away
between
runs,
because
this
is
the
whole
idea
about
counters
and
you
do
need
a
background
process
where
you
can
publish
them
to
prometheus
or
some
external
system
that
can
present
in
livestream
graphs
and
so
on.
So
there's
still
there's
still
quite
a
bit
of
work
left
there,
but
I
mean
we
we're
just
delaying
the
the
basic
mechanics
for
that
and
what
should
really
guide
us.
C
As
for
what
kind
of
things
we
need
to
add
as
infrastructure.
So
this
feature
is
the
actual
scripts
that
you
guys,
as
users
are
gonna
write.
So
I
really
encourage
you
to
try
it
out
and
and
to
try
to
think
and
and
use
it
for
for
useful
things
that
you
want
to
do,
whether
it's
around
debugging
or
integrations
with
misbehaving
clients
or
whatever
other
thing
or
integration,
with
external
systems
as
mathematics,
showed
and
then
once
we,
we
gather
your
inputs
in
that
we'll
be
able
to
evolve.
A
All
right,
then,
well
thanks
everybody
for
joining
us
for
another
tech.
Talk,
and
thank
you
again
for
for
your
work
for
google
summer
of
code
and
presenting
to
all
of
us
the
work
as
well
so
really
appreciate.