Phillip Pearson - web + electronics notes

tech notes and web hackery from a new zealander who was vaguely useful on the web back in 2002 (see: python community server, the blogging ecosystem, the new zealand coffee review, the internet topic exchange).

Getting up to date with Python

I haven’t paid much attention to what’s been happening to the Python Programming language since v2.3. Reading through the What’s New in Python 2.5 document, though, it looks like they’re rounding off a few more of the sharp edges - excellent. A couple of the syntax alterations will save me much code in future. All we need now are convenient anonymous functions, like what you get with function(args) { code } in Javascript, sub { code } in Perl, or { |args| code } in Ruby.

Some highlights:

Semi-synchronous replication for MySQL (courtesy Google)

Very nice - Google has implemented semi-synchronous replication for MySQL, so you can get high availability solely through replication.

The detail: MySQL replication is good for scalability, but being asynchronous, it lacks one important feature that would make it more or less a complete high availability solution. If a transaction succeeds on the master, then the master dies and takes its disk with it, the transaction may not have been fully replicated to any slaves.

One way around this is to use DRBD, which blocks fsync() until the data has been replicated. However DRBD has the opposite problem - it’s good for HA but doesn’t help you scale!

Semi-synchronous replication gives you the transaction replication guarantee by blocking transaction commits until the transaction has been replicated to at least one slave, i.e. gives you high availability and scaling.

Code here. Here’s the patch for MySQL 5.0.37.

← Previous - Next →