RabbitMQ at the Skills Matter Functional Programming Exchange

Matthew Sackman wrote “Today I was lucky enough to give a talk at the Skills Matter Functional Programming Exchange. I talked about resource management in RabbitMQ and how we’re improving this in upcoming versions of RabbitMQ. All the sessions were videotaped and it would seem that a podcast will be going up shortly. In the mean time you…”

Cranial Surgery: Giving Rabbit more Memory

Matthew Sackman wrote “Many users of Rabbit have been asking us about how Rabbit copes with many large messages in queues, to the extent that the total size of these messages exhausts the available physical memory (RAM). As things stand at the moment, the answer is not very well. Although we have a persistence mechanism, that is not…”

Erlang/OTP’s global module

Tony Garnock-Jones wrote “Erlang/OTP’s global module helps with atomic assignment of names for processes in a distributed Erlang cluster. It makes sure that only a single process at a time holds any given name, across all connected nodes. Unlike the local name registration function, names aren’t limited to being atoms: with global, they can be any term at…”

Erlang’s GC only runs when you’re running

Tony Garnock-Jones wrote “Recently, as part of RabbitMQ server development, we ran into an interesting issue regarding Erlang’s per-process garbage collection. If a process is idle — not doing any work at all, simply waiting for an external event — then its garbage-collector will not run until it starts working again. The solution is to hibernate idle processes,…”

RabbitMQ XMPP gateway released

Tony Garnock-Jones wrote “I’m pleased to announce that our XMPP gateway for exposing a RabbitMQ instance to the global XMPP network has been released (documentation, browse or check out code. Update: Because it depends on a newer release of RabbitMQ than 1.3.0, you will also need to check out the server and codegen code from our public mercurial…”

Late-binding with Erlang

Tony Garnock-Jones wrote “Upon browsing the source to the excellent MochiWeb, I came across a call to a function that, when I looked, wasn’t defined anywhere. This, it turns out, was a clue: Erlang has undocumented syntactic support for late-bound method dispatch, i.e. lightweight object-oriented programming! The following example, myclass.erl, is a parameterized module, a feature that arrived…”

Some simple examples of using Erlang’s XPath implementation

Tony Garnock-Jones wrote “We've been investigating the possibility of an XPath-based routing extension to RabbitMQ, where XPath would be used as binding patterns, and the message structure would be exposed as XML infoset. As part of this work, we've been looking at Erlang's XPath implementation that comes as part of the built-in xmerl library. This post walks through a couple of simple examples of using Erlang's XPath implementation to retrieve nodesets matching various criteria.”

Erlang SMTP code updated

Tony Garnock-Jones wrote “A couple of months ago, I improved our erlang SMTP server code. * Mon Oct 15: Support callbacks and more of the spec. Support multiple forward paths. Support callbacks for verification and delivery. Pass domain as well as mailbox for reverse and forward paths. Cope with improper line termination. Log failures in delivery/verification callbacks. *…”

Joe Armstrong on multicore

Matthias Radestock wrote “Joe Armstrong, the inventor of Erlang, paid LShift a visit on Friday. He had kindly agreed to give a short talk to a few of my colleagues. We ended up cramming about twenty people into our meeting room, listening to Joe explain the implications of multicore CPU architectures for programming language design. There were lots…”

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