►
From YouTube: Knative eventing blockchain demo
Description
This demo, produced by software engineer @ IBM Johanna Saladas, walks you through how to use Knative eventing feature.
It highlights the following:
- What you can do with the basic Eventing components; broker and trigger with a simple producer and consumer;
- Streaming events in real time;
- In-stream transformation;
- Push-based front-ends
Check out Jo's repo to reproduce the demo in your local environment: https://github.com/josiemundi/knative-eventing-blockchain-demo
A
It's
basically
gonna
be
a
simple
Bitcoin
event
source
that
sends
messages
to
okay
native
broker,
and
then
we've
got
an
event
display
service
that
consumers.
These
events
and
they're
displayed
in
real
time
to
a
UI
they're.
All
update
I
should
highlight
the
basic
Canadian
venting
component,
so
we've
got
a
brokers
and
triggers
a
couple
of
producers,
and
consumers
will
be
streaming
events
in
real
time
doing
a
little
bit
of
in-stream
transformation
and
we'll
have
some
push-based
front-end.
A
So
I
used
the
blockchain,
the
Bitcoin
data,
because
it's
a
real
rich
data
stream
and
it's
free
I
think
Twitter
is
a
good
streaming
data
source
as
well,
but
it's
quite
overused
and
also
I.
Think
for
companies
like
finance
or
insurance,
the
Bitcoin
message
is
or
something
like
fin
hub
where
you've
got.
Financial
data
is
probably
a
bit
more
relevant.
A
You've
got
a
really
good
number
of
fields
that
you
can
play
with
in
the
data.
So
in
each
message,
there's
a
range
of
different
fields:
I'll,
try
and
add
an
image
actually
to
the
repo,
but
just
some
ideas
like
from
the
data
science
side,
you
could
try
predicting
transaction
fees,
you
could
classify
transaction
on
the
fly
and
send
alerts
so,
for
example,
later
in
part,
2
of
this
demo
will
classify
transactions
based
on
the
value
size
and
you
could
send
I
can
an
alert
like
a
push
based
alert
to
say:
hey.
A
A
All
of
the
code
for
this
demo
can
be
found
in
github
at
the
following
link.
So
the
top
one
is
the
readme
and
files
for
deploying
this.
This
demo
and
the
other
repo
is
the
just
the
event
source
for
the
Bitcoin
messages,
and
we've
also
got
a
blog
where
I've
got
a
couple
of
K
native
tutorials,
there's
stuff,
mainly
on
there
to
do
with
event-driven,
architectures
and
big
data.
A
So
one
of
the
things
that
I
really
wanted
to
look
at
was.
Why
would
someone
even
do
this
I
think
you
know
there
are
other
ways
to
do.
What
I'm
about
to
show
you
and
I
think
I
wanted
to
highlight
the
following
advantages.
One
is
that
K
Native
is
good
if
you
want
to
do
push
based
messaging,
we've
got
a
true
decoupling
of
producers
and
consumers,
which
again
I've
written
more
in
depth
about
on
my
blog
per
take
you
on
that
point.
A
We
can
apply
a
business
logic
well
data's
in
motion,
and
this
is
good.
This
is
really
handy
for
the
day's
streams
we're
working
with
real
time
event
streams,
especially
for
things
like
fraud,
detection,
where
we
need
to
make
really
fast
decisions
as
the
transactions
happening
and
also,
if
things
really
good
for
things
like
ml
ops
and
when
you
get
into
architectures,
like
the
rendezvous
architecture,
which
I'd
like
to
work
to
build
out
a
bit
further
using
Ken
a
to
preventing
time
which
I
haven't
done
yet.
A
So
this
is
what
we're
going
to
deploy
for
part
one.
Basically,
we've
got
a
WebSocket,
which
is
the
blockchain
info
web
socket
and
it's
streaming
messages
our
event
source
is
reading
the
messages,
turning
them
into
new
cloud
events
and
then
sending
them
on
to
a
broker.
And
then
we've
got
an
event
display
which
you
subscribe
to
these
events
for
your
our
trigger
and
it's
updating
a
UI
front-end
in
real
time.
A
So
I'm
going
to
switch
over
to
terminal
window
so
that
I
can
run
through
the
first
part
with
you
so
in
the
repo,
which
is
what
I've
got
open
at
the
moment.
There's
a
few
folders
in
there
the
sauce,
blockchain
event
display
UI
and
classifier
transaction
size
are
the
folders
that
you
need.
If
you
want
to
build
the
images
for
those
services
yourself,
if
you
just
want
to
run
the
demo,
you
can
just
go
into
the
Yama
folder
and
in
there
there's
a
number
of
deployments
that
you
need
to
get
this
running.
A
A
If
you
want
to
change
the
namespace
name,
that's
fine
you'll
just
need
to
change
with
the
other
yeah
more
files
because
they
have
their
namespace
house
hard-coded
in
are
then
gonna
apply
the
deployment
file.
So
this
is
our
sauce.
This
is
the
one
that
takes
the
messages
from
the
WebSocket
and
sinks
them
into
the
broker
and.
A
Then
we're
going
to
apply
our
trigger
and
this
basically
subscribes
anything
that
comes
from
the
blockchain
sauce
and
it's
gonna
say:
please
subscribe
our
UI
front
end
to
it,
so
our
event
display
service
and
then
we're
going
to
deploy
the
event
display
service,
which
is
in
zero,
five
zero
and
zero
six
zero,
so
kubernetes
deployment.
So
we've
does
two
files
associated
with
this
one.
A
A
Like
I
said
earlier,
you
could
swap
out
using
the
Bitcoin
source
to
be
a
different
website.
It's
so
you
could
use
fin
hub,
as
I
mentioned
before,
I'd
like
to
add
an
example
first
swapping
out
in
the
future.
So
hopefully
that
will
come
soon
before
I
move
on
to
part
two
I
just
wanted
to
run
through
what
the
WebSocket
source
application
is
doing
so
for
the
Bitcoin
source.
A
A
We
define
the
WebSocket
source
URL.
So
that's
our
blockchain
info
pay
address
that
we
use
we're
gonna
read
in
the
sink,
so
the
sink
in
this
case,
so
the
sink
is.
Where
do
we
want
these
cloud
events
to
go,
and
in
this
case
we
want
them
to
go
to
the
broker
and
we
push
this
in
from
the
llamo
that
we
deploy
so
in
the
llamo.
We
just
specify
our
sink
address
and
the
way
we
get
the
broker.
Url
is
why
doing
this
cube?
Ctl
get
broker
command
and
you'll
see.
A
A
Then
we
connect
to
the
specified
WebSocket
URL,
so
that's
our
source
that
we
specified
at
the
top
and
then
we
need
to
send
this
opt
unconfirmed,
sub
message
to
the
WebSocket
to
initiate
the
transaction
string
and
then
our
messages
will
stop
coming
through.
Then
we
read
each
transaction
message
from
the
WebSocket
and
we're
going
to
create
a
new
cloud
event
for
each
message
that
we
get
and
when
we
create
this
new
cloud
event
we're
going
to
set
some
of
the
field
so
we're
going
to
set
the
type
to
WebSocket
event.
A
A
Okay,
so
for
part,
two
I
wanted
to
build
out
the
first
bit
there
just
to
show
something
a
bit
more
like
what
you
might
do
for
a
real
business
scenario.
So
we've
got
the
messages
going
to
our
event,
display,
which
is
the
top
part,
and
then
I
wanted
to
address
a
really
simple
classifier.
That
might
seem
like
something
that
maybe
you
might
do
as
part
of
a
data
science
or
analytics
workflow.
A
A
And
then
in
the
so
in
the
llamo,
folder
you'll
see
there's
another
folder
called
classification,
so
we're
gonna
go
there
and
in
here
there's
some
more
some
more
yeah
milles.
So
the
first
one
that
we're
gonna
apply
is
the
trigger,
and
this
is
the
first
trigger.
So
this
is
the
trigger
that
says
anything
that
comes
from
blockchain
WebSocket
events
is
going
to
go
to
my
new
classifier
service,
which
is
not
running
yet
and
then
we're
gonna
apply
the
classifier
service.
A
A
We've
got
classifier
service,
our
test
display
service
and
then
we've
got
these
triggers
set
up
and
the
subscriber
your
eyes
are
what
we
want
them
to
be.
So
now,
if
we
look
at
the
logs
for
this
service
for
the
test
display
service,
which
is
only
subscribing
to
our
size,
classified
messages,
we
should
just
get
those
coming
through.
A
A
Okay,
so
that's
it
and
obviously
you
can
make
it
much
more
complicated.
So
if
you
look
in
the
in
the
folder,
for
if
you
look
in
the
classifier
transaction
size,
folder
you'll
see
the
code
for
the
classifier
and
you'll
see
that
it's
really
not
very
complicated,
but
you
could
make
it
as
complicated
as
you
want.
A
A
So
I
said
that
in
the
future
near
future,
I'd
like
to
look
at
more
complex
ml
patterns-
and
one
of
them
in
particular
is
the
rendezvous
architecture
which
I
haven't
I
haven't
built
this
yet.
But
this
is
like
what
I'd
like
to
do
next
I'd
also
like
to
add
some
other
models.
So
maybe
one
of
these
models
might
be
like
my
go
classifier,
but
I
also
want
to
have
some
that
are
made
me
written
in
Python.
A
A
A
Thanks
for
listening,
I
welcome,
any
feedback
or
suggestions
are
really
new
to
all
of
this
event-driven
and
cloud
native
stuff,
so
I'm
always
open
to
ideas
and
there's
definitely
room
for
improvement,
so
please
go
play
with
the
demo.
Let
me
know
what
you
think
and
let
me
know
if
you
do
something
really
cool
with
it
and
that's
all.
Thank
you.