roadmap.html

来自「perl教程」· HTML 代码 · 共 388 行 · 第 1/2 页

HTML
388
字号
<?xml version="1.0" ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<!-- saved from url=(0017)http://localhost/ -->
<script language="JavaScript" src="../../displayToc.js"></script>
<script language="JavaScript" src="../../tocParas.js"></script>
<script language="JavaScript" src="../../tocTab.js"></script>
<link rel="stylesheet" type="text/css" href="../../scineplex.css">
<title>DBI::Roadmap - Planned Enhancements for the DBI</title>
<link rel="stylesheet" href="../../Active.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:" />
</head>

<body>

<script>writelinks('__top__',2);</script>
<h1><a>DBI::Roadmap - Planned Enhancements for the DBI</a></h1>
<p><a name="__index__"></a></p>

<!-- INDEX BEGIN -->

<ul>

	<li><a href="#name">NAME</a></li>
	<li><a href="#synopsis">SYNOPSIS</a></li>
	<li><a href="#scope">SCOPE</a></li>
	<li><a href="#changes_and_enhancements">CHANGES AND ENHANCEMENTS</a></li>
	<ul>

		<li><a href="#performance">Performance</a></li>
		<li><a href="#testing">Testing</a></li>
		<li><a href="#high_availability_and_load_balancing">High Availability and Load Balancing</a></li>
		<li><a href="#unicode">Unicode</a></li>
		<li><a href="#batch_statements">Batch Statements</a></li>
		<li><a href="#introspection">Introspection</a></li>
		<li><a href="#extensibility">Extensibility</a></li>
		<li><a href="#debugability">Debugability</a></li>
		<li><a href="#database_portability">Database Portability</a></li>
		<li><a href="#intellectual_property">Intellectual Property</a></li>
		<li><a href="#other_enhancements">Other Enhancements</a></li>
		<li><a href="#parrot_and_perl_6">Parrot and Perl 6</a></li>
	</ul>

	<li><a href="#priorities">PRIORITIES</a></li>
	<ul>

		<li><a href="#transition_drivers">Transition Drivers</a></li>
		<li><a href="#transition_applications">Transition Applications</a></li>
		<li><a href="#incremental_developments">Incremental Developments</a></li>
		<li><a href="#dbi_v1">DBI v1</a></li>
	</ul>

	<li><a href="#resources_and_contributions">RESOURCES AND CONTRIBUTIONS</a></li>
</ul>
<!-- INDEX END -->

