Why odp.net does not implement ExecuteDbDataReaderAsync? — oracle-tech

    Forum Stats

  • 3,715,998 Users
  • 2,242,925 Discussions
  • 7,845,726 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Why odp.net does not implement ExecuteDbDataReaderAsync?

OnurGumus
OnurGumus Member Posts: 2
edited May 2019 in ODP.NET

According to Microsoft documentation for DBCommand.ExecuteDbDataReaderAsync: Providers should implement this method to provide a nondefault implementation for  overloads. The default implementation invokes the synchronous method and returns a completed task, blocking the calling thread.

However I can see OracleManagedDataAccess did not implement this in OracleCommand class. As a result  all reading calls via oracle are blocking and synchronous! I find this very odd and very counter productive in terms of performance. Is there any particular reason  this method is not overridden in OracleCommand?

Best Answer

  • Alex Keh-Oracle
    Alex Keh-Oracle Posts: 2,753 Employee
    edited May 2019 Accepted Answer

    The current async implementation, task-based, is the third .NET iteration for asynchronous programming models. Before task-based async, there was event-based pattern and the async programming model. .NET async programming patterns have been around since near the beginning of .NET FW itself. And the reason why these async models have changed over time is because there was never a popular async model until the most recent iteration.

    And therein lies the reason why ODP.NET has taken a wait and see approach. Async .NET programming is not new, but historically it had never gone mainstream.

    With that said, Oracle is working on supporting task-based async. We'll have more details during Oracle OpenWorld in September.

Answers

  • Alex Keh-Oracle
    Alex Keh-Oracle Posts: 2,753 Employee
    edited May 2019 Accepted Answer

    The current async implementation, task-based, is the third .NET iteration for asynchronous programming models. Before task-based async, there was event-based pattern and the async programming model. .NET async programming patterns have been around since near the beginning of .NET FW itself. And the reason why these async models have changed over time is because there was never a popular async model until the most recent iteration.

    And therein lies the reason why ODP.NET has taken a wait and see approach. Async .NET programming is not new, but historically it had never gone mainstream.

    With that said, Oracle is working on supporting task-based async. We'll have more details during Oracle OpenWorld in September.

  • OnurGumus
    OnurGumus Member Posts: 2
    edited May 2019

    Dear Alex,

    I disagree with your below comment:

    " Async .NET programming is not new, but historically it had never gone mainstream."

    As of now except Oracle, all database vendors that support .NET, also support proper asynchronous API.

  • Alex Keh-Oracle
    Alex Keh-Oracle Posts: 2,753 Employee
    edited May 2019

    Hi Onur,

    What I meant by that statement was that the event-based pattern and the async programming model were not popular among .NET developers and eventually abandoned by Microsoft. Vendors who devoted much effort to supporting those earlier two models had to invest yet again in async with the task-based async pattern. Oracle has approached supporting a new async pattern relatively cautiously when noting the history.

Sign In or Register to comment.