Is there an opensource crypto-currency exchanges engine?

I’m looking for an opensource crypto-currency exchange engine.

My preference would be for something easy to use like joomla or drupal. My exchange setup needs support for alt-coins and bitcoin.

I have discovered intersango myself. However, sql file is corrupted, there is no creation of tables and import does not work. Plus it is bitcoin exchange only (and I need alt-coin support). Site of this exchange with “invites only”, registration is closed.

Is there something super-simple that I can use to get started?

What is the problem that mining solves?

Of course, the function of mining is to secure the blockchain, but I’m looking for a more abstract summary of what the exact problem is that mining tries to solve? I believe its called the Byzantine Generals problem, but can it be described in a couple of sentences?

The network needs to select one random stranger out of a large group at a fixed schedule, and uses a ‘hashing-lottery’ as a reasonably fair method to do so. Is that a good definition of the reason why POW is needed?

In other words: Suppose I developed an alternative method to select a random p2p node every few minutes, who gets to publish the next block, could that replace cpu-based proof of work?