ANN: Aloha, and thoughts on performance

276 views
Skip to first unread message

Zach Tellman

unread,
Dec 27, 2011, 10:51:05 PM12/27/11
to alep...@googlegroups.com
Aleph began a year and a half ago as a weekend project. At the end of
the weekend, I had something that mostly conformed to the HTTP spec,
as long as all you wanted to do was return "Hello World". I came up
with a cool name, posted it to the Clojure mailing list, and called it
a weekend well-spent.

I hadn't bothered to benchmark the server; I figured it was good
enough that it could respond once. Soon after posting to the mailing
list, however, David Nolen reported it was "faster than node.js",
which meant that over the next few days I got a lot more attention
than I had ever counted on. There was clearly a lot more excitement
surrounding this library than there ever had been for my previous
undertaking [1], so I decided to give it some more attention.

In the last 18 months, Aleph has grown quite a bit. Two libraries
(Lamina and Gloss) have fallen out of it, and a small but still
significant number of people have used it as a platform for their
projects and products. It has become both a more capable and more
complex piece of software.

It has also gotten slower.

Some of this is due to the transition from mostly-correct HTTP server
to fully-correct, but the blame largely lies with the ever-growing
abstractions that have been placed between the code where Netty
decodes the HTTP request and the code where Netty sends the HTTP
response. This has not gone unnoticed: I've seen more than a few
comments about "Lamina overhead", and also seen channels characterized
as a "heavyweight abstraction".

It's important to recognize that despite this, Aleph has remained fast
enough for most purposes. It is used at Runa to handle all web
traffic to our main service, and in at least two or three other
production environments I'm aware of.

With that said, it's no fun being the slow kid on the playground. I
have been (and remain) more concerned with having expressive
abstractions than raw performance, but the two aren't mutually
exclusive. The building blocks of Lamina are currently built from
not-so-fast primitives, which has allowed for rapid experimentation,
but now that the design is close to something I'm satisfied with, I've
begun reimplementing these primitives in the 'perf' branch of Lamina.
[2] I intend to begin similar work on Gloss in the near future.

Through all of this, Aleph will probably change the least. However,
to keep myself honest about exactly how much overhead is added by
Lamina, et al, I've written a simple reference webserver on top of
Netty that more or less exists to run "Hello World" benchmarks. I
call it Aloha [3].

The goal of the 0.3.0 release will be to get Aleph's performance as
close to Aloha as possible. In the meantime, I encourage any and all
improvements to Aloha's implementation - just send me a pull request.

Zach

P.S. The 0.2.1 release is going to happen soon, I'm just dragging my
heels because the next Netty release has some stuff that would be nice
to have. If it isn't released soon, we'll push on without it.


[1] https://github.com/ztellman/penumbra
[2] https://github.com/ztellman/lamina/tree/perf
[3] https://github.com/ztellman/aloha

Andrew Cholakian

unread,
Dec 27, 2011, 11:24:14 PM12/27/11
to alep...@googlegroups.com
Just wanted to take this opportunity to send my thanks for all the work you've put in to Aleph & friends this year Zach. Aleph's a great piece of software, looking forward to seeing its speed taken to the next level!

thenwithexpandedwingshesteershisflight

unread,
Jul 12, 2012, 9:31:37 PM7/12/12
to alep...@googlegroups.com
me too - very grateful for all your work and help this year
Reply all
Reply to author
Forward
0 new messages