digg


Code repository for code publicly released by Digg (http://digg.com)

Overview

We have moved our code repository to GitHub. Any new updates will be done there. Come check us out and say hello.

Butler

Digg has a bunch of web servers. One of the problems with running a bunch of web servers is that you sometimes need to get information from each one individually. Or maybe you need to run operations on each one individually. For instance, we use APC to cache configurations and other data. Without restarting Apache we can use Butler to clear configurations from APC or alter APC keys. We also use it to get a bunch of PHP-specific information (e.g. PHP modules and PEAR packages).

Butler is meant to be installed on an internal port and has no authentication. This should not be installed on an external server/port.

http://github.com/digg/butler/

Muuttaa

Muuttaa means to "alter" or "change" or "move" in Finnish. It was created because Digg sometimes needs to move large amounts of information around in our databases without bringing the site down. A common use case is when a user wishes to remove themselves from the site. This results in lots of queries to remove Diggs, submissions, etc. We use Muuttaa to queue those statements up and then, slowly, over time run them against the database. Muuttaa handles errors, transactions and breathers in between statements so running 100,000 updates doesn't kill the DB.

http://github.com/digg/muuttaa/

PDB

PDB is a simple wrapper around PHP's PDO. It enhances PDO in a number of ways, including helper functions (e.g. getAll(), getRow(), etc.), the ability to explicitly disconnect from the database and the ability to reconnect to the database. It also adds singleton support. If you're familiar with PEAR's DB package you'll be happy to know PDB is fairly API compatible with it.

http://github.com/digg/pdb/

Class

At Digg we use jQuery extensively, but it doesn't offer a much in the way of Object-Oriented JavaScript. Existing OOJS libraries weren't a good fit -- often trying to shoehorn traditional OOP patterns in where they don't quite fit -- so we rolled our own. Class adds OOP patterns to jQuery, modeled after the original Class object in Prototype but with significantly greater capabilities -- including namespacing, limited classical inheritance and more robust prototypal inheritance.

http://github.com/digg/class/

Project Information

Labels:
digg php pear lamp