News

What's New for Azure Cosmos DB SDKs for .NET and Java

Azure Cosmos DB is a globally distributed, multi-model database service, helping users and developers elastically and independently scale throughput and storage across Azure regions with a click of a button. These resources can be elastically scaled to leverage fast, single-digit-millisecond data access via popular APIs including SQL, MongoDB, Cassandra, Tables, or Gremlin.

Microsoft has recently beefed up associated SDKs for Azure Cosmos DB. Here's a look at a couple such enhancements enacted within the last month.

Azure Cosmos DB
[Click on image for larger view.] Azure Cosmos DB (source: Microsoft).

Azure Cosmos DB .NET Standard SDK for SQL API (.NET SDK)
This was updated just last week, to version 3.8.0 (preview). That update entailed improving the bulk support introduced last November. At the time, an associated blog post explained that "bulk" had to do strictly with throughput, not latency. Examples of bulky scenarios include:

  • A nightly dump of 2 million records into a Cosmos DB container
  • Processing a stream of data that batched into 100,000 items that need updating
  • Dynamically generating groups of operations that execute concurrently

Last week's update to v3.8 added a congestion control component, helping out with the tool's functionality dealing with concurrent operations, partition affinity, multiple parallel requests and other technical details.

Just one upshot of this improvement is:

This change means that we are increasing the data flow from the client and reactively decreasing it if the provisioned throughput is not enough. Early performance numbers show an increase in throughput after this change. For example, in a container provisioned with 300,000 RU/s, we are now able to insert 4.8 million documents in 2 minutes versus 4.3 million before (almost 20% more on the same time).

You can dig into all those underlying technical details here.

Azure Cosmos DB Java SDK for SQL API (Java SDK)
Microsoft last month announced that the general availability of Java SDK 4.0 is coming soon and published a couple blog posts on the new offering along with other guidance including:

  • A Quickstart Guide for managing databases, containers and items
  • Additional Sample Code for indexing, stored procedures and Change Feed

A couple weeks later, another blog post detailed the SDK's new Async API.

"Current users of our Java SDK v2 are familiar with our Sync API and may have tried our Java SDK v3 with mixed results," Microsoft said. "We are really excited about our new Java SDK v4 because the performance is much better than our v3 SDK but also because the Java SDK v4 implements both an Async API and Sync API."

The Async API works with Reactive Programming, specifically the Reactor framework to describe an application's logic.

For those who prefer not to mess with the Reactor patterns, the Sync API can be simpler to understand and easier to follow, Microsoft said.

More information can be found in:

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

  • TypeScript Tops New JetBrains 'Language Promise Index'

    In its latest annual developer ecosystem report, JetBrains introduced a new "Language Promise Index" topped by Microsoft's TypeScript programming language.

Subscribe on YouTube