Latest Articles
    
    
    
        
            
    
    
        If i’m going to write a server-authoritative multiplayer game, it would be nice to have a decent way to deploy it. Especially to deploy servers around the world in response to player demand, to autoscale and keep latency down.
 
        
            
            
            
            gamedev
            
            
            
            rust
            
            
            
            edgegap
            
            
            
            netcode
            
            
            
            multiplayer
            
            
            
            bevy
            
            
            
            bevygap
            
            
            
        
     
        
            
    
    
        How hard it is to build a realtime multiplayer browser game? Like asteroids, but multiplayer. Retro vibes with modern netcode 🚀.
 
        
            
            
            
            gamedev
            
            
            
            netcode
            
            
            
            multiplayer
            
            
            
            bevy
            
            
            
            bevygap
            
            
            
        
     
        
            
    
    
        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... 
        
            
            
            
            life
            
            
            
        
     
        
            
    
    
        This weekend, Steve, Hunter, Paul and I took part in Spawnfest, a 48-hour Erlang programming
event.
 
        
            
            
            
            programming
            
            
            
            erlang
            
            
            
            webtool
            
            
            
            spawnfest
            
            
            
            etop
            
            
            
            appmon
            
            
            
            sasl
            
            
            
        
     
        
            
    
    
        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... 
        
            
            
            
            programming
            
            
            
            erlang
            
            
            
            otp
            
            
            
            appup
            
            
            
            rebar
            
            
            
            releasehandler
            
            
            
        
     
        
            
    
    
        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... 
        
            
            
            
            programming
            
            
            
            erlang
            
            
            
            hacks
            
            
            
            mochiweb
            
            
            
            irc
            
            
            
            irccloud
            
            
            
            otp
            
            
            
            appup
            
            
            
            sysops
            
            
            
            deployment
            
            
            
            irccloud
            
            
            
        
     
        
            
    
    
        
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.
 
        
            
            
            
            programming
            
            
            
            erlang
            
            
            
            c
            
            
            
            playdar
            
            
            
            rewrite
            
            
            
        
     
        
            
    
    
        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... 
        
            
            
            
            uncategorized
            
            
            
            erlang
            
            
            
            playdar
            
            
            
            london
            
            
            
            hackspace
            
            
            
            talk
            
            
            
        
     
        
            
    
    
        Please Note: this was written January 2009 - see the comments for updates and additional information. A lot has changed since I wrote this.
 
        
            
            
            
            programming
            
            
            
            erlang
            
            
            
            hashing
            
            
            
            java
            
            
            
            databases
            
            
            
            dht
            
            
            
            nosql
            
            
            
        
     
        
            
    
    
        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.
 
        
            
            
            
            programming
            
            
            
            lastfm
            
            
            
            irc
            
            
            
            java
            
            
            
        
     
        
            
    
    
        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... 
        
            
            
            
            programming
            
            
            
            erlang
            
            
            
            mnesia
            
            
            
            ejabberd
            
            
            
            xmpp
            
            
            
            thrift
            
            
            
            yaws
            
            
            
        
     
        
            
    
    
        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.
 
        
            
            
            
            hacks
            
            
            
            hack
            
            
            
            ssh
            
            
            
        
     
        
            
    
    
        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... 
        
            
            
            
            programming
            
            
            
            erlang
            
            
            
            c
            
            
            
            comet
            
            
            
            mochiweb
            
            
            
            libevent
            
            
            
            cnode
            
            
            
        
     
        
            
    
    
        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... 
        
            
            
            
            programming
            
            
            
            erlang
            
            
            
            comet
            
            
            
            mochiweb
            
            
            
        
     
        
            
    
    
        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... 
        
            
            
            
            programming
            
            
            
            erlang
            
            
            
            kernel
            
            
            
            tcp
            
            
            
            networking
            
            
            
            comet
            
            
            
            http
            
            
            
            mochiweb
            
            
            
        
     
        
            
    
    
        Consider this a work-in-progress; I will update this post if I find a ‘better’ way to do fast bulk loading
 
        
            
            
            
            programming
            
            
            
            erlang
            
            
            
            hacks
            
            
            
            mnesia
            
            
            
        
     
        
            
    
    
        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... 
        
            
            
            
            hacks
            
            
            
            bash
            
            
            
        
     
        
            
    
    
        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... 
        
            
            
            
            programming
            
            
            
            hacks
            
            
            
            bash
            
            
            
            netcat
            
            
            
            hack
            
            
            
            streaming
            
            
            
        
     
        
            
    
    
        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... 
        
            
            
            
            programming
            
            
            
            erlang
            
            
            
            c
            
            
            
            memcached
            
            
            
            driver
            
            
            
            hashing
            
            
            
            ketama
            
            
            
        
     
        
            
    
    
        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... 
        
            
            
            
            programming
            
            
            
            erlang
            
            
            
            php