? ?
brad's life [entries|archive|friends|userinfo]
Brad Fitzpatrick

[ website | ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Data::ObjectDriver [Jun. 7th, 2005|09:11 pm]
Brad Fitzpatrick
[Tags|, , , , ]

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.

etc. etc.

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.

(Deleted comment)
[User Picture]From: brad
2005-06-08 06:57 am (UTC)
Coffee, hackin', reading, and talking.
(Reply) (Parent) (Thread)
[User Picture]From: hughe
2005-06-08 09:09 am (UTC)
ah thats what i'm missing... the coffee.

and the air conditioning.
(Reply) (Parent) (Thread)
(Deleted comment)
[User Picture]From: anildash
2005-06-08 05:37 pm (UTC)
i am wondering how that compares to before. :)
(Reply) (Parent) (Thread)
[User Picture]From: mart
2005-06-08 10:24 pm (UTC)

Now there are meetings!

(Reply) (Parent) (Thread)
[User Picture]From: avatraxiom
2005-06-09 05:37 am (UTC)
How abstracted is that going to be? I mean, will you be able to do complex SQL queries using the DBI driver, or will it just be a very simple and generic object interface? I'd imagine the latter, since DBI is only one of many drivers.

(Reply) (Thread)