On Tue, May 16, 2006 at 11:59:48PM +0100, Tim Bunce wrote:
> That's partly why I added the following idea to The Perl Foundation's Summer 
> of Code
> project list (http://www.perl.org/advocacy/summerofcode/ideas.html):
> 
>   Reimplement the DBI v1 API in Pugs
>   Design an implementation of the DBI API in Perl 6 using Pugs.
>   The goal is to maintain the familiar DBI API while radically refactoring
>   the internals to make best use of Perl 6 and so enable greater
>   functionality and extensibility. (Likely mentor: Tim Bunce)
> 
> Trying to come up with both a new architecture and a new API was too much.
> A great deal can be achieved by radically refactoring the internals
> while keeping the same old API (i.e. don't move the goal posts).
> I'm sure a new API will naturally emerge from this work, but it won't be
> the primary goal.

One of the issues facing a Perl 6 implementation of the DBI is how to
implement drivers. Specifically the DBI->DBD API and the supporting
framework to enable drivers to be written with little effort as possible.

The current DBI->DBD API is essentially undocumented and only a few brave
souls have ventured into it to produce drivers. We need to do better.

The 'DBDI' project was started a couple of years ago to define a new
DBI->DBD API with a focus on Parrot. The goal being a database API
(and drivers) for Parrot that could be shared by all languages
targeting Parrot. That project was ahead of it's time and floundered.

I came to the conclusion a year or so ago that rather than try to create
a new Driver API from scratch we should simply adopt an existing one.

The most widely know object oriented database API that's a close fit to
the DBI's needs and most database client APIs is the Java JDBC API.
It's also suitable as a Parrot API, which is a key goal for DBDI.

So I'm specifying that the DBI->DBD API will be based closely on JDBC.
How close? Very close. Specifically, closely enough that we can refer
users JDBC documentation and only document differences and (inevitable)
extensions.

Although a key goal is a Parrot API it makes most sense to work with
Pugs at this stage.

So, is anyone interested in working on mapping the JDBC API to Pugs
and implementing an underlying framework for drivers to use?

Tim.

Reply via email to