July 10, 2003

Blogging over your Shoulder

I just had the weirdest experience. I'm sitting in the speaker's lounge at the conference. I happened to glance at the iBook next to me and saw the blog entry that I just wrote up on the screen.

That doesn't happen every day.

(Let's see if it happens again when I post this entry.)

Posted by jzawodn at 03:50 PM

SpamAssassin + MovableType?

I've been deleting more and more spam comments from my blog recently. I'm this close to hacking MT to call SpamAssassin before allowing a comment to actually post.

Am I the first? Has someone else already done the work? Google hasn't located anything relevant for me. And I figure it'll be a 5-10 minute hack once I get back into the MT codebase again.

Posted by jzawodn at 02:55 PM

OSCON Day #4: Ruby for Perl Programmers

Phil is talking about Ruby. Again, semi-realtime notes on Ruby.

Ruby is roughly 10 years old now. Matz liked Perl's text processing but didn't think that Python was OO enough. It's more of a Perl/SmallTalk blend. Classes, methods, objects, exceptions, message passing, iterators, closures, garbage collection, etc. And it's multi-platform, of course.

Back in 2000, Phil used a lot of Perl but found OO Perl tedious.

Why learn Ruby? It has a similar syntax but is different enough in some places to make you think differently. Strings, hashes, arrays, etc. Ruby can use any object as a key to a hash. Regexes, here-docs, etc.

@ means instance variable inside a class, not an array. The $ denotes global scope variable. @@ denotes a class variable. Semi-colons are optional at the end of line. Parens are optional in method calls.

False and nil are false. But 0 and '0' are true. Everything is an object.

Smaller community for Ruby, but that's okay.

Lots of interesting on-screen examples that I can't reproduce easily, so I'll just watch.

Posted by jzawodn at 12:06 PM

OSCON Day #4: PostgreSQL Replication

Bruce is discussing various replication schemes for PostgreSQL database servers. These are nearly real-time notes, so they're a bit sketchy.

Uses

  • Fail Over (a replica on standby)
  • Load Balancing (use a number of smaller boxes)
  • Data Warehousing (replica used for insane read queries)
  • Remote Servers (firewall or slow line in between machines)
  • Mobile Servers (laptops, usually)

Each use has slightly different requirements. Fast or slow line, on-line 24/7 or only part time, etc.

Methods

  • Master/Slave Asyncrhonous
  • Master/Slave Synchronous
  • Multi-Master Asynchronous (conflict resolution issues: one master master, first one wins based on time sync, locality specific queries (use views + permissions for that, possibly))
  • Multi-Master Synchronous

Uses and Methods

Given a particular usage, which method do you use?

  • Fail Over: Master/Slave
  • Load Balancing: Mutli-Master with Sync or Async + Conflict Resolution
  • Data Warehousing: Aysnc Master/Slave
  • Rmote Servers: Async Multi-Master
  • Mobile Servers: Async Multi-Master + Conflict Resolution

Other Methods

  • Shared disks or SAN
  • Application-level replication
  • Data partitioning among servers

PostgreSQL Replication Soutions

  • Usogres (from Japan)
  • eRServer/Rserv/Dbmirror (in the PostgreSQL contrib directory, uses triggers for async replication)
  • PgReplicator (async with conflict resolution)
  • Postgres-R (semi-synchronous, code not quite complete, uses Spread Toolkit for group communication)

Talk is half done, but I'm off to a Ruby talk now...

Posted by jzawodn at 11:31 AM