BitTorrent Style

10 PM July 28, 2003

Some notes from O’Reilly ONLamp about BitTorrent’s Design. BitTorrent is a slick, non-commercial P2P file downloading network, in vogue among techie-folk at the moment.

Article high-lights:

  • BitTorrent was first written in Python, and is being ported to other languages: Java, Perl, C, and C++.
  • The design principle of “idempotence”—something I use regularly, but without the fancy name.
  • BitTorrent’s author, Bram Cohen, calls his code “maintainable”, though the article’s write notes “while [BitTorrent is] written in very clear Python, the magic isn’t easy to grasp.” :)

For something this complex, implementing in Python first is attractive. Python is a good for experimentation, something that would have been important in BitTorrent’s early days. I can imagine that each new version of BitTorrent will be built and tested in Python first.

Meanwhile, because Bram Cohen was careful to define BitTorrent’s wire-protocol, implementations in other languages are appearing. Lesson: when writing a product, define and document any inter-program protocols, separate from the API.

ONLamp have a few other Python Articles.

via the Daily Python URL for July 21.

By alang | # | Comments (0)
(Posted to Software Development and Python)

Moveable Type Ate Your Comments

10 PM July 28, 2003

Sometime last week, my blog’s Berkely db files for comments became corrupt. The symptom was that visitors could not see the text of comments.

A quick flick through the Moveable Type support forums confirmed that Berkeley db corruption is a common problem, and that it often affects comments. I suspect this bug surfaces when two people attempt to modify a Berkeley db file concurrently, though it may also be something obscure inside Moveable Type too.

To cut a long story short, I decided to ditch Berkely db and use MySQL instead. The upgrade (instructions) was painless, taking 15 minutes in total. My web host already had MySQL installed, so the biggest trick was figuring out that the mt-db2sql.cgi script wasn’t in the 2.63-Full version of Moveable Type, and I had to download 2.64-Upgrade.

I managed to save just 26 of 122 comments. I am annoyed at losing thoughtful and humorous remarks from people that I know only online—Simon and Mats particularly come to mind.

In other news, the post that you are reading is this blog’s 100th. I was going to write a navel gazing piece about the wonders of blogging— how it has put me in touch with other technical folk around the world, educated me about new programming techniques, improved my writing skills and generally been a force for the greater common good. Instead, I offer my blog this thought:

“Happy 100, Cardboard Nu. Now don’t stuff up again, or I’m rebraining you with bloxsom.”

By alang | # | Comments (0)
(Posted to Stuff)
© 2003-2006 Alan Green