<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>DBI::Roadmap - Planned Enhancements for the DBI</p>
<p>Tim Bunce - 12th November 2004</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<p>This document gives a high level overview of the future of the Perl
DBI module.</p>
<p>The DBI module is the standard database interface for Perl applications.
It is used worldwide in countless applications, in every kind of
business, and on platforms from clustered super-computers to PDAs.
Database interface drivers are available for all common databases
and many not-so-common ones.</p>
<p>The planned enhancements cover testing, performance, high availability
and load balancing, batch statements, Unicode, database portability,
and more.</p>
<p>Addressing these issues together, in coordinated way, will help
ensure maximum future functionality with minimal disruptive
(incompatible) upgrades.</p>
<p>
</p>
<hr />
<h1><a name="scope">SCOPE</a></h1>
<p>Broad categories of changes are outlined here along with some
rationale, but implementation details and minor planned enhancements
are omitted.  More details can be found in:
<a href="http://svn.perl.org/modules/dbi/trunk/ToDo">http://svn.perl.org/modules/dbi/trunk/ToDo</a></p>
<p>
</p>
<hr />
<h1><a name="changes_and_enhancements">CHANGES AND ENHANCEMENTS</a></h1>
<p>These are grouped into categories and are not listed in any particular order.</p>
<p>
</p>
<h2><a name="performance">Performance</a></h2>
<p>The DBI has always treated performance as a priority. Some parts
of the implementation, however, remain unoptimized, especially in
relation to threads.</p>
<p>* When the DBI is used with a Perl built with thread support enabled
(such as for Apache mod_perl 2, and some common Linux distributions)
it runs significantly slower. There are two reasons for this and
both can be fixed but require non-trivial changes to both the DBI
and drivers.</p>
<p>* Connection pooling in a threaded application, such as mod_perl,
is difficult because DBI handles cannot be passed between threads.
An alternative mechanism for passing connections between threads
has been defined, and an experimental connection pool module
implemented using it, but development has stalled.</p>
<p>* The majority of DBI handle creation code is implemented in Perl.
Moving most of this to C will speed up handle creation significantly.</p>
<p>* The popular <code>fetchrow_hashref()</code> method is many times slower than
fetchrow_arrayref(). It has to get the names of the columns, then
create and load a new hash each time. A $h-&gt;{FetchHashReuse} attribute
would allow the same hash to be reused each time making <code>fetchrow_hashref()</code>
about the same speed as fetchrow_arrayref().</p>
<p>* Support for asynchronous (non-blocking) DBI method calls would
enable applications to continue processing in parallel with database
activity.  This is also relevant for GUI and other event-driven
applications.  The DBI needs to define a standard interface for
this so drivers can implement it in a portable way, where possible.</p>
<p>These changes would significantly enhance the performance of the
DBI and many applications which use the DBI.</p>
<p>
</p>
<h2><a name="testing">Testing</a></h2>
<p>The DBI has a test suite. Every driver has a test suite.  Each is
limited in its scope.  The driver test suite is testing for behavior
that the driver author <em>thinks</em> the DBI specifies, but may be
subtly incorrect.  These test suites are poorly maintained because
the return on investment for a single driver is too low to provide
sufficient incentive.</p>
<p>A common test suite that can be reused by all the drivers is needed.
It would:</p>
<p>* Improve the quality of the DBI and drivers.</p>
<p>* Ensure all drivers conform to the DBI specification.  Easing the
porting of applications between databases, and the implementation
of database independent modules layered over the DBI.</p>
<p>* Improve the DBI specification by clarifying unclear issues in
order to implement test cases.</p>
<p>* Encourage expansion of the test suite as driver authors and others
will be motivated by the greater benefits of their contributions.</p>
<p>* Detect and record optional functionality that a driver has not
yet implemented.</p>
<p>* Improve the testing of DBI subclassing, DBI::PurePerl and the
various &quot;transparent&quot; drivers, such as DBD::Proxy and DBD::Multiplex,
by automatically running the test suite through them.</p>
<p>These changes would improve the quality of all applications using
the DBI.</p>
<p>
</p>
<h2><a name="high_availability_and_load_balancing">High Availability and Load Balancing</a></h2>
<p>* The DBD::Multiplex driver provides a framework to enable a wide
range of dynamic functionality, including support for high-availability,
failover, load-balancing, caching, and access to distributed data.
It is currently being enhanced but development has stalled.</p>
<p>* The DBD::Proxy module is complex and relatively inefficient because
it's trying to be a complete proxy for most DBI method calls.  For
many applications a simpler proxy architecture that operates with
a single round-trip to the server would be simpler, faster, and more
flexible.</p>
<p>New proxy client and server classes are needed, which could be
subclassed to support specific client to server transport mechanisms
(such as HTTP and Spread::Queue).  Apart from the efficiency gains,
this would also enable the use of a load-balanced pool of stateless
servers for greater scalability and reliability.</p>
<p>* The DBI currently offers no support for distributed transactions.
The most useful elements of the standard XA distributed transaction
interface standard could be included in the DBI specification.
Drivers for databases which support distributed transactions could
then be extended to support it.</p>
<p>These changes would enable new kinds of DBI applications for critical
environments.</p>
<p>
</p>
<h2><a name="unicode">Unicode</a></h2>
<p>Use of Unicode with the DBI is growing rapidly. The DBI should do
more to help drivers support Unicode and help applications work
with drivers that don't yet support Unicode directly.</p>
<p>* Define expected behavior for fetching data and binding parameters.</p>
<p>* Provide interfaces to support Unicode issues for XS and pure Perl
drivers and applications.</p>
<p>* Provide functions for applications to help diagnose inconsistencies
between byte string contents and setting of the SvUTF8 flag.</p>
<p>These changes would smooth the transition to Unicode for many
applications and drivers.</p>
<p>
</p>
<h2><a name="batch_statements">Batch Statements</a></h2>
<p>Batch statements are a sequence of SQL statements, or a stored
procedure containing a sequence of SQL statements, which can be
executed as a whole.</p>
<p>Currently the DBI has no standard interface for dealing with multiple

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?