Simon Willison’s Weblog

Subscribe

Wednesday, 20th August 2008

UnicodeDictWriter—write unicode strings out to Excel compatible CSV files using Python. Stuart Langridge and I spent quite a while this morning battling with Excel. The magic combination for storing unicode text in a CSV file such that Excel correctly reads it is UTF-16, a byte order mark and tab delimiters rather than commas.

# 12:19 pm / byteordermark, csv, excel, i18n, internationalisation, python, stuart-langridge, unicode, unicodedictwriter, utf16

Facebook engineering notes on Scaling Out. Jason Sobel explains a couple of tricks Facebook use to deal with consistency between their California and Virginia data centres. The first is to hijack the MySQL replication stream to include information about memcached records to invalidate; the second is to use Layer 7 load balancers which inspect a “last modification time” cookie and send users to the masters in California if they have updated their profile in the past 20 seconds.

# 11:51 pm / facebook, jason-sobel, memcached, mysql, replication, scaling