10 years later…
I have dragged my blog, kicking and screaming, into the era of media-queries and responsive CSS. So now it’s readable on a variety of screen sizes. My first post was roughly the same year the iPhone 3G came out I...
Logbook / blog / devlog
I have dragged my blog, kicking and screaming, into the era of media-queries and responsive CSS. So now it’s readable on a variety of screen sizes. My first post was roughly the same year the iPhone 3G came out I...
This weekend, Steve, Hunter, Paul and I took part in Spawnfest, a 48-hour Erlang programming event.
During my experiments with rebar, I made a simple example app for testing upgrades and releases. This article will walk you through using rebar to create an application, lay it out properly, package and deploy it, and create and install...
I’ve been building something in Erlang recently, provisionally called IRCCloud.com (mention this post if you request an invite!) - it’s an in-browser IRC client that stays connected for you all the time, so you never miss the conversation. You can...
I've heard many anecdotes and claims about how many lines of code are saved when you write in Erlang instead of [C++/other language]. I'm happy to report that I now have first-hand experience and some data to share.
Last night I gave an “Intro to Erlang” talk at a London Hackspace meetup. I did a quick audience survey first: About 75% did “web programming” (ruby,python,php,etc). Around 30% admitted to regularly using C/C++/Java or desktop/mobile app development. Less than...
Please Note: this was written January 2009 - see the comments for updates and additional information. A lot has changed since I wrote this.
Everyone that works at Last.fm is typically connected to our IRC server. We have different channels per team, as well as a company-wide channel, and a few channels dedicated to automated monitoring.
I started poking around in the ejabberd source code to see what I could learn. I couldn’t find much in the way of high level documentation that talks about how the various bits of ejabberd talk to each other, so...
It’s common to have to ssh to firewall / gateway machine, then ssh to the machine you want to work on within a server network.
In Part 1 and Part 2 of this series we built a comet application using mochiweb, and learned how to route messages to connected users. We managed to squeeze application memory down to 8KB per connection. We did ye olde...
In Part 1, we built a (somewhat useless) mochiweb comet application that sent clients a message every 10 seconds. We tuned the Linux kernel, and built a tool to establish a lot of connections in order to test performance and...
In this series I will detail what I found out empirically about how mochiweb performs with lots of open connections, and show how to build a comet application using mochiweb, where each mochiweb connection is registered with a router which...
Consider this a work-in-progress; I will update this post if I find a ‘better’ way to do fast bulk loading
Made a minor tweak to my .bashrc after browsing dotfiles.org for some ideas. One neat trick I gleaned was detecting when the exit code of the last command ($?) was non-zero and altering the prompt. This will be useful for...
Here’s how to make a proxy for streaming mp3s. It transcodes on-the-fly to 64kpbs MP3 using lame. When transcoding is finished, it calls the ./posthandler.sh script, which can either just delete the file, or potentially archive it so you don’t...
All the data I need from memcached is assigned to servers using a consistent hashing mechanism, implemented as libketama - a shared library written in C. We use a php extension to wrap this, and also have a pure java...
I started writing some Erlang recently. The vast majority of data I need to access from Erlang resides in cached, serialized php objects. Here’s what I came up with to turn a serialized php object into a sort of nested...
We wrote ketama to replace how our memcached clients mapped keys to servers. Previously, clients mapped keys->servers like this: