
Rails Idioms + Django Templates + Erlang Power = Chicago Boss - paulsmith
http://www.chicagoboss.org/
======
jhancock
Here's a few things I experienced when building an erlang webapp 4 years ago:

During dev, I had a server live for users to play with. The data structures
were in flux, there was zero traditional data input protection. My users were
domain experts, no tech background and would type in all sorts of odd inputs
as there was no training or documentation on how to use the webapp. But I
never once had data corruption issues and never once did the server crash. I
was able to run this "test" server with no admin or headaches while I was
doing dev.

The reasons are due to a few characteristics of erlang:

1 - you write concrete pattern matching, not abstract object containers. So a
controller or model function would spec out a clear data structure that was
expected as input. Anything else failed right at the point where the data
didn't fit the patterns and guards.

2 - each request is handled by an isolated erlang process that fails
gracefully and doesn't effect the rest of the system. So my early testers
would get error dumps from the server for bad data inputs but they never
corrupted the data or crashed things. I was able to take these error messages
from test users to see how they were using the system incorrectly.

3 - Single assignment and functional programming were a big win in terms of
writing once, testing once (not writing separate test code), and knowing that
that piece of code was solid and I could move on.

The app was very responsive. All requests were ajax and this system felt like
the server was running on the same box as the web browser. When we had errors,
the erlang error message almost always showed the crash at exactly the point
in the code that needed attention.

These characteristics speak to the power of the dev process, not scalability
which is what you normally hear about erlang.

~~~
gtani
The language and development tools have exploded the last 4 years, both inside
and outside Ericsson and especially after Armstrong's book and work on R12
started. I have a blog post brewing on all the improvements, here's an outline

===================

string, regex handlers, faster file I/O:

\- "re" module replaces "regex"

\- faster iteration over large binaries, R13A

\- avoid io:get_line using raw access

\-----------------------------

metaprogramming/"DSL"

\- deep exploring parse_transform

\----------------------

frameworks, database, middleware

\- couchdb, nitrogen, mochiweb, erlyweb,and now the boss!

\- thrift, ejabberd, rabbitMQ,

\----------------------------

debug, trace, static code analysis; verify program behavior

\- dialyzer, tidier (Sagonas and Avgerinos)

\- mcErlang model checker

\- quick check application vs. specification

\-------------------------

data structures

\- destructive / mutable byte arrays (HiPE BIF)

\- shared immutable data structure

\----------------------

tail recursion

