Skip to content

RFC: Standardized Event-Loop Agnostic Asynchronous Specification for DBI vNext #183

Description

@cjac

RFC: Standardized Event-Loop Agnostic Asynchronous Specification for DBI

Proposal

We are proposing an event-loop-agnostic asynchronous interface for the core DBI specification. This work continues the request in GitHub Issue #52 .

The goal is to unify driver-specific async behaviors (such as those in DBD::Pg and DBD::mysql ) under an interface that allows drivers to support non-blocking I/O while letting the application's event loop manage the file descriptors. This lays the groundwork for implementing drivers for databases such as Spanner and BigQuery.

Technical Design Document

The technical specification is maintained in this Google Doc to track reviewer comments:

Asynchronous DBI Specification Proposal

Please review and add comments directly to the document.

Implementation Plan

To validate this design, we plan to develop a prototype implementation including:

  • Specification stubs and documentation in lib/DBI.pm
  • XS dispatch routing bindings in DBI.xs and Driver.xst
  • A mock driver test suite to verify the watcher registration lifecycle (t/mock_async.t )

We welcome feedback from the core maintainers and driver authors on this approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions