10

Chicago Boss seems like a neat framework and a good excuse to learn Erlang.

Have any of you used it? Can I really get great performance hosting it on a single machine?

Manoj Govindan
  • 72,339
  • 21
  • 134
  • 141
user94154
  • 16,176
  • 20
  • 77
  • 116
  • 1
    Actually I found the creator of Chicago Boss on here the other day. Surprised he hasn't commented on you yet. – samoz Jun 09 '10 at 17:38
  • 2
    Odd how two years later this is suddenly "off-topic". The answers here are pretty helpful even if the question is not framed properly. May I edit to remove the flag? – user94154 Jan 29 '13 at 14:48

3 Answers3

4

I can't speak for Chicago Boss performance specifically, but Erlang web servers are generally very quick.

They are also very good for multiple concurrent connections, due to Erlang's concurrency primitives. I know Chicago Boss doesn't use Yaws, but here is an Apache vs. Yaws graph, just for reference.

Agreed, C is faster in many cases, but any speed you will gain from C in processing, you will lose when you have multiple users. Think of it like this:

  • C may take 10 time units to complete a task, but 20 units to switch to the next client and back.
  • Erlang might take 15 units of time to complete, but will take about 5 units to switch clients.
  • DISCLAIMER: Time units are just relative terms. I'm not saying those are the correct proportions either, I'm just saying C's speed advantage will not be as big a factor once you start having multiple things going on at once, which is what Erlang is made for.
samoz
  • 56,849
  • 55
  • 141
  • 195
3

Some sites made with Chicago Boss like elryvideo and others

dotoree
  • 2,983
  • 1
  • 24
  • 29
1

Generally Erlang is about 4-5 times slower than doing the same thing in C, though what it loses in speed, it gains in efficiency, simplicity and stability. Doing the things that Erlang excels at, I think it lies around 2-3 times of C. It can also be compiled to native binaries to speed it up about 20% more.

Just know that there are tons of common things that Erlang isn't good at, like string manipulation and number crunching. Erlang was made for distribution (in most senses of the word), so that's what it's awesome at.

Oh, and about the great performance on a single machine: Not more than half of what a C app would. But then again, that is still probably 30-40 times faster than the equivalent in ruby, php or python.

Tor Valamo
  • 33,261
  • 11
  • 73
  • 81
  • So what is Erlang good at? Also, doesn't Erlang take care of a lot of things you have to deal with manually in C (like garbage collecting)? – user94154 Feb 01 '10 at 19:30
  • 1
    Yes, that's what I mean with efficiency, simplicity and stability. Basically what takes 10 lines of code in Erlang takes 100 in C. And the error handling in Erlang is dead simple, as well as spawning new processes. Those things take a lot of development time in C. And Erlang has 99.9999999% uptime in real life apps, simply because it's designed to fail without crashing, because it had to be used in telecom and things like that. And you can update your app while it's running, which is very rare. – Tor Valamo Feb 01 '10 at 19:36
  • 1
    Oh, and about garbage collecting.. there's no such thing, per se. Erlang doesn't have state, it's a functional language. Variables can be set only once, so a memory overflow can't happen (unless you f**k up severely, or do it on purpose). – Tor Valamo Feb 01 '10 at 20:09
  • Tor: you do have to watch memory, i.e. make sure that a process' mailbox doesn't fill up, and you don't allocate many many new atoms. – Gene T Feb 11 '10 at 16:57
  • @Gene T - Of course, but that's not a GC issue. ;) And letting users set atoms is a nay-nay, so if you manage to code up 20.000 atoms, you're pretty busy. :P – Tor Valamo Feb 11 '10 at 17:49