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 http://www.rabbitmq.com/ – 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 http://hg.opensource.lshift.net/erlang-jukebox/.) 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…”

Static analysis of Erlang communication

Matthias Radestock wrote “I had a brief email exchange with the developers of [Dialyzer](http://www.it.uu.se/research/group/hipe/dialyzer/), the static analyzer (some might call it a type checker) for [Erlang](http://www.erlang.org/) programs. Currently Dialyzer only performs analysis on the functional fragment of Erlang and I was enquiring whether to extend that to handle communication. That would allow the detection of basic input/output mismatches,…”