>> Hey friends, it's Azure Friday.
I'm here with Caron and we're going to talk a little
bit more about Azure Cosmos DB,
some of the exciting new features
like Cassandra Support. How's it going?
>> Awesome. It's always such a pleasure
to be here. Thank you for having me.
And today is especially
exciting because at the end of the year,
lots of good things came out,
as we announced just
a couple of weeks ago, and one of them
was availability of Cassandra API on Cosmos DB.
So as many of you know,
Cosmos DB is
a globally distributed database with multi-model support.
So, it allows you to work with multiple different things.
For example with documents using CQL or MongoDB API,
with graphs using Gremlin API,
working with key value APIs using Azure Table API,
and now it offers you Cassandra API.
And support for Cassandra API is a protocol level,
so you can take your existing app or existing tool set
that you use with Cassandra and just redirect it,
point it at Cosmos DB
and they will not know the difference.
>> So, Cassandra is an open source database that
people run on Linux PMs on their own?
>> Yep, good point.
It's a very popular,
a very cool open source database
for high scale real-time data scenarios,
which is what we're especially excited about because
it's exactly what Cosmos DB is for as well.
So we love Cassandra.
The main thing, it's an open source database,
so if you run it, you have to run it and manage it,
and it's usually used
for high skill scenarios where
you're managing large clusters.
It's a non-trivial investment of DevOps of your time,
and it's a pretty complicated thing to configure.
So, we just tried to help and make a spin out of.
>> Couldn't Azure have made
a Cassandra database as a service?
>> Good question. Yes, we had two options.
We could take Cassandra open source
and run it as a service,
just like we do RADIUS as a service in
Azure and it's a good approach.
The challenge of this approach is that,
not really a challenge,
but we thought that we could do better,
and by better meaning that
we are not saying that we can do,
what I'd better called an
open source community,
the open source community got phenomenal code,
but we can do services that are more optimized for Azure.
And we have been investing in
a particular service called Azure Cosmos DB
that brings you global distribution,
that brings you multiple consistency,
intuitive consistency choices,
it brings you super low latency,
high scale, and it's a managed service on Azure.
Optimized for Azure platform.
It's aware of the fact that it runs on Azure,
as opposed to Cassandra that is written as a Linux.
Database runs on Linux, it doesn't know-
>> It runs in a VM,
it doesn't care if it's in the cloud.
That means that you're going to get all of
the benefits of what's good about
Cassandra and all of the benefits
of being in Azure and knowing you're in Azure?
>> Yes. That is our goal with this.
So let's do a quick demo.
So you can create a Cosmos DB with Cassandra API by
just going and clicking
"Create" and choosing a Cassandra API.
I have already created one because it
takes a few seconds,
close to a minute to create an account.
So I have created this one and it's
an empty account, as we can see, it doesn't have anything.
We open data explorer, there are no Cassandra tables.
You have a nice "Quick start".
I'm pretty proud of the "Quick start."
It speeds up, it answers you a lot of questions.
Many people use them and
we use the same technique for Cassandra API.
So what I'm going to do is,
I'm going to communicate to this database using
"Cassandra CQL Shell" that's
a command line utility that's
very common among Cassandra developers.
It allows them to do
data management separations and
serve data all from command line.
>> And this shell doesn't know about Azure?
>> Absolutely.
>> It doesn't know that it's not talking to Cassandra.
>> Exactly.
>> Because it is, it's talking to Cassandra on Cosmos.
>> Let's see what it will do.
So let's copy this line. Let's go.
So here I'm running Python and I'm
running cqlsh.py which is a CQL Shell-.
>> So CQL Shell is a Python app?
>> It's a Python app. And this will
connect CQL Shell to
Cosmos DB account with Cassandra API.
And again, it seems that it's connected to
a broad cluster at some hostname. That's all it knows.
>> It says write there, Native Protocol v4.
For all it knows, it's talking to Cassandra.
>> Yep. So let's do a few CQL.
CQL is Cassandra query language,
very similar to SQL.
I think it's a subset of SQL with few additional.
So what are we going to do is we're going to create
a key space equivalent of a database,
create a key space.
We'll create a table in that key space and we'll
insert few empty points.
The fact is the videos that we're recording today.
We can just copy paste this and in
CQL Shell we'll insert them one by one.
And again, it doesn't know anything about Cosmos DB,
it just keeps executing
Cassandra query language commands.
>> Is Cassandra a more SQL like or more Mongo like?
>> It's neither.
It's effectively a white column Family Database.
So it's good at operating with the flat rows,
you can have as many columns as you like.
It's similar to SQL in the sense the that the schema,
it's not a schemaless database,
it has a schema, so tables have schemas.
And ironically, Cosmos DB
in this case serves you the schema,
but the only thing is you can change it
anytime in the back.
The other thing is that we index everything
so you don't have to worry about indexing.
It doesn't really matter what I
specify here has to be indexed,
everything will get indexed.
So let's go back to our Data Explorer.
As we can see now we have created
Azure Friday key space and videos collection
and now if we click on rows,
we should see the rows that gets inserted by CQL Shell.
So this kind of completes the round trip,
so you can work with if you
prefer the graphic UI interface,
you are welcome to work with
your Cassandra from the Portal.
We offer you a reasonable nice data explorer
or you can work with your existing tools that you love
and you can take any app and redirect
just like we redirect to CQL Shell.
You can redirect an app at
Cosmos DB just by changing your connections.
>> Sometimes with these databases
like Mongo as an example,
there are Niche or more obscure features.
So when you initially came out with
your Mongo support you
supported like 80 percent of what Mongo supports.
How does that work in the Cassandra space?
Could I plug my Cassandra app in and
find out that maybe there's a feature
that you don't support?
>> Definitely. Right now we're in preview.
So we don't support
certain data types which we are adding.
There are certain constructs of
SQL language that we don't map to.
But the good news is that we've done
a pretty thorough analysis of
Cassandra API and there
is nothing that we cannot support.
In some sense it's actually easier than Mongo,
because Mongo is a very sophisticated data model,
the lots of features and tools.
Mongo always focused on making it developer friendly.
As a result, they satisfied as many OSC's as possible.
>> All right. They did everything.
>> With Cassandra it's optimized for
Path which we are already pretty good at,
the data model is much simpler.
>> Cool. So it sounds like
people should be using this in preview now,
trying it out and seeing if their Cassandra apps
work great and seeing
what the performance characteristics are.
>>Yep, and we'll keep working on it and then
in some time we'll deliver 100 percent.
>> That's fantastic and it sounds like you're
pretty excited about the compatibly that you have today.
>> Yes. It's a preview.
It's just like when we went with Mongo,
80 percent is probably an accurate number.
>> Yes, that's great. And so it's in preview now.
People can try it out and then as
you start to have more confidence in it,
you'll eventually GA, it's will to be available forever.
Fantastic. All right.
I'm learning all about how you can do
the Cassandra database on
top of Azure Cosmos DB with the new Cassandra DB APIs,
here on Azure Friday.