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

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube