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 for Converge360.

comments powered by Disqus


  • Creating a Progressive Web App with Blazor WebAssembly

    Not surprisingly, it's dead easy to create an app in Blazor that runs outside of the browser window and (potentially) in an offline mode. Before you get carried away, though, there are some key design decisions to make.

  • GitLab Takes Over VS Code Extension, Plans Improvements

    DevOps specialist GitLab has officially taken over the control of a GitLab extension for Microsoft's open source, cross-platform Visual Studio Code editor.

  • VS Code Python Tool Now Does Native Notebooks

    The Python Extension for VS Code Insiders team is previewing the newest implementation of notebooks, used frequently in data science with offerings such as Jupyter Notebooks.

  • As .NET 5 Nears, Content/Documentation Reorganization Starts

    A GitHub project is seeking to reorganize documentation and developer content in advance of the November debut of .NET 5, a unification of all things .NET that combines. .NET Core and other components.

  • Windows Devs Get Cross-Platform Page, Issues Repo

    Developers doing their coding on the Windows OS have received two new resource gifts from Microsoft: a new landing page for those using cross-platform technologies and a new GitHub repo with which to report issues to Windows engineering teams.Developers doing their coding on the Windows OS have received two new resource gifts from Microsoft: a new landing page for those using cross-platform technologies and a new GitHub repo with which to report issues to Windows engineering teams.

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.

Upcoming Events