About

Chicago Boss creator, Evan Miller at Erlang Factory 2013

We love Rails, but we believe that Ruby is the wrong choice of platform on which to build a simple, fast, reliable website. The alternatives aren't much better: the JVM, V8, Python, and Perl all eventually run into the problem of dog-slow server-side templates.

Web developers usually "solve" the problem in a number of ways: buying lots of hardware, hiring a big ops team, implementing complex nested hierarchical cache structures, ripping out features, and moving to a "thick-client" architecture that takes forever to load. But there's a much simpler solution: it's called respecting the RAM.

Erlang Respects Your RAM!

Erlang is different from other platforms because when rendering a server-side template, it doesn't create a separate copy of a web page in memory for each connected client. Instead, it constructs pointers to the same pieces of immutable memory across multiple requests.

So if two people request two different profile pages at the same time, they're actually sent the same chunks of memory for the header, footer, and other shared template snippets. The result is a server that can construct complex, uncached web pages for hundreds of users per second without breaking a sweat.

With Erlang, you can run a website on a fraction of the hardware that Ruby and the JVM require, saving you money and operational headaches. You can run a website on "wimpy-core" ARM servers, helping your bottom-line along with the environment. Your test suite will run much faster than you thought possible, shortening your development cycle and letting you deliver features more quickly.

Chicago Boss Makes Erlang Accessible

Erlang has a reputation for being a mystical technology available only to an elite few willing to spend years learning its arcane syntax. It's true that Erlang "looks weird" to developers accustomed to C-like syntax, and the semantics of functional programming takes some getting used to. By adopting familiar Rails conventions, Chicago Boss has finally made Erlang accessible to programmers who don't have years and years of free time.

Let's look at a few examples:

Defining an action

Ruby on Rails:
def index
    case @request.method
    when "POST"
        # do something...
    when "GET"
        # do something...
    end
end
Chicago Boss:
index('POST', []) ->
    # do something...
index('GET', []) ->
    # do something...

Creating a record

Ruby on Rails:
@person = Person.new(:name => "Joe", :age => 4)
Chicago Boss:
Person = boss_record:new(person, [{name, "Joe"}, {age, 4}])

Saving a record

Ruby on Rails:
@person.save
Chicago Boss:
Person:save()

Perform a 302 Redirect

Ruby on Rails:
redirect_to :action => 'show', :id => @person.id
Chicago Boss:
{redirect, [{action, "show"}, {id, Person:id()}]}

Check out the wiki page for more examples, including record validation, before filters, and more.

Chicago Boss Is Ready For Action

We're not quite to a 1.0 release, but Chicago Boss is already being used in production on a number of internal as well as public-facing websites. If you like what you've read so far, you can download the latest code, browse the API documents, read the PDF tutorial, check out our wiki, or come and talk to us!