►
From YouTube: Daniel Bustamante Ospina - Arquitectura de microservicios reactivos con Reactive Commons
Description
Obtener los beneficios de los sistemas no bloqueantes y la programación reactiva, mediante el modelo de programación funcional, inmutabilidad y la orientación a mensajes en sistemas distribuidos; usandoReactive Commons un proyecto open-source apalancado desde Bancolombia cómo un esfuerzo por integrar la programación reactiva (Reactive Streams y Project Reactor) y un modelado del dominio que toma elementos de DDD y patrones cómo Event Notification, Pub/Sub, Mensajería directa (Comandos), para poder crear soluciones altamente escalables, resilientes y extensibles.
A
Good
afternoon,
everyone
welcome
to
my
talk
on
reactive,
microservices
architecture,
with
comfortable
reactive
and
a
little
quickly
about
my
work
as
a
senior
software
engineer
at
bancolombia,
I
really
like
open
source
distributed
systems.
Reactive
systems
work,
promoting
engineering
practices,
software
in
bancolombia
I
am
also
a
writer
for
the
technology
blog
of
bancolombia.
My
language
and
now
contributed
to
different
open
source
projects.
A
Of
that
I
am
going
to
talk
about
one
that
we
have
been
working
on
to
this
day
called
reactive,
as
is
the
first
thing
a
little
like
an
introduction
to
why
we
are
talking
about
architectures
or
reagent
systems,
and
basically
it
is
because
the
requirements
of
the
applications
have
changed
drastically
in
the
last
years,
that
is
to
say,.
Today's
demands
are
simply
not
going
to
be
satisfied
by
software
architectures
that
suddenly
they
served
very
well
in
the
past,
or
at
least
enos.
A
That
is
what
the
authors
of
the
reactive
manifesto
have
wanted
to
tell
us
that
they
are
reactive
systems,
then
what
are
their
characteristics?
Their
characteristics
is
that
basically,
they
are
elastic
resilient,
maintainable
and
extensible
response
systems
strongly
based
on
asynchronous
messaging,
strongly
directed
by
messages.
As
a
conclusion,
we
can
To
say
that
these
systems
are
more
robust,,
more
flexible
and
are
better
positioned
to
meet
modern
demands
in
terms
of
load
and
scalability,.
A
You
can
find
a
little
more
about
this
on
the
reactive
site,,
two
NGOs
stated,,
so
in
summary,
reactive
systems
must
react
adequately
to
their
users.
under
different
conditions,.
That
is,
response
and
bosh
must
be
maintained,
despite
the
fact
that
the
load
conditions
may
be
variable,
that
is,,
despite
the
fact
that
the
load
conditions
are
variable
and
despite
the
fact
that
different
components
may
fail,,
the
system
must
continue
to
be
maintained..
Ponsive
should
continue
to
answer
how
this
is
achieved
mainly
using
messaging
5
message.
Driven
communication
is
not
a
new
concept.
It
is
an
idea.
A
It
really
is
a
great
idea,
but
it
has
a
considerable
time
in
computer
science.
Something
important
is
to
highlight
that
it
is
a
idea
that
has
been
around
since
the
very
invention
of
object-oriented
programming.
When
alan
kelly
refers
to
object-oriented
programming.
To
which
to
go
is
one
of
the
authors
or
even
the
one
who
coined
the
term
object-oriented
programming.
He
says
he
said
it
at
some
point
that
he
is
a
little
bit
sorry
to
use
the
term
object,
because
a
lot
of
people
focused
on
the
idea.
A
That
was
not
so
important
that
the
most
important
idea
that
he
wanted
to
highlight
was
the
idea
of
messaging
passing
messages,
and
that
is
why
we
are
going
Let's
see
what
this
influences
in
reactive
systems,.
There
is
a
term
also
well
known
today,
that
is
known
as
reprogramming.
active,
reactive
programming
and
reactive
systems
are
different.
They
are
not
the
same,
but
they
are
related.
Let's
give
a
little
bit
about
what
reactive
programming
is.
A
Reactive
programming
is
primarily
a
programming
approach
that
models
a
system
as
a
set
of
asynchronous
data
flows
based
on
on
events
or
on
signals,.
It
is
also
based
mainly
on
the
abstractions
of
functional
programming,
such
as
higher
order
functions
such
as
the
map
function,,
which
is
also
known
as
future
or
the
future
pattern,.
The
flat
map
function,
the
filter,
ship
reviews
function.
That
gives
us
give
these
kinds
of
functions.
Give
us
a
way
to
be
much
more
expressive,
a
way
to
say
what
we
need
need
to
explicitly
say
what
the
machine
has
to
do.
A
Tell
us
about
a
declarative
approach.
Instead
of
an
imperative
approach,
we
can
also
leverage
on
the
functional
composition,,
which
is
the
ability
to
generate
new
functions,
By
combining
existing
functions,
lazy,
evaluation,
lazy
evaluation
allows
us
not
to
execute
code,,
not
to
execute
actions
that
we
are
not
going
to
need
to
do,
and
another
important
thing
about
reactive
programming
is
that
it
allows
us
to
optimize
the
use
of
resources
through
the
moon
blocking,
and
it
is
already
simple
what
would
otherwise
be
much
more
complex,
that
is,,
it
enhances
the
scalability
of
systems.
A
When
we
talk
about
scalability,
we
have
to
understand
a
little
what
we
mean
by
scalability.
The
scalability
of
the
system
is
given
by
the
capacity
of
that
system,
to
increase
its
product,
to
increase
its
capacity
to
serve
users
and
transactions,
as
we
give
it
more
resources.
More
resources
are
courteous,
computational,
nodes
of
a
processor
threads
of
processing,
and
there
is
a
law
hamptons
law
that
models.
Let's
say
what
happens
with
the
scalability
of
the
systems
and
how
far
we
can
go.
A
Basically,
the
law
of
anv
dance,,
although
it
is
modeled
with
an
equation,,
but
it
will
go
more
to
a
graph
to
understand
it,.
It
simply
refers
to
the
fact
that
we
can
do
a
lot
with
the
system,.
We
can
greatly
increase
parallelism
at
the
forum
level
at
the
node
level,,
but
even
if
there
is
a
part,
very
small
of
the
system
that
has
to
be
executed,
sequentially,,
that
is
to
say
that
we
cannot
paralyze.
A
There
is
a
limit
to
which
we
can
reach
this
increase
in
the
drop
bus
of
the
system,
to
give
us
an
idea.
If
we
can
take
the
product
of
the
system
up
to
to
optimize
or
to
perform
almost
infinitely
95%
of
the
system,,
we
would
only
achieve
an
increase
in
track
put
of
20
times
just
for
that
5%
that
we
could
not
paralyze.
But
let's
say
that
scalability
does
not
end
there,
yes,.
There
are
other
considerations
regarding
scalability
to
other
limits.
Those
other
limits
are
given
by
something
known
as
the
universal
law
of
scalability.
A
That
tells
us
or
adds
d
Let's,
add
an
additional
coefficient
to
the
law
from
before,
a
coefficient
that
what
it
does
is
that
it
degrades
the
performance
and
degrades
the
product
of
a
system
as
more
load
or
more
work
is
done,
that
is,.
It
will
not
only
reach
a
point
where
we
cannot
increase
more,
but
it
will
reach
a
point
where
the
system
degrades
ssd
system
degradation
would
be
given
by
something
known
as
the
q
penalty.,
This
type
of
penalty
is
something
that,
with
reactive
programming.
A
We
want
to
avoid
a
lot
when
we
go
from
a
blocking
model
of
a
traditional
processing
model.
What
used
to
be
freight
servers,,
for
example,
tomcat
or
etc.,,
handle
that
handle
a
blocking
model,,
have
a
high
consistency
penalty
within
the
bank
in
a
research
team,
where
we
were
reviewing
that
impact
in
transactional
systems,
we
actually
realized
that
in
a
real
test
they
model
what
the
equations
of
the
universal
law
of
scalability,,
that
is
to
say,.
A
We
compare
two
computational
approaches,,
the
reactive
model
in
non-blocking
versus
a
model
of
serving
block-form
requests
before
blocking
at
the
crowd
level.
In
the
iava,
specifically,.
We
compare
the
flux
reactor
web
reactor
project
with
atomic
doing
exactly
the
same
amount
of
work.
We
realized
that
there
is
a
degradation
that
initially
presents
a
very
similar
trope,
but
that
the
blocking
model
is
effectively
much
more
susceptible
to
the
universal
law
of
scalability
to
the
coherence
coefficient
where
we
have
a
degradation
in
the
system.
Much
more
marked.
A
So
here
we
are
seeing
some
of
the
benefits
of
what
reactive
programming
is
and
reactive
programming
is
not
new.
In
fact,
many
big
names
in
the
industry
use
it.
Netflix
was
one
of
the
first
to
start
promoting
the
development
of
reactive,
extensions
for
java,
which
initially
started
doing
m
icrosoft
with
its
reactive,
extensions
and
age,
and
many
other
frameworks
have
already
emerged
that
allow
us
to
carry
out
reactive
programming.
But
then,
where
does
this
come
from?
A
When
we
talk
about
reactive
microservices,
when
we
talk
about
microservices,
we
see
that
they
are
different
units
normally
separated
by
business
contexts
and
that
act
independently
basic
vision
of
microservices.
We
have
a
separation
of
responsibilities
and
someone
who
is
making
different
requests,
but
microservices
many
times
like
this.
Always
a
complex
system
needs
to
communicate
with
each
other.
That
is
where
we
talk
about
reactive,
microservices
or
microservices,
whose
internal
communication
is
oriented
by
asynchronous
messaging.
A
So
the
purpose
of
reactive
is
to
provide
a
set
of
abstractions
and
implementations
of
various
patterns
and
practices
that
support
the
basis
for
a
microservices
architecture
of
reactive
reactive,
as
it
is
a
project
that
began
to
emerge
very
naturally
when
I
was
working
a
couple
of
years
ago
on
some
projects
for
different
companies,
where
we
needed
a
reactive
messaging
approach.
What
base
features
does
this
framework
end
up
having
active?
How
do
you
end
up
having
a
100%
declarative
model?
Automatic
conversion
of
messages?
A
Objects,
auto
configuration
of
the
message
topology
over
mission
radius
still
to
be
able
to
route
messages.
You
need
us
to
declare
exchange
to
declare
queues.
What
What
we
do
is
going
indexes
between
them
is
only
would
make
it
reactive,
as
it
is
fully
automatic
a
strategy,
different
controlled
retry
strategies.
Also,
not
the
input,
write,
commons
load,
balancing
and
horizontal
scalability
a
reactive
programming
model
based
on
the
project
reactor
fail
characteristics,
tolerant.
A
That
will
allow
us
to
say
what
we
want
to
happen
when
a
message
cannot
be
processed
for
a
certain
amount
of
time
and
location,
transparency
that
allows
us
to
route
messages
in
different
ways,
or
we
are
no
matter
where
it
is
located.
Who
is
going
to
be
the
receiver
of
that
message
and
a
bit
of
the
architecture
of
the
project?
The
architecture
of
the
project
is
based
on
how
an
app
is
and
very
small,
a
very
simple
and
declarative
corapi
that
is
composed
of
two
packages.
A
The
most
mature
implementation
today,
the
one
we
have
so
far
in
the
implementation
quickly
would
be
5
+
implementation
of
which
we
have
2
starters
or
a
starter
that
integrates
directly
with
spring
boots
and
a
stand
alone.
Starter
that
allows
us
to
use
it
for
outside
of
projects.
It
is
cousins.
It
is
that
separation
in
the
architecture
of
the
project
will
allow
us
to
have
other
implementations.
In
addition
to
today
in
bancolombia,
we
are
working
on
an
implementation
for
the
cloud
messaging
systems,
ss
ss,
and
we
can
start
working
in
the
future.
A
Let's
say
in
others,
like
you,
I
said
it
is
understood
and
consists
of
a
very
limited,
very
small,
to
simplify
this
whole
world
of
synchronous
messaging.
It
has
a
direct
call
interface
without
a
gateway
which
allows
us
to
send
message
commands
to
a
certain
target,
with
the
name
of
a
target
without
knowing
its
location
and
also
allows
us
to
implement
the
request.
Replay
pattern
via
Messaging
has
another
interface
that
is
the
domain
based
and
take,
and
live
in.
Peace
allows
us
to
emit
events
that
can
be
listened
to
and
subscribed
to
dynamically
by
other
microservices.
A
That
initially
do
not
have
to
know
the
microservice
that
emits
them
and
has
an
object.
The
class
called
handler
registry
that
allows
us
to
listen
to
those
events
and
handle
those
commands
that
are
directed
towards
the
microservice
and
can
also
respond
to.
Where
is
completely
krona
action.
The
first
of
the
patterns
that
reactive
implements
is
the
even
notification
pattern
for
the
even
notification
pattern
quickly.
A
What
that
pattern
gives
us
is
that
it
allows
us
to
reverse
the
dependencies
between
the
microservices,
where,
before
you
had
a
context
that
you
needed
to
tell
a
context
to
do
to
the
community
to
send
possibly
synchronous,
communication
networks
or
directly,
so
that
did
something
in
an
event-driven
model.
What
we
do
is
that
is
the
micro
service
emits
an
event,
and
there
can
be
multiple
subscribers
to
that
event,
which
is
the
original
micro
service.
You
don't
have
to
know
a
priori
to
do
this.
Quick
commons
lets
us.
Do
it
basically
with
two
lines
of
code?
A
It's
two
or
three
lines
of
code:
First
of
all,.
We
enable
the
mechanism
through
an
annotation
that
generates
a
self-configuration
process
for
the
sprint
that
is
given
and
hipólito
main
event,
bass
that
allows
us
to
inject
that
domain
even
base
interface
wherever
we
want
through
and
we
use
sprint
could
be
by
injection
by
constructor
or
by
auto
white
annotations.
A
Basically,
then
we
have
to
create
the
event.
The
event
is
any
type
of
data
that
we
have
in
our
project
create
the
take
and
level
we
simply
give
the
event
a
name,
an
id
and
any,
and
the
data
jehova
contain
object
that
we
believe
is
part
of
our
domain.
Finally,
we
use
the
method
in
mid
of
ivan
basso
and
cua
When.
That
is
done,.
We
guarantee
that
the
event
is
emitted,.
A
The
measure
method
returns
a
publisher
that
is,,
let's
say,,
coherent
with
the
reactive
stream
specification,
and
allows
us
to
continue
a
reactive
flow
from
the
reactive
objects
of
the
reactor,
such
as
the
mono
and
flux
to
be
able
to
listen,.
Let's
go
those
events.
The
counterpart
is
also
very
simple.
We
use
an
annotation
called
enable
months
lister,
we
put
it
in
one
of
the
project,
auto
configuration
classes,
we
generate
something
known
as
handler
registry.
We
simply
write
it
down.
A
Alejandré
régis
link
has
a
register
method
that
allows
us
simply
declaring
is
a
completely
declarative
approach,
declaring
that
we
are
listening
for
an
event,
the
name
of
the
event
and
the
function
that
is
going
to
handle
that
event,
as
well
as
the
data
type.
We
want
it
to
be
and
automatically
trigger
that
event.
A
For
that
we
have
another
annotation
that
we
must
enable
in
one
of
the
classes
of
the
direct,
bold
law
without
wayne.
Once
the
annotation
is
placed,
we
can
inject
in
any
class
that
we
need
the
singer
way
and
the
same
As
we
did
with
the
emission
of
events,.
We
simply
create
any
type
of
object
in
our
domain,.
A
We
generate
a
command
with
the
name
of
the
command,,
any
idea,,
the
data
of
the
command,,
and
we
tell
the
command
that
the
widget
will
be
the
command,,
but
the
command
needs
a
special
target
who
is
going
to
receive
that
command
from
the
counterpart
would
listen
to
or
handle
those
events,?
We
also
do
it
through
the
register
handler
through
the
register
method,.
A
We
have
to
enable
the
direct
without
gateway
once
we
have
injected
it
into
one
of
the
classes
we
generate
in
the
5th
class,
any
name
as
the
name
of
the
query.
The
data
that
will
travel
in
the
leather
and
We
simply
invoke
red
bulls
replay
and
with
the
name
of
the
target,
who
is
going
to
manage
the
game,
the
class?
That
will
be
our
response,
the
type
of
data
we
want
it
to
give
would
be
ellipse
and
we
get
the
response
as
the
reactive
data
type.
A
That
allows
us
to
continue
building
a
completely
asynchronous
and
non-blocking
stream
and
the
same
for
the
part
of
the
server
that
handles
the
game
and
simply
does
it
through
the
re
handler
gistry
shareware
and
the
function
that
will
handle
the
leather
and
the
class
is
the
type
of
data
that
will
reach
us.
With
this,
we
can
achieve
communication
patterns
in
parallel,
for
example,
changing
a
blocking
pattern
where
we
make
three
requests
and
the
total
latency
would
be
the
sum
of
the
3
cumulative
latencies
for
a
non-blocking
pattern
ante.
A
Where
simply
the
request,
latency
of
the
entire
task,
would
be
the
maximum
of
the
3,
latencies
or
n
latencies
involved,
as
we
easily
achieve
this
with
common
reagent
simply
through
it
direct
100
than
edwin
to
spend
the
interface,
we
simply
call
it.
We
get
with
each
of
the
calls,
let's
say
a
different
result,
but
since
these
are
reactive
types,
until
that
moment,
nothing
has
been
executed
completely
law.
A
If
they
are
lazy
with
the
reactor
zip
function,
we
can
declare
that
all
these
three
results
are
going
to
obtain,
or
we
are
going
to
launch
them
completely
asynchronous
and
non-blocking,
that
is,
they
are
going
to
be
executed.
Completely
in
parallel,,
one
of
the
latest
reactive
features,,
such
as
the
automatic
management
of
retries
or
foul
tolerance,,
allows
us
to
quickly
generate
controlled
retries
policies
and
allows
us
to
specify
what
happens
when
they
are
generated
or
when
the
retry
limit
is
exceeded..
A
And
that's
it,
we're
done.
Thank,
you
very
much
for
this
space,
and
the
opportunity
to
present
this
talk,.
The
time
was
very,
very
short,
so
for
now,
how
to
spend
a
little
fast
due
to
the
presentations.
But
here
you
can
find
more
information
and
later
on,
the
bancolombia
engineering
blog
will
also
be
publishing
some
interesting
articles.