BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Oracle Data Provider for .Net: Asynchronous Programming, OpenTelemetry, and More

Oracle Data Provider for .Net: Asynchronous Programming, OpenTelemetry, and More

Oracle pre-released a new version of Oracle Data Provider for .NET (ODP.NET), its ADO.NET data access library for the Oracle database. The new version, 23c, is available as a Developer Release, which means it is still not ready for production use. However, it already brings two of the most highly community-requested features: asynchronous programming and support for OpenTelemetry.

With the new version of the ODP.NET library, .NET developers can use .NET task-based asynchronous programming (TAP) model to execute data access operations asynchronously using the async and await keywords. As a result, database operations are executed asynchronously, and the caller thread is not blocked, leaving it free to serve other requests and consequently increasing scalability. Below is an example of the new asynchronous methods:

using (var connection = new OracleConnection(connectionString))
{
  await connection.OpenAsync(CancellationToken.None);

  using (var cmd = connection.CreateCommand())
  {
    cmd.CommandText = "select * from documents";

    var reader = await cmd.ExecuteReaderAsync();
  }
}

The TAP model is compatible with Oracle Database 19c or higher.

The new release also includes support for OpenTelemetry, an open-source observability framework for instrumenting, generating, collecting, and exporting telemetry data. This makes monitoring and analyzing ODP.NET operations easier in cloud computing environments, distributed systems, and microservices. Developers can use the ODP.NET OpenTelemetry NuGet package to customize the ODP.NET metrics collected.

In addition to these features, .NET developers can now use ODP.NET Application Continuity (AC) for end-to-end high availability in case of planned or unplanned outages. In the case of downtime, in-flight database sessions are recovered without any work disruption. AC is enabled by default when connecting to Oracle Database 19c or higher.

ODP.NET 23c also supports the new features introduced in Oracle Database 23c. Among these features are JSON Relational Duality, a feature that allows access to relational data stored as JSON documents, boolean data type columns, SQL domains - a dictionary object that belongs to a schema and encapsulates a set of optional properties and constraints for common values, and database annotations for storing and retrieving metadata about database objects centrally.

In addition to these features, many improvements related to usage in cloud environments are planned for the final release of the library, such as centralized configuration providers and new single sign-on capabilities.

ODP.NET 23c can retrieve application configuration data (such as connection strings and tuning data) from a centralized, secure location, making configuration management simpler and more flexible. It will be possible to store the configuration data in Microsoft Azure using Azure App Configuration and Azure Key Vault, in Oracle Cloud Infrastructure (OCI) via OCI Object Storage and OCI Vault, or on the local file system as a JSON configuration file.

The final release will also support single sign-on with Microsoft Entra ID or Oracle Identity and Access Management service. Single sign-on makes user and account management easier for administrators and end users.

More details about the new library version can be found in the ODP.NET 23c Developer’s Guide. .NET developers can try the newly available features and share their feedback on Oracle Forums.

About the Author

Rate this Article

Adoption
Style

BT