Evergreens

Mark Smith's Journal

Work related musings of a geek.

YAPC::NA 2012 so far! (Reply)

[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.
From:
Anonymous( )Anonymous This account has disabled anonymous posting.
OpenID( )OpenID You can comment on this post while signed in with an account from many other sites, once you have confirmed your email address. Sign in using OpenID.
User
Account name:
Password:
If you don't have an account you can create one now.
Subject:
HTML doesn't work in the subject.

Message:

 
Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.