Mark Smith's Journal

Work related musings of a geek.

YAPC::NA 2012 so far!

[staff profile] mark
This is a short-ish post about some of the more interesting and relevant things I've been learning about and seeing in action. I won't spend a lot of time in this post, but I want to make sure I get them written down.

1. CHI. This is, basically, the DBI for caching. It lets you do some really interesting abstractions on your caching system. For example, you can write code that looks like this (from memory):

my $val = $cache->compute( "uid:3943", "10m", sub {
    return LJ::load_userid( 3943 );

This code replaces the following paradigm. We use this everywhere:

my $val = LJ::MemCache::get( "uid:3943" );
unless ( $val ) {
    $val = LJ::load_userid( 3943 );
    LJ::MemCache::set( "uid:3943", $val, 600 );

That is a simple example. CHI also lets you do things like chained caches (think L1/L2 processor caches) and cache mirroring (write to our database and memory) and etc. It's interesting.

2. Exception::Class and Err. These are just some of the classes, but it's the whole "use real exceptions, throw them" instead of "die or return undef and handle it everywhere". Yeah. I like exceptions, I think we could do well to start using them.

3. Message::Passing and family. This may not be directly applicable but it's interesting. The whole ZeroMQ world + the idea of removing Apache. We would have Perlbal package up requests and send them back to the web server jobs -- whatever they happen to be.

I really want to ditch Apache. We aren't really using it for any good purpose. We don't really need a web server. We can jettison it.

4. Bread::Board. Let's be honest, our application is really complicated. This system lets you simplify some parts of that -- so you don't have to manage dependencies and some things like that. It also really helps with abstracting things to a central configuration point.

We really should work on making Dreamwidth more modular. Separating "areas of concern" so that we have separate, smaller components. This makes debugging, performance analysis, and lots of other things way easier. It also helps with the whole modernization front -- and being able to enable or disable systems that are a problem.


There are lots of interesting talks. Lots of things that are coming back into my mind -- using Moose (or a similar real object system), relevant testing, documentation, better exposure (getting Dreamwidth more recognized in the industry), etc etc.
15.06.2012 12:18 am (UTC)

(no subject)

denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)
Posted by [staff profile] denise
We totally need to do MOAR CONFERENCES. I always forget until I'm drinking from the firehose of Interesting People Talking About Interesting Stuff how much I enjoy them :)
16.06.2012 08:42 am (UTC)

(no subject)

yvi: Kaylee half-smiling, looking very pretty (Default)
Posted by [personal profile] yvi
Very interesting!