Friday, October 2, 2009

Getting Started with Chicago Boss

So, you heard about Chicago Boss, the new web application framework for Erlang, and tried to get started, and ran into the brick wall of undocumentation.


No worries, mate.


First, obviously, you'll need Erlang itself, specifically version 13 and up:


wget http://erlang.org/download/otp_src_R13B02-1.tar.gz
tar xzvf otp_src...
cd otp_src...
./configure
make
sudo make install

And for Chicago Boss you'll need Tokyo Cabinet, a new-ish file-based database:


wget http://1978th.net/tokyocabinet/tokyocabinet-1.4.33.tar.gz
tar xzvf tokyoca...
cd tokyoca...
./configure
make
sudo make install

And you'll need Tokyo Tyrant, which acts as a network server for Tokyo Cabinet:


wget http://1978th.net/tokyotyrant/tokyotyrant-1.1.34.tar.gz
tar xzvf tokyoty...
cd tokyoty...
./configure
make
sudo make install

Now, Chicago Boss says you need a "table" database up and running. All this means is, in one terminal window (or screen session), run:


ttserver my.tct

Now, "my.tct" doesn't have to exist, you didn't have to learn how to use Tokyo Cabinet's commands to create it (though there are worse uses of your time), and Tokyo Tyrant will create it. The ".tct" extension means "Tokyo Cabinet Table" database, and it knows now to treat it like a table database instead of one of its other supported formats (hash, btree, etc.).


OK. Now suck down the Chicago Boss git and build it:


git clone git://evanmiller.org/git/ChicagoBoss.git
cd ChicagoBoss
make

Finally, start-dev.sh inside the ChicagoBoss git repository you've just downloaded, and visit http://localhost:8001/hello/world to ensure you've got things runnings.


Now, and here's the fun part, in another screen start adding models, views, and controllers. They are included and reloaded automatically. More on how to actually do this (another undocumentation wall) in the next post.


Update: If you found this article useful, there's a followup 'first steps' article entitled First Steps With Chicago Boss.

1 comment:

karmen said...

Let me be the first to say that the installation steps went flawlessly!! Thank you! Now on to the next tutorial.