database-independence: it has begun.
brad at danga.com
Fri Dec 29 02:07:02 UTC 2006
On Thu, 28 Dec 2006, Travis Boucher wrote:
> Brad Fitzpatrick wrote:
> > Mogilers,
> > After I removed all the old APIs and made the mogilefsd file small and
> > beautiful, I moved onto the oft-requested database independence
> > project.
> Any future plans of abstracting all of the SQL away into a separate
> 'Database' package, allowing implementations of custom database
> backends (eg. non-sql)? This could allow integration into existing
> database infrastructures and other methods of database scaling.
Yes. Notice I called it "Store" and not "Database". :)
I actually intend to use this myself to do partitioned storage next,
spreading the file and file_on tables out over lots of databases.
But yes, currently the constructor for the MogileFS::Store is very
DBI-specific, but there's no reason for that.
Also, I'm not ever going to make the Store class return DBI $sth objects,
as that's too DBI specific... instead they'll return iterators so you
can do a non-DBI store easily.
We could even rename things in the future to be MogileFS::Store,
MogileFS::Store::DBI, MogileFS::Store::DBI::MySQL, etc...
But for now I just want to remove all the 50 (er, 48 now) users of
get_dbh() and make them go through the store interface, then we can deal
with pretty namings.
More information about the mogilefs