►
From YouTube: Simplyfy Network Services for Real World, Cloud Native Application with Ballerina by Dakshitha Rathn
Description
Sri Lanka has a growing group of Cloud Native enthusiasts, students, professionals, and technology leaders. KCD Sri Lanka offers a platform for this community to come together and connect with other tech communities in India and neighboring countries. It provides an opportunity to experience conferences like KubeCon / CloudNativeCon together with the rich cultural heritage of Sri Lanka.
A
So
what
is
it
like
to
build?
Network
Services
distributed
applications
are
complex
so
when
you're
dealing
with
a
network
errors
are
a
normal
part
of
doing
business,
especially
when
you
consider
the
eight
fallacies
of
distributed
computing
that
you
can
see
on
this
slide
to
build
Cloud
native
applications
with
Network
Services
developers
must
be
well
versed
in
the
right
tools,
programming,
languages
and
development
and
deployment
techniques.
A
A
What,
if
developers
want
to
go
beyond
the
scope
of
the
framework?
Do
developers
stick
to
these
libraries
and
Frameworks?
Nevertheless,
because
they're
familiar
with
the
underlying
programming
language
and
some
other
questions
to
ask,
are:
do
these
languages
treat
the
network
aspects
as
an
inherent
part
of
the
language
and
what
about
data
handling?
A
How
do
they
see
realize
data
on
The
Wire
to
data
in
memory,
so
I
can
safely
say
that
none
of
the
mainstream
programming
languages,
as
of
now
have
been
purposely
built
with
the
right
level
of
abstractions
to
ease
the
use
and
creation
of
Network
Services.
A
Enter
the
ballerina
programming
language,
so
the
key
goal
of
the
ballerina
language
is
to
significantly
simplify
the
creation,
integration
and
usage
of
apis
or
microservices,
be
it
rest,
graphql
or
grpc.
A
The
latest
Swan
Lake
release
comes
with
many
remarkable
features
that
will
be
appreciated
by
any
service
developer,
so
instead
of
repurposing,
existing
Technologies
ballerina
is
purposely
designed
to
build
interactions
over
the
network,
abstracting
away
the
hard
parts
and
allowing
you
to
focus
on
Core,
Business
logic,
so
I'm
going
to
talk
about
a
few
characteristics
or
offerings
of
the
Ballina
language.
That
makes
it
a
really
good
programming
language
to
program
your
services,
so
the
first
one
I
want
to
talk
about
is
the
ballerina
language
being
Network
oriented.
A
So
ballerina
has
this
concept
or
it
accommodates
the
concept
of
a
service
and
a
service
can
be
written
in
just
three
or
four
lines
of
ballerina
code
and
services
in
Ballina
are
powered
by
listeners
and
libraries,
and
so
that's
how
a
service
can
work
right
and
because
ballina's
service
approach
is
coupled
with
its
unique
wire-oriented
type
system.
A
So
you
can
actually
write
regular
balloon
service
objects
and
generate
your
client
code.
So
the
combination
of
these
features
enables
Cloud
integration
to
work
smoothly,
and
then
you
also
have
client
objects.
So,
like
you
have
service
objects,
you
also
have
client
objects
to
consume
remote
services.
A
A
And
ballerina
is
data
oriented
and
is
not
object,
oriented
in
in
network
interactions.
The
object,
oriented
approach,
bundles
data
with
the
code,
which
is
not
the
most
optimal
way
to
send
data
across
widely
distributed
networks
of
microservices
and
apis,
and
that's
why
ballerina
comes
with
a
a
network
friendly
type
system
with
powerful
features
to
handle
data
on
the
on
the
wire
ballina's
plane
in
memory.
A
A
So
Barona
also
comes
with
a
set
of
language
features
for
working
on
data
out
of
which
the
integrated
query
feature
stands
out.
So
this
feature
basically
allows
you
to
query
the
data
using
an
SQL
like
syntax
or
credits.
So,
basically,
query
Expressions
contain
a
set
of
Clauses
similar
to
SQL
to
process
the
data
and
there's
also
a
table
data
which
makes
it
easy
to
work
with
relational
and
tabular
data.
A
So
Barina
allows
you
to
do
enterprise
Enterprise
grade
development,
so
that
means
basically
to
run
Services
reliably
securely
and
safely
for
a
long
period
of
time
on
multiple
environments.
Ballerina
provides
these
capabilities.
A
So
when
you
talk
about
configurability,
ballerina
takes
the
concept
of
configurability
into
the
language,
and
that
allows
us
to
keep
the
same
program
and
move
from
one
environment
to
another
environment
without
being
explicit
about
what
the
dependencies
are.
A
And
then
you
have
transactions
writing
ballerina
programs
that
use
transactions
is
quite
straightforward,
because
transactions
are
a
language
feature.
A
Transactions
in
ballerina
also
work
really
work
well
with
the
network
interaction
features.
That
means
the
clients
and
services
to
support
distributed
transactions.
A
You
have
to
be
able
to
look
at
the
program
and
understand
if
there
is
an
error
where
an
error
could
take
place
and
how
the
flow
of
control
is
going
to
change
so
without
using
exceptions.
Ballerina
allows
the
developer
to
use
the
error
data
type
with
explicit
error
control
flow.
A
A
Then
it's
important
to
highlight
that,
while
ballerina
provides
better
ways
to
write
services,
it
also
comes
with
a
subset
of
features
that
are
familiar
to
a
programmer
of
a
c
family
language
such
as
Java,
C,
plus,
plus
or
c,
and
basically
the
the
code
is
not
something
that's
alien
to
you.
You
can
understand
how
it
works
right.
A
Foreign
ER
supports
generating
Docker
and
kubernetes
artifacts
from
code
with
simple
configurations,
and
this
simplifies
the
experience
of
developing
and
deploying
ballerina
code
in
the
cloud
to
deploy
a
code
into
different
different
Cloud
platforms
such
as
AWS
and
Microsoft.
Microsoft
Azure
annotations
on
service
objects
are
used
to
enable
easy
Cloud
deployment.
A
The
ballerina
compiler
can
generate
artifacts
such
as
Docker
files,
Docker
images,
kubernetes,
yaml
files
and
serverless
functions,
so
like
I
mentioned
before,
ballerina
has
a
graphical
aspect
to
it
via
sequence
diagrams,
so
ballerina
provides
an
intrinsic
graphical
View,
so
the
unique
graphical
view
of
ballerina
wasn't
an
afterthought.
A
It
was
in
fact
it
has
been
designed
deeply
into
the
language
in
order
to
provide
real
insight
with
respect
to
a
functions
or
services,
Network
interactions
and
their
use
of
concurrency.
A
A
So
a
function
in
a
ballerina
program
has
equivalent
representations
in
both
textual
syntax
and
as
a
sequence,
diagram.
That
means
you
can
switch
between
the
two
views
seamlessly.
A
And
in
addition
to
the
powerful
language
features,
ballerina
is
batteries
included,
which
means
that
which
means
that
the
language
comes
with
a
support
system
right,
and
that
means
that
the
language
comes
with
a
rich
standard
library,
with
libraries
for
network
data
messaging
and
communication
protocols
such
as
HTTP
HTTP,
2,
Nets,
grpc,
websub,
websocket
Etc,
and
we
have
a
package
management
system
which
allows
you
to
pull
and
push
your
ballerina
packages.
A
And
if
you
want
to
learn
more
about
the
language,
the
website
is
the
best
place
to
go.
It's
got
a
wealth
of
resources
and
documentation
to
help
you
get
started
and
with
that
I'd
like
to
conclude
my
10
minute
presentation
on
the
ballerina
programming,
language
I
hope
it
was
useful
learning
about
the
Barona
language.