\- Ericsson expanding as fast as they can (e.g. "andalso",

\-------------

SMP, run queues,

\----------

build systems, distribute your app

\- rake \- faxien, sinan (erlware)

==============

Yah, this could be a _long_ post, take a while to draft too.

Dunno the state of scala, clojure and haskell /GHC docs these days, but to
explore the dark corners of erlang dev, you ahve to do a lot of mailing list
and google digging.

(and read Cesarini/Thompson book, which is equal to best software books ever,
modulo fair number of typo's)

~~~
signa11
would you mind sharing your blog address ? i tried looking for it in your
profile, but couldn't really find any pointers to it. thanks !

~~~
gtani
<http://isthiserlang.blogspot.com/>

nothing there yet, I've only been erlanging for a month or 2. But: i have been
workiing on a better documentation database, you can email for details if
interested:

base: genetanigmailcom; insert periods, after positions 4 and 13 and "at" you
know where..gene

------
paulsmith
This is by Evan Miller, whom this crowd may know from what was once titled the
"Balls Out Guide to Nginx Module Development":

<http://www.evanmiller.org/nginx-modules-guide.html>

------
tibbon
I dunno, I'm pretty interested in playing with it. I'm a little cautious of
trashing this based on the claims so far without seeing where it goes. Anyone
remember the iPod thread on Slashdot that declared it as a useless product
that would never take off? For all I know there was a similar one about Rails.

It does make some big claims, but I've been looking for a reason to mess with
Erlang for a while and this seems pretty neat.

------
jrbedard
Sounds like a good project! is the name an americanized version of "Tokyo
Tyrant"?

~~~
stevejohnson
It needs a "Chicago Closet" to go with it.

~~~
ams6110
Capone's Vault.

------
joshu
Are Django Templates really that worthwhile to be compatible with? They seem
quite annoying to me...

------
sant0sk1
"APIs will change, features may be broken, your car may explode when you turn
the ignition, etc."

I think I'll wait awhile on this one...

~~~
Periodic
Yeah, I'm with you. I haven't found a way to load my car into a test sandbox
where failure doesn't result in the loss of the car.

~~~
mbreese
I have yet to find a way to get my car in a test sandbox* where success
doesn't result in the loss of the car.

*Note: for this to work, you will need a large sandbox. If it is too small, your car will be fine, but just try explaining what happened to the sandbox to your kid.

------
saurabh
This website's is a wreckage in IE8, just so you know.

~~~
anamax
With IE7, the site is basically empty. There's nothing after the line with the
links to api, .... download on any of the pages.

~~~
alnayyir
Site wasn't made for IE users, it was made for developers.

~~~
anamax
I use IE and I'm pretty sure that I'm a developer.

What makes you so sure that I'm wrong about the latter?

My other open window is running emacs; it's where I've been writing Python
code for App Engine for the past few weeks. If that doesn't qualify me as a
developer, please describe the requirements, as I've been writing code since
the late 70s.

~~~
zol
I've been a lurker for a while but this comment has prompted me to create an
account.

Of course the previous poster is making a generalization. If you're in the
minority of developers using IE, good for you.

Developers are usually smarter than to use a browser with appalling
performance and a plethora of bugs (that never get fixed) when much better
choices are just a few clicks away.

This is probably a troll, but i'm hitting reply anyway...

~~~
anamax
> Developers are usually smarter than to use a browser with appalling
> performance and a plethora of bugs (that never get fixed) when much better
> choices are just a few clicks away.

So the problem is that I'm "not smart" (enough). Okay - so I'll ask a dumb
question. Are those the only relevant criteria for choosing a browser? Or, are
they merely always dominant?

> This is probably a troll, but i'm hitting reply anyway...

Not at all. I'm open to self-improvement.

~~~
alnayyir
To compare, I use a Mac and a FreeBSD box linked with synergy at work. Use
uzbl on the FBSD box, safari on the Mac.

Frankly, I can't begin to fathom why you would willing use IE when the Chrome
plugin, Firefox, Chrome itself, Safari, and various smaller webkit browsers
are available to you.

I've never really seen the advantage of using Emacs unless you're a lisp
hacker. Seriously. Also the keyboard shortcuts on Emacs are rather similar to
a lot of the universal shortcuts on OS X, which you don't appear to use
either.

So either potential mutual benefit you could derive from using Emacs is being
left for dead.

Also, you're a _developer_ and you're using the very browser that's holding
back our ability to build universal and standards compliant web sites/apps?
Seriously?

You're just a part of the problem, regardless of vocation.

As for editing, I use Textmate/Gedit for code, vi for unixy stuff.

>> Developers are usually smarter than to use a browser with appalling
performance and a plethora of bugs (that never get fixed) when much better
choices are just a few clicks away.

>So the problem is that I'm "not smart" (enough). Okay - so I'll ask a dumb
question. Are those the only relevant criteria for choosing a browser? Or, are
they merely always dominant?

 _rubs face_ Okay.

You're knowingly using a browser that is buggy, slow, insecure, and is holding
back the entirety of the web app dev community.

Relevant criteria? That's all there is to the matter! Unless you're being
__paid __to use that abhorrent bucket of bile I can't fathom a legitimate
reason to utilize it as a developer. Standards compliance, stability,
performance, security...yeah...uh, what else factors into your choice of
browsers, the phase of the bloody moon?

------
ktharavaad
>>>Chicago Boss is fully asynchronous, using one single process to handle
hundreds or thousands of simultaneous requests<<<

>>>All other web frameworks will break down and cry if you ask them to process
more than a few dozen simultaneous requests on a single machine.<<<<

Isn't this what facebook Tornado, Orbited and all the other servers using
select()/epoll() solves?

~~~
tptacek
Erlang's whole I/O and scheduling model is optimized for this design in a way
that Python's simply isn't.

------
iamaleksey
Having worked on several Rails projects and now working on a large erlang
application, I'm not sure that bringing Rails idioms to erlang is a good or
desirable thing.

I also find it somewhat funny that it includes an ActiveRecord port - an
object-relational mapper in a functional language to talk to a non-relational
backend (tokyo tyrant).

------
jdbeast00
blocked at work for potentially unsafe content? wow, this must be powerful

~~~
falsestprophet
_How is Chicago Boss different from Rails/Django/Mason/CakePHP/My Favorite MVC
Framework?_

Chicago Boss is fully asynchronous, using one single process to handle
hundreds or thousands of simultaneous requests, and thus it solves the classic
c10k problem. All other web frameworks will break down and cry if you ask them
to process more than a few dozen simultaneous requests on a single machine.
Chicago Boss is built with Erlang, the same platform used by banks and
telecoms to achieve unprecendented scalability and (no exaggeration)
99.9999999% reliability.

 _Oh my_

~~~
randallsquared
_it solves the classic c10k problem._

Of course, this is the problem you get once you've _solved_ the hard problems
already, which is how to get that many visitors in the first place. At this
point you have the money to buy a bunch of servers, typically, so this is
aimed at people who are really great at getting incredible numbers of hits,
but really poor at monetizing them.

~~~
wglb
But isn't it true that scaling is not linear with dollars/development effort
spent?

~~~
randallsquared
Depends on the application domain and design.

------
middus
Buzz + Buzz + Buzz = Boss

Looks interesting, though.

~~~
tortilla
A little bombastic, but I got a chuckle out of this line:

All other web frameworks will break down and cry if you ask them to process
more than a few dozen simultaneous requests on a single machine.

~~~
rbanffy
The most basic cause for bad technical decisions are wrong assumptions about
technology.

If you believe every other web framework will get crushed with a few dozen
simultaneous requests, you will be absolutely sure this is the solution you
have been waiting for.

I am curious to try Erlang out, but I know exactly how many dozen requests my
current tools can handle. And it's a lot more than a couple.

~~~
Periodic
I'd be interested in some numbers. Is it "a few"? "some"? Give us some vague
quantifiers here!

~~~
rbanffy
Before I roll-out apps to the folks who will really torture them in
production-like servers, I play with about 100 simultaneous connections.

~~~
count
100 is really only a few dozen :)

~~~
cschep
but it's close to 10 dozen...which is almost a dozen dozen...

I dunno. Vagueries. :)

~~~
LogicHoleFlaw
Gross.

------
juvenn
I'd like trying this to fine-grain my Erlang skills.

------
mitko
a.k.a. Al Capone

------
jobeirne
Such a great pitch for a web framework.

------
johnohara
Geographically: The University of Chicago

[edit]: Hey down-modder: It's the last entry on his website. What's the -1
for? Are you saying those of us from Chicago shouldn't be proud of our
institutions? Asshat.

~~~
icey
My guess is that saying "Geographically: University of Chicago" doesn't really
add anything to the conversation. Also, it wasn't in the linked page when I
went there, so maybe there was some confusion.

Although, I just downmodded you because it seems like you've got a tough time
being civil.

~~~
jrockway
The server's IP is definitely not a UofC IP.

