How should JSON strings be represented in Erlang?

Tony Garnock-Jones wrote “Erlang represents strings as lists of (ASCII, or possibly iso8859-1) codepoints. In this regard, it’s weakly typed – there’s no hard distinction between a string, “ABC”, and a list of small integers, [65,66,67]. For example: Eshell V5.5.4 (abort with ^G) 1> "ABC". "ABC" 2> [65,66,67]. "ABC" 3> Erlang also has a binary type, a simple…”

Invitation to AMQP and RabbitMQ Birds of a Feather session

chris wrote “I am guest blogging here on behalf of CohesiveFT. We work with the excellent LShift team on our joint venture, RabbitMQ. I’m here to invite you to a Birds of a Feather session this coming Thursday, August 30th, at 8pm, in central London. It is FREE and will last for 45 minutes starting at 8pm,…”

Updated AJAX Erlang Jukebox

Tony Garnock-Jones wrote “Our jukebox (mentioned previously) received an update yesterday. it now uses Erlang’s inets httpd instead of yaws, which reduces external dependencies while also giving the code better structure; it now uses a (mostly) RFC 4627-compliant JSON implementation, with a mod_jsonrpc plugin for the inets httpd (also mentioned previously) to expose services via AJAX JSON-RPC; the…”

JSON and JSON-RPC for Erlang

Tony Garnock-Jones wrote “About a month ago, I wrote an implementation of RFC 4627, the JSON RFC, for Erlang. I also implemented JSON-RPC over HTTP, in the form of mod_jsonrpc, a plugin for Erlang's built-in inets httpd. This makes accessing Erlang services from in-browser Javascript very comfortable and easy indeed. ”

RFC 1982 limits itself to powers of two unnecessarily

Tony Garnock-Jones wrote “RFC 1982 defines a “Serial Number Arithmetic”, for use when you have a fixed number of bits available for some monotonically increasing sequence identifier, such as the DNS SOA record serial number, or message IDs in some messaging protocol. It defines all its operations with respect to some power of two, (2^SERIAL_BITS). It struck me…”

Rabbits, rabbits, rabbits

Tony Garnock-Jones wrote “We’re proud to announce that the project we’ve been working on for the past few months, RabbitMQ, has been released. RabbitMQ is an AMQP server written using Erlang/OTP. Check it out at – or you can go straight to the downloads page for sources and binaries.”

An AJAX Erlang Jukebox

Tony Garnock-Jones wrote “Sometime around the beginning of July I rewrote our internal jukebox in Erlang. It’s taken me four months to get a round tuit, but new stock has just arrived: here’s the code for our AJAX jukebox web-application, as a tarball. (There’s also a mercurial repository: hg clone Click on the image for a screenshot.…”

Erlang processes vs. Java threads

Tony Garnock-Jones wrote “Earlier today I ran a simple test of Erlang’s process creation and teardown code, resulting in a rough figure of 350,000 process creations and teardowns per second. Attempting a similar workload in Java gives a figure of around 11,000 thread creations and teardowns per second – to my mind, a clear demonstration of one of…”

How fast can Erlang send messages?

Tony Garnock-Jones wrote “My previous post examined Erlang’s speed of process setup and teardown. Here I’m looking at how quickly messages can be sent and received within a single Erlang node. Roughly speaking, I’m seeing 3.4 million deliveries per second one-way, and 1.4 million roundtrips per second (2.8 million deliveries per second) in a ping-pong setup in the…”

How fast can Erlang create processes?

Tony Garnock-Jones wrote “Very fast indeed. 1> spawntest:serial_spawn(1). 3.58599e+5 That’s telling me that Erlang can create and tear down processes at a rate of roughly 350,000 Hz. The numbers change slightly – things slow down – if I’m running the test in parallel: 2> spawntest:serial_spawn(10). 3.48489e+5 3> spawntest:serial_spawn(10). 3.40288e+5 4> spawntest:serial_spawn(100). 3.35983e+5 5> spawntest:serial_spawn(100). 3.36743e+5 [Update: I forgot…”

Random in Erlang

Matthew Sackman wrote “I was recently trying to fix our Erlang Jukebox (which Tony is still owing a Blog Post for (and once he’s done that I can write a blog post on adding m3u support to our Erlang Jukebox (and some time after that it should be opensourced…))) so that it would randomly enqueue the wrong track,…”

Fair messaging in Erlang

Matthew Sackman wrote “One of the new projects that I’m working on involves a messaging infrastructure in Erlang. Without boring you with the details, the basic idea is that there are two types of messages, A and B and these are both sent to a thread (or a *process* in Erlang). One A must be paired with one…”