>> Hey friends, you know
I love me some .NET,
and Azure Cosmos DB
just recently released
version 3.0 of the.NET
SDK for Cosmos DB.
What's awesome with this release?
It's now open source on GitHub,
and Kirill as always
is back once again to
show us what's new in this
SDK today on Azure Friday.
[MUSIC]
>> Hi, I'm Scott Hanselman
and it's Azure Friday,
and with me always
is Kirill Gavrylyuk.
You've even on the show
like 50 times,
you're like my favorite Azure Friday
guest because you always bring
me great stuff with Cosmos
DB. How are you, sir?
>> Thank you so much, Scott.
I'm great and it's so
great to be here again.
Now, I have something I'm
really excited about.
I've been pushing forward for
it and working on it slowly.
But for the last year or so,
it's a new.NET SDK
that we just released.
It has a bunch of
interesting updates.
The first one, it is open source.
It's right there on GitHub,
you can go submit "Pull Request"
and number of you already did.
We are pretty active on it,
so you can see what we're up to,
and what we are not up to,
and help us course-correct as needed.
>> That's great.
>> Now, there's a number
of improvements.
First is something that
is a passion of mine.
Some of us believe in love
at first sight, right?
We also know how painful
it can go the other way.
The additional Cosmos DB
SDK performance was good.
But it was a little bit cumbersome,
so we removed a lot of third from it.
On the right-hand side, you don't
have to deal with URIFactory,
you don't have to do
those a lot of stuff.
So a lot more intuitive,
simpler programming one.
>> That's interesting. So it
sounds like you've learned a lot,
you did a lot of things
before where you were calling
the client with a weight not
sending anything back
out the other way.
Here, you're doing a little
bit more idiomatic.NET
with these objects that
build on top of each other.
As they move forward,
you create a client,
create the database from
that client, create a container.
This, on the right, feels more
intuitive and more idiomatic.
>> Exactly. Number of
simple things like you don't
have to pass any more.
Three things was
every API call: the client,
and the database name,
and container name.
>> Well, another thing
to look at if you
point out your magic strings.
You've got the word "school" once
and the word "students" once,
while on the left you've had
to use it three to four times.
>> Exactly.
>> That's great example.
>> So simple, lots of
simple things that makes
a life of developer better,
make it a bit better
friendly experience.
>> I love that you did that.
>> Thank you. Second is we now
support officially.NET Core 2.0.
This is our new NuGet package,
Microsoft.Azure.Cosmos,
and this is ASP.NET Core 2.1 app.
You can use it, tag is 2.0.
>> Because this is using.NET
Standard and then uses all over.
>> Yeah,.NET Standard tool. You
can use it in.NET Core apps,
you can use in.NET Framework.
It is.NET Standard tool library.
It has a little bit
easy idiomatic way.
As you notice, we have
a hierarchy now each classes.
So, it's a little easier to work with
it if you use DI, for example.
You don't have to pass
a large flat clients
that had up to 90 methods.
It's a lot more testable.
So instead of overwriting
90-plus methods,
now you can work with
a lot more granular classes,
a lot more, and overwrite which
in work with what you need.
>> Uh-huh. Yeah. It feels
like a modern.NET SDK.
>> Exactly.
>> That's great.
>> That was all are we intend.
>> Look how much you've done in just
a few lines of code here to get
ready for this application
to be able to use Cosmos.
>> Yeah. Around stability,
a lot of improvements
in the stability.
For example, all the in
and outs are now unsealed,
it's easy to overwrite,
easy to work with.
It's also a lot faster SDK.
>> Really?
>> Yeah. Including not only
SDK itself a lot faster,
but more efficient handling
of exceptions.
But we made it easy for you to
build faster applications with it.
A good example is if we
go to my controller here,
let's say you want to
page through a query.
>> Uh-huh.
>> What you used to have to do
is you have to do send a query.
We would deserialize the results,
then serialize the results.
Ton of do, ton of stuff
for no good reason.
We didn't really want to
even look into this data,
we just wanted to pass it out, right?
Now, as you would expect,
we allow you to work with Streams.
You pass a continuation token,
we pass it and gets
the next page back,
and you just assign the Stream from
the response of the SDK.
There is a responsiveness.
>> That is really,
really interesting.
There are a lot of times when we find
ourselves getting
information from a database.
But in this case, Cosmos DB,
a world-scale database,
they can return JSON.
We don't always want unnecessarily
deserialize it, look at it,
hold it there in a moment
in a buffer in memory,
serialize it again, and
put it out the wire.
You're letting that left hand,
right hand become much, much simpler.
If I want to inspect it
and deserialize it, I can.
But if I don't need to,
I just pass it along
and it makes the REST API
that much cleaner.
>> Exactly. That's have been always
very frequent question
from our customers,
who care about performance,
and we are about selling performance.
>> Uh-huh.
>> Cosmos DB is database for
performance applications.
Lots of updates. Please do
take a look at our docs.
For example, a lot
better extensibility.
We have now middleware in the SDK.
You can walk the entire network.
You can add your own things like
overwrite your user agents,
do a lot of other things, party
on the requests and responses.
To learn more about it,
take a look at our docs.
A ton of things added.
If you don't like something or
if you think we miss something,
GitHub or UserVoice
are two places where
we watch constantly and try
to improve as fast as we can.
>> So this is up on NuGet,
I can use it right away.
It's.NET Standard 2.0, which
means I can use it everywhere,
on a website, in Azure,
on a Yammer in device.
>> Yeah.
>> Wherever makes me happy,
and you're actively developing it.
So like you said, "You listen to
issues real humans
that are interested."
You can get involved in open source,
what a great way to get started
with the Cosmos DB SDK.
>> Exactly. General
availability is by summer.
So, there's still a ton of
runway for us to tweaks the OM.
Please do submit requests to us.
Please do help us make it
the best SDK possible.
>> Fantastic. I am learning
all about the new version 3.0
of the.NET SDK for Cosmos
DB today on Azure Friday.
[MUSIC]
