📄 roadmap.3
字号:
flexible..PPNew proxy client and server classes are needed, which could besubclassed to support specific client to server transport mechanisms(such as \s-1HTTP\s0 and Spread::Queue). Apart from the efficiency gains,this would also enable the use of a load-balanced pool of statelessservers for greater scalability and reliability..PP* The \s-1DBI\s0 currently offers no support for distributed transactions.The most useful elements of the standard \s-1XA\s0 distributed transactioninterface standard could be included in the \s-1DBI\s0 specification.Drivers for databases which support distributed transactions couldthen be extended to support it..PPThese changes would enable new kinds of \s-1DBI\s0 applications for criticalenvironments..Sh "Unicode".IX Subsection "Unicode"Use of Unicode with the \s-1DBI\s0 is growing rapidly. The \s-1DBI\s0 should domore to help drivers support Unicode and help applications workwith drivers that don't yet support Unicode directly..PP* Define expected behavior for fetching data and binding parameters..PP* Provide interfaces to support Unicode issues for \s-1XS\s0 and pure Perldrivers and applications..PP* Provide functions for applications to help diagnose inconsistenciesbetween byte string contents and setting of the SvUTF8 flag..PPThese changes would smooth the transition to Unicode for manyapplications and drivers..Sh "Batch Statements".IX Subsection "Batch Statements"Batch statements are a sequence of \s-1SQL\s0 statements, or a storedprocedure containing a sequence of \s-1SQL\s0 statements, which can beexecuted as a whole..PPCurrently the \s-1DBI\s0 has no standard interface for dealing with multipleresults from batch statements. After considerable discussion, aninterface design has been agreed upon with driver authors, but hasnot yet been implemented..PPThese changes would enable greater application portability betweendatabases, and greater performance for databases that directlysupport batch statements..Sh "Introspection".IX Subsection "Introspection"* The methods of the \s-1DBI\s0 \s-1API\s0 are installed dynamically when the \s-1DBI\s0is loaded. The data structure used to define the methods and theirdispatch behavior should be made part of the \s-1DBI\s0 \s-1API\s0. This wouldenable more flexible and correct behavior by modules subclassingthe \s-1DBI\s0 and by dynamic drivers such as DBD::Proxy and DBD::Multiplex..PP* Handle attribute information should also be made available, forthe same reasons..PP* Currently is it not possible to discover all the child statementhandles that belong to a database handle (or all database handlesthat belong to a driver handle). This makes certain tasks moredifficult, especially some debugging scenarios. A cache of weakreferences to child handles would solve the problem without creatingreference loops..PP* It is often useful to know which handle attributes have beenchanged since the handle was created (e.g., in mod_perl where ahandle needs to be reset or cloned). This will become more importantas developers start exploring use of the newly added\&\f(CW$h1\fR\->swap_inner_handle($h2) method..PPThese changes would simplify and improve the stability of manyadvanced uses of the \s-1DBI\s0..Sh "Extensibility".IX Subsection "Extensibility"The \s-1DBI\s0 can be extended in three main dimensions: subclassing the\&\s-1DBI\s0, subclassing a driver, and callback hooks. Each has differentpros and cons, each is applicable in different situations, andall need enhancing..PP* Subclassing the \s-1DBI\s0 is functional but not well defined and somekey elements are incomplete, particularly the DbTypeSubclass mechanism(that automatically subclasses to a class tree according to thetype of database being used). It also needs more thorough testing..PP* Subclassing a driver is undocumented, poorly tested and veryprobably incomplete. However it's a powerful way to embed certainkinds of functionality 'below' applications while avoiding some ofthe side-effects of subclassing the \s-1DBI\s0 (especially in relation toerror handling)..PP* Callbacks are currently limited to error handling (the HandleErrorand HandleSetError attributes). Providing callback hooks for moreevents, such as a row being fetched, would enable utility modules,for example, to modify the behavior of a handle independent of anysubclassing in use..PPThese changes would enable cleaner and more powerful integrationbetween applications, layered modules, and the \s-1DBI\s0..Sh "Debugability".IX Subsection "Debugability"* Enabling \s-1DBI\s0 trace output at a high level of detail causes a largevolume of output, much of it probably unrelated to the problem beinginvestigated. Trace output should be controlled by the new named-topicmechanism instead of just the trace level..PP* Calls to \s-1XS\s0 functions (such as many \s-1DBI\s0 and driver methods) don'tnormally appear in the call stack. Optionally enabling that wouldenable more useful diagnostics to be produced..PP* Integration with the Perl debugger would make it simpler to performactions on a per-handle basis (such as breakpoint on execute,breakpoint on error)..PPThese changes would enable more rapid application development andfault finding..Sh "Database Portability".IX Subsection "Database Portability"* The \s-1DBI\s0 has not yet addressed the issue of portability among \s-1SQL\s0dialects. This is the main hurdle limiting database portabilityfor \s-1DBI\s0 applications..PPThe goal is \fInot\fR to fully parse the \s-1SQL\s0 and rewrite it in adifferent dialect. That's well beyond the scope of the \s-1DBI\s0 andshould be left to layered modules. A simple token rewriting mechanismfor five comment styles, two quoting styles, four placeholder styles,plus the \s-1ODBC\s0 \*(L"{foo ...}\*(R" escape syntax, is sufficient to significantlyraise the level of \s-1SQL\s0 portability..PP* Another problem area is date/time formatting. Since version 1.41the \s-1DBI\s0 has defined a way to express that dates should be fetchedin \s-1SQL\s0 standard date format (YYYY-MM-DD). This is one example ofthe more general case where \fIbind_col()\fR needs to be called withparticular attributes on all columns of a particular type..PPA mechanism is needed whereby an application can specify default\&\fIbind_col()\fR attributes to be applied automatically for each columntype. With a single step, all \s-1DATE\s0 type columns, for example, canbe set to be returned in the standard format..PPThese changes would enable greater database portability forapplications and greater functionality for layered modules..Sh "Intellectual Property".IX Subsection "Intellectual Property"* Clarify current intellectual property status, including a review of past contributions to ensure the \s-1DBI\s0 is unemcumbered..PP* Establish a procedure for vetting future contributions for any intellectual property issues..PPThese changes are important for companies taking a formal approachto assessing their risks in using Open Source software..Sh "Other Enhancements".IX Subsection "Other Enhancements"* Reduce the work needed to create new database interface drivers..PP* Definition of an interface to support scrollable cursors..Sh "Parrot and Perl 6".IX Subsection "Parrot and Perl 6"The current \s-1DBI\s0 implementation in C code is unlikely to run on Perl 6.Perl 6 will target the Parrot virtual machine and so the internalarchitecture will be radically different from Perl 5..PPOne of the goals of the Parrot project is to be a platform for manydynamic languages (including Python, \s-1PHP\s0, Ruby, etc) and to enablethose languages to reuse each others modules. A database interfacefor Parrot is also a database interface for any and all languagesthat run on Parrot..PPThe Perl \s-1DBI\s0 would make an excellent base for a Parrot databaseinterface because it has more functionality, and is more mature andextensible, than the database interfaces of the other dynamiclanguages..PPI plan to better define the \s-1API\s0 between the \s-1DBI\s0 and the drivers anduse that \s-1API\s0 as the primary \s-1API\s0 for the 'raw' Parrot databaseinterface. This project is known a Parrot \s-1DBDI\s0 (for \*(L"DataBaseDriver Interface\*(R"). The announcement can be read in<http://groups.google.com/groups?selm=20040127225639.GF38394@dansat.data\-plan.com>.PPThe bulk of the work will be translating the \s-1DBI\s0 C and Perl baseclass code into Parrot \s-1PIR\s0, or a suitable language that generates\&\s-1PIR\s0. The project stalled, due to Parrot not having key functionalityat the time. That has been resolved but the project has not yetrestarted..PPEach language targeting Parrot would implement their own small\&'thin' language-specific method dispatcher (a \*(L"Perl6 \s-1DBI\s0\*(R", \*(L"Python\&\s-1DBI\s0\*(R", \*(L"\s-1PHP\s0 \s-1DBI\s0\*(R" etc) layered over the common Parrot \s-1DBDI\s0 interfaceand drivers..PPThe major benefit of the \s-1DBDI\s0 project is that a much wider communityof developers share the same database drivers. There would be moredevelopers maintaining less code so the benefits of the Open Sourcemodel are magnified..SH "PRIORITIES".IX Header "PRIORITIES".Sh "Transition Drivers".IX Subsection "Transition Drivers"The first priority is to make all the infrastructure changes thatimpact drivers and make an alpha release available for driver authors..PPAs far as possible, the changes will be implemented in a way thatenables driver authors use the same code base for \s-1DBI\s0 v1 and \s-1DBI\s0 v2..PPThe main changes required by driver authors are:.PP* Code changes for \s-1PERL_NO_GET_CONTEXT\s0, plus removing \s-1PERL_POLLUTE\s0and \s-1DBIS\s0.PP* Code changes in \s-1DBI/DBD\s0 interface (new way to create handles, newcallbacks etc).PP* Common test suite infrastructure (driver-specific test base class).Sh "Transition Applications".IX Subsection "Transition Applications"A small set of incompatible changes that may impact some applicationswill also be made in v2.0. See http://svn.perl.org/modules/dbi/trunk/ToDo.Sh "Incremental Developments".IX Subsection "Incremental Developments"Once \s-1DBI\s0 v2.0 is available, the other enhancements can be implementedincrementally on the updated foundations. Priorities for thosechanges have not been set..Sh "\s-1DBI\s0 v1".IX Subsection "DBI v1"\&\s-1DBI\s0 v1 will continue to be maintained on a separate branch forbug fixes and any enhancements that ease the transition to \s-1DBI\s0 v2..SH "RESOURCES AND CONTRIBUTIONS".IX Header "RESOURCES AND CONTRIBUTIONS"See <http://dbi.perl.org/contributing> for \fIhow you can help\fR..PPIf your company has benefited from the \s-1DBI\s0, please consider ifit could make a donation to The Perl Foundation \*(L"\s-1DBI\s0 Development\*(R"fund at <http://dbi.perl.org/donate> to secure future development..PPAlternatively, if your company would benefit from a specific new\&\s-1DBI\s0 feature, please consider sponsoring its development through myconsulting company, Data Plan Services. Work is performed rapidlyon a fixed-price payment-on-delivery basis. Contact me for details..PPUsing such targeted financing allows you to contribute to \s-1DBI\s0development and rapidly get something specific and directly valuableto you in return..PPMy company also offers annual support contracts for the \s-1DBI\s0, whichprovide another way to support the \s-1DBI\s0 and get something specificin return. Contact me for details..PPThank you.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -