►
Description
Did you know there are some things you should doing when writing your data driven application using Apache Cassandra? Let’s talk about that. There are features in almost every driver that will keep your application online and running fast. You should know what they are. Even if you know these features, I’m going to tell why they work and why they’re a good idea. This will not be language specific; I will be using multiple languages and drivers. This talk should appeal to programmers in general.
A
So
these
are
things
you
should
be
doing
when
using
costanzo
drivers,
regardless
of
what
programming
language
you're
using
and
now
I,
don't
seem
to
be
an
expert,
but
I
have
done.
Some
investigating
and
I
picked
out
some
important
feature
that
I
think
everyone
should
be
using
to
make
their
experience
using
the
Cassandra
drivers
a
good
one.
A
About
what
I
did
the
company
I
try
to
create
a
create
awareness
for
open
source,
Cassandra
and
I?
Do
that
by
developing
content
like
blog
post,
Orioles,
walkthroughs
and
webinars,
and
I
also
have
my
own
Twitter
account,
which
you
guys
should
definitely
check
out.
Part
of
my
job
is
also
to
step
into
the
shoes
with
movie
and
try
to
determine
what
kind
of
problems
people
just
being
introduced
to
Cassandra
might
be
encountering,
which
may
not
be
so
obvious
to
an
expert.
A
A
A
A
A
So
a
cluster
innocence
allows
you
to
configure
different
important
aspects
of
the
way,
connections
and
queries
really
handled
at
this
level.
You
can
configure
contact
point,
which
is
the
addresses
of
the
nodes
to
be
contacted
initially
before
the
driver
performs
no
discovery,
there's
also
retry
policies
and
load
balancing
policies.
A
While
the
API
the
session
is
centered
around
query
execution,
it
also
does
some
heavy
lifting
behind
the
scenes,
as
it
manages
turno
connection
rules
synth
of
the
long-lived
object.
It
should
not
be
used
in
a
short
list
fashion
with
requests
and
responses
you're
going
to
want
to
use
the
same
cluster
and
fashion
instances
across
your
application.
B
B
A
So
if
you
want
to
execute
a
statement
more
than
once,
you
should
be
used,
you
should
be
using
prepared
statements,
it's
the
better
alternative
to
having
data.
You
want
inserted
hard-coded.
It
is
part
of
a
string.
In
this
case.
Our
query
is
only
sent
over
the
server
in
the
power
Swan.
We
just
change
the
parameters
each
additional
time.
A
Let's
get
into
some
cool
as
well
as
useful
features,
you
should
be
using
to
have
the
best
programming
experience
with
Cassandra,
regardless
of
your
programming
language.
Now,
I
want
to
look
at
those
features
you
should
be
using
if
you
want
your
client
to
be
interacting
with
Cassandra
and
the
most
performant
way
possible.
These
features
should
definitely
speed
things
up
a
bit
I.
A
A
A
A
A
A
As
opposed
to
sending
your
queries
at
string,
we
which
results
in
a
large
amount
of
data
at
a
large
power,
cause
this
prepared
statement.
They
only
get
parts
on
the
server
side
once
they
are
cached
on
the
server
and
concurrent
hashmap
stored
in
memory.
The
next
time.
Only
the
parameters
and
a
prepared
statement
IDR
sent
over
the
wire.
The
md5
party
prepared
statement
is
a
key
matching,
a
value
in
a
hashmap.
A
A
Probably
was
very
obvious
to
everybody:
is
that
using
prepared
statement
of
for
loop
is
just
a
big
no-no.
This
would
cancel
out
all
the
performance
benefits
of
using
a
prepared
statement
in
the
first
place.
The
query
is
built-in
slant
again
each
time
and
thus
river
ends
up
being
bombarded
with
the
same
query
over
and
over.
This
is
probably
even
less
efficient
than
using
string
you
so
now
we're
going
to
talk
a
little
bit
about
load,
balancing
load.
Balancing
policies
are
responsible
for
routing
requests.
A
The
term
ring
which
knows
the
driver
must
connect
to,
as
well
as
the
order
in
which
different
nose
will
be
tried
in
case
of
network
failures.
Each
cluster
can
be
configured
with
a
specific,
no
balancing
policy
to
be
used
and
that
same
policy
will
be
used
for
all
requests:
the
costs
all
sessions
managed
by
the
cluster
instance.
A
A
Our
cluster
for
discussion
purposes
has
a
replication
factor
of
three
simplify
our
token
to
simplify
our
token
ranges
from
zero
to
a
hundred,
but
real
token
ranges
are
actually
much
bigger.
Each
node
is
responsible
for
one.
Fourth
of
the
token
range
clients
the
client
connects
to
the
node
listed
in
the
contact
points,
the
mid-penn
dot,
0,
dot,
0
dot.
One
is
aware
of
the
entire
cluster
and
token
layout
and
the
no
respond
with
a
list.
A
The
list
and
populates
the
populate,
the
connection
pool
and
each
token
range
stored
per
node,
including
replicas.
When
the
client
execute
the
Select
statement,
the
statement
is
parsed.
Will
this
be
with
a
consistency
level
of
one?
For
this
example,
the
primary
key
is
examined
and
the
string
are
Mills
is
hashed
using
murmur
three,
the
string,
our
meals
hashes
to
token
15.
A
A
A
A
So
the
default
behavior
used
to
be
round
robin.
This
is
change
due
to
the
fact
that
token
aware
is
much
more
performant.
It
acts
as
a
filter
around
a
child
policy,
and
only
replicas
will
be
considered
when
using
it,
so
we
won't
be
wasting
our
time
on
non
replica
knows
waiting
for
them
to
coordinate.
A
A
We
don't
have
time
to
wait.
We
don't
have
to
wait
for
a
response
from
our
cluster
to
continue
running
our
code.
Instead,
almost
immediately,
we
look
at
a
future
object,
which
is
like
a
promise.
The
future
is
a
placeholder
for
the
statement
that
was
just
executed.
I
also
want
to
mention
in
passing
that
all
asynchronous
methods
and
then
a
sink.
A
When
you
do
a
select
query
and
execute
a
sink,
the
future
that
holds
the
execute
for
you
all,
you
do.
The
future
holds
that
executes
for
you.
While
you
do
other
work,
this
execute
gets
run
on
the
server.
When
you
do
ask
the
result,
it's
in
blocks
it's
useful
of
doing
concurrent
coding
and,
if
used
properly,
it
can
be
really
fast
session.
Got
execute,
just
sits
there.
Otherwise.
A
A
The
clinic
offender
is
a
great
place
for
clothes
and
resources.
You
can
find
all
sorts
of
stuff
there,
like
blog
posts,
webinars
tutorials
and
a
whole
lot
more,
but
it's
also
a
great
place
for
all
your
driver
needs
so
once
you're
on
planet
Cassandra,
you're
going
to
want
to
go
to
the
download
section
and
into
the
client
to
drop
first
section.
I.
A
B
A
A
B
A
B
A
B
A
B
A
B
B
B
But
I
believe
that
is
a
that's
a
feature.
Elfman
right
token,
the
token
command,
I
believe
yeah.
A
B
A
B
Think
we
just
answer
that
question
so
for
good
token
ranges
maybe
put
it
for
the
individual
servers
as
well.
So
actually
I
have
a
more
advanced
answer
that
you
look
at
the
system's
table
in
Cassandra.
The
token
ranges
are
in
there,
so
that's
more
secret.
So
what
is
the
best
practice
for
writing?
In
batches
Oh
someone's
been
watching
my
Twitter
stream
I.
B
B
And
then
that's
kind
of
near
and
dear
to
my
heart
right,
because
I
actually
just
filed
a
jira
on
friday
too.
Well,
there's
a
warning
jura
for
large
batches.
Now,
there's
a
drought
for
failing
on
large
batches
bachelors
are
a
pretty
much.
A
large
batches
are
an
anti-pattern
right.
B
Yeah
I
would
like
to
say
that
reserved
for
atomicity
and
not
an
optimization,
do
not
do
use
large
batches.
Are
you
going
to
hit
my
own
personal,
pet,
peeve
Bachelet?
If
I
see
you
large
batches
going
into
the
system,
I
I
could
I
don't
get
on
you
about
it
next
question.
Could
I
see
an
example?
One
more
time
of
the
future
results
that
array
for
execute
in
a
sink
I.
Think
you're
going
to
have
your
slides
online
yeah.
B
A
B
B
Route
will
rubies
are
promises,
yeah,
so
I
think
I
think
it
would
be
natural.
The
thing
to
assume
that
spells
future
classes
would
map
as
well.
Here's
an
easy
one
for
me:
can
we
get
this
recording
sure
we'll
be
putting
it
online
soon?
Just
watch
Rebecca's,
a
washer
or
Twitter
and
she'll
be
posting.
Whenever
this
is
online
or
planets
Sandra
we
do
post
our
webinars
out,
probably
two
or
three
days
after
we're
done.
It'll.
A
A
A
A
B
B
More
efficient
because
a
good
measurement
be
good.
Can
you
query
the
local
table
I'm,
not
sure
what
that
means.
We
vocal
table,
maybe
system
table.
B
A
There's
also
downgrading
consistency,
level,
retry
policy,
where,
if
you
have
trouble
connecting
such
that,
you
can't
get
meet
your
consistent
level
requirements
it'll
actually
down
that
take
to
bring
the
consistency
level
down
such
that
on
your
next
reach.
How
you
look
at
a
response,
but
you
won't
be
reaching
the
consistency
level
you
would
set
so.
A
B
B
B
Sort
yeah
so
so
air
gap
so
to
confirm
the
load.
Balancing
the
client
can
be
aware,
which
knows,
are
the
primary
replica
notes
so
that
you
can
skip
the
notes
that
don't
hold
data
if
the
ring
is
out
of
whack
and
needs
to
be
repaired,
you'd
have
to
scan
the
entire
ring
big
questions.
Let's
break
this
dish.
A
B
A
B
Then,
though,
this
is,
if
the
rings
out
of
whack
it
needs
to
be
repaired,
you'd
have
to
scan
each
high
rank,
I
mean
I,
don't
think
that
doesn't
really
matter
in
this
case,
I
mean
your
data
from
there
because
it
needs
to
be
repaired.
That's
not
going
to
be
that's
not
going
to
be
in
a
table,
though,
we're
not
going
to
see
like
repair
status
and
a
connection
pool
lottery.
No.
B
A
B
It
seriously
is
the
default
threshold
for
warning
on
batch
sizes.
5K,
it's
a
little
sighs,
don't
do
large
batches
batches
as
an
old
relational
guy.
I
can
tell
you
I
used
to
use
a
lot
of
asset
there,
because
it
makes
sense
because
it
was
on
a
single
server,
don't
use
large
batches
and
cassandra,
because
what
you're
doing
is
you're
essentially
turning
the
coordinator
node
into
a
big
load
balancer
and
it
just
is
very
inefficient.
You're
better
using
I
mean
there's
our
buddy
right,
execute
a
sink
right.
B
Through
all
the
different
keys
and
just
executed
a
thin
protocols,
very
nice
fat
and
it's
much
more
efficient,
alright
batches
are
my
pet
peeve
and
what
can
be
considered
a
large
batch
I
just
said
that
I
mean
that
was
5k
in
total
size
is
where
you
start
seeing
warnings
in
the
log.
You
know
fight
these
batches
of
more
than
100,
then
I
guess
start
getting
nervous.
Like
a
hundred
statement.
It's
just
not
efficient
you're,
better
off
doing
what
like
one
prepared
statement
right,
we.
A
B
A
B
A
B
B
A
B
A
B
A
B
A
B
A
B
A
B
A
B
B
Again
system
table
is
completely
open
to
speak.
You
out,
you
can
do
a
select
office
system
tables
mm-hmm.
So
in
regards
to
the
nodejs
driver,
the
current
one
dot
0
beta
drivers
not
backward
compatible
with
12
I
noticed
the
docs
backward
compatible.
Slider
window
and
I
saw
that
to
do
comments
in
the
code
was
the
roadmap
on
releasing
one
dot.
Oh
good,
you
know,
I
haven't.
B
A
B
A
B
So
it's
just
a
different
backward
compatibility
for
the
binary
protocol,
but
I
it.
It
is
coming
pretty
quick
and
you
could
probably
pose
a
question
inside
the
JIRA
to
do
or
there's
the
github
issues.
If
you
were
looking
for
it
exact
date,
but
I
know
it
is
moving
rather
quickly.
I've
talked
with
that
team.
Quite
a
bit,
they're
very
excited
about
that
driver
and
there's
a
lot
of
excitement
around
ojs
yeah.
B
A
B
Fast,
so
what
are
the
difference
between
cql
based
drivers
and
thrift
based
API
is
over
here
we
go
see
two
elders
of
thrift.
How
do
we
determine
which
one
should
be
used
in
what
scenario?
So
when.
B
B
B
B
I
think
it
really
is
all
about
the
feature
set.
Yes,.
B
A
B
Query:
the
system,
local
cable,
obtaining
token,
sorry
hope
that
makes
sense.
No
Jeff,
you
make
no
sense
at
all
I'm
kidding,
yeah,
so
I,
trying
to
parse
out
why
you're
doing
this
connected
to
the
cluster.
True,
who
knows,
create
new
connections
each
cluster
you're
still
connecting
one
cluster
you're
not
going
to
find
in
may
be
that
your
looks
like
you
might
be.
Switching
cluster
and
knows
is
that
terminology
a
cluster
is
going
to
be
all
the
nodes
in
your
system
even
across
multiple
data
centers.
A
B
B
B
B
A
B
Should
that
we
cassander
1
dot,
3
I,
don't
think
so
we
have
to
it.
There
is
going
to
be
no
13
at
30.
There's
a
13
secure
protocol.
Maybe
okay,
there.
It
is.
He
dead,
basically,
problems
between
one
dot,
three
binary
protocol
on
a
2
0
briner.
Yes,
of
course,
that
that's
what
we
were
mentioning
earlier
is
that
we
there
are
different
binary
protocols
that,
from
when
we
went
from
12
to
1
20
mm-hmm.
A
B
Ability
issues
can
a
think
API
be
used
with
the.net
framework,
40
or
higher
versions.
You
know
much
about
that
particular
angle
and
tushar
baird.
We
need
to.
B
Of
I'm
going
to
ask
you
to
do
me
a
favor
here
we
so
one
of
the
evangelists
on
our
team
name
is
Luke.
Tillman
he's
on
Twitter
I.
Think
you'd
probably
be
the
best
person
to
ask
for
that.
These
are
he
worked
a
lot
with
C
sharp
edge?
He
works
with
Windows
Azure.
He
will
be
able
to
answer
that
question
hit
him
up
on
Twitter
only
said
hi,
but
I
think
that
he
would
probably
be
the
best
person
to
answer
that
gave.
A
A
B
B
A
Consistency:
okay,.
A
B
A
A
B
B
B
That's
actually
pretty
new,
so
Tomas.
If
you
look
on
github,
there's
a
there's,
a
a
user
called
data,
stacked
examples
check
that
out.
There's
a
lot
of
good
code
they're
actually
for
everybody
on
this
I'll
call
that
I
think
there
was
actually
a
directly
a
paging
example
and
how
to
do
paging
with
and
again
that's
what
version
tru
dot.
Oh
right.
A
B
B
A
B
He
is
that
used
to
use
a
will,
look
at
the
policy
default
or
something
like
that
at
what
point
does
a
parallel
do
parallel
statements
performs
that
are
in
in
the
in
clause?
I
mean
that
time,
let
me
and
did
there
a
limit
on
how
many
key
should
put
any
in
clause
I
mean
so
basically
I
I
think
the
first
question
is:
are
there?
Are
there
parallel
statements
and
in
clause
no.
A
B
Yet
it
in
clauses
are,
are
you
do
not
get
parsed
by
the
driver
as
actually
was
it
I
think
it
was
a
feature
request,
but
as
of
now,
they
don't
get
parsed
on
it
on
the
client
driver,
so
that
just
gets
sent
to
the
coordinator
and
then
the
coordinators,
it's
up
to
the
coordinator
to
deal
with
it
and
what's
the
limit
now,
there's
a
trivia
question:
what
is
the
limit?
I
think
I've
heard
this
writing
at
64,000.
A
B
You
can
the
most
you
can
put
into
it,
but
it's
one
of
those
practical
limits,
I
think
Jeffrey,
that
if
you
are
putting
in
a
lot
of
values
in
your
in-laws
you're
going
to
see
a
performance
hit,
it's
just
like
doing
a
large
batch.
It's
going
to
hurt
bust
up
I.
Actually
you
know
we
were
just
talking
about
this.
Instead
of
using
an
in-use,
prepares
to
payment
and
execute
a
salute,
yeah.
A
B
A
A
B
A
B
A
B
B
So,
okay
bachelors
the
5,000
5,000
level,
refer
to
the
data
size
or
number
two
is
sighs
its
its
size.
So
when
we're
talking
55
k
that
total
size
of
the
bachelor
self,
so
if
you
had
three
statements
that
were
really
big
then
and
they
go
over,
5k
is
really
a
matter
of
managing
him
out.
Jdm
feat
that
you're
throwing
at
this
thing
it's
a
warning:
it's
not
going
to
stop
it,
but
it's
just.
B
A
B
That
so
I
don't
it.
You
know,
I
hear
this
question
sometimes
from
Oracle
developers,
and
this
is
something
that
I
am
near
and
dear
to
my
heart,
with
Oracle
you
had
so
much
setup
costs
and
every
connection
that
you
know
you
would
connect
to
it.
It
would
take
forever
to
log
in
get
all
the
stuff
that
just
doesn't
exist
in
Cassandra.
B
A
B
Will
get
help
you
down
there
yeah
it's
more
of
a
probably
of
more
of
a
server
consideration?
Okay!
Well,
I
think
this
wraps
it
up.
Thank
you
for
all
the
really
interesting
questions.
Again,
you
know
check
out
planet,
Cassandra,
dot,
org
and
the
try
Cassandra
and
look
at
the
client
drivers
pages.
There's
a
lot
of
tutorials
on
their
questions.
You
can
always
go
to
stack
overflow,
we're
always
there
Twitter
they
def
Rebecca
myself.
B
We
mentioned
we
threw
Luke
in
there
Luke
Tillman
and
if
you
want
to
do
some
free
training
and
I
also
recommend
that
Academy
datastax
calm
good
for
you
good
for
me,
and
it
is
one
hundred
percent
free,
and
that
is
a
good
thing
for
your
career.
Believe
me,
we've
been
doing
a
lot
of
work
on
that
lately,
so
please
got
something
there
for
you.
Thank
you
very
much
and
we'll
see
you
at
the
next
webinar.