Astral Plane characters in Erlang JSON/RFC4627 implementation

Tony Garnock-Jones wrote “Sam Ruby examines support for astral-plane characters in various JSON implementations. His post prompted me to check my Erlang implementation of rfc4627. I found that for astral plane characters in utf-8, utf-16, or utf-32, everything worked properly, but the RFC4627-mandated surrogate-pair “uXXXX” encodings broke. A few minutes hacking later, and: Eshell V5.5.5 (abort with ^G)…”

Proper Unicode support in Erlang RFC4627 (JSON) module

Tony Garnock-Jones wrote “In a previous post I explored some of the options for supporting RFC4627 (JSON) Unicode-in-strings well when mapping to Erlang terms. In the end, I settled on keeping the interface almost unchanged: the only change is that binaries returned from rfc4627:decode are to be interpreted as UTF-8 encoded text now, whereas before their interpretation was…”

Too much mail is bad for you

Matthias Radestock wrote “We received a few reports from users of our Erlang-based RabbitMQ message broker who saw sharp decreases in throughput performance when putting the broker under heavy load. We subsequently reproduced these results in our lab. This is not what we expected to see - while some performance degradation is inevitable when running a system at its limits, we had carefully designed RabbitMQ to make such degradation are small and gradual. So clearly the system was behaving in ways we had not anticipated. We eventually tracked down the problem. The lesson is: if you make synchronous calls inside an Erlang process you’d better make sure its message queue is short.”

Minimal Erlang SMTP, POP3 server code

Tony Garnock-Jones wrote “Some seven months ago, I built simple Erlang modules for generic SMTP and POP3 services. The idea is that the programmer should instantiate a service, providing callbacks for user authentication and for service-specific operations like handling deliveries, and scanning and locking mailboxes. Originally, I was planning on providing SMTP-to-AMQP and AMQP-to-POP3 gateways as part of…”

Erlang on Neo1973 cellphone

Tony Garnock-Jones wrote “This evening, after fighting bitbake (in the form of the capricious “insane.bbclass” class definition) for a good few hours, I managed to get Erlang version R11B-5 running on my new cellphone. Running the interactive erlang shell on a cellphone is pretty cool. Erlang’s built-in clustering support works fine: I’ve successfully connected an erlang node on…”

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.…”