||[Jun. 7th, 2005|09:11 pm]
Ben somehow tricked me into working on yet another project ... he wants me to adapt their MT ObjectDriver code into something more generic that abstracts away database partitioning, memcaching, etc. And then filtering/joins/etc too.
The end result, as pseudo-planned, will look like a mix of MT/TypePad's ObjectDriver code, plus kinda like Class::DBI, but layered...
The Cache one lets you define a cache callbacks for loading/setting/deleting primary keys. (for e.g. memcached). So loads come from cache, else get passed down to a lower-level driver. Sets delete from cache, then get proxied to lower-level driver. The DBI ones lets you connect to databases and do range queries and such, the partition one lets you define a callback that given an object, returns a new driver.
I've wanted something like for a long time but have been too scared to try. Given that people successfully use Class::DBI and MT/TypePad run on MT's ObjectDriver stuff, it should be fine.... it'll be an interesting project.
The plan is to open source it all (terms of Perl itself), so if it works out, LiveJournal will use it too, and clean up a lot of our data-handling code, hopefully.
But this is like 5 projects down the road. I keep bouncing back and forth. I've recently started working on Gearman again, now that OpenID is settling a bit.