Chicago Boss 0.8.0 is available

971 views
Skip to first unread message

Evan Miller

unread,
Jul 27, 2012, 3:59:17 PM7/27/12
to ChicagoBoss
Hi everyone,

I'm excited to announce a big new release of Chicago Boss, version 0.8.0. We've got a lot of great changes, including WebSockets and HTTP streaming, and of course it's all built on the world's greatest networking platform (OTP). In addition, for those of you who have been demanding greater flexibility in defining your application's URLs, regular expressions are finally supported in the routes file, so you can slice, dice, and munge incoming URLs however you please.

With this release there are some breaking changes with boss_db:find, so be sure to update your project code and test it thoroughly before shipping out to production. But I think you'll find the new, simpler API to that function is worth a few code changes. See README_UPGRADE for details.

Anyway, without further ado, I give you:

Download




Changes

* BossDB: New API for boss_db:find/3+. boss_db:find/4-6 have been eliminated in favor of a proplist for passing in search options in the third argument. Valid options are 'limit', 'offset', 'order_by', and 'descending'.

Old API:

   boss_db:find(greeting, [], 10, 0, greeting_text, str_descending)

New API:

   boss_db:find(greeting, [], [{limit, 10}, {offset, 0}, {order_by, greeting_text}, descending])

* BossRecord: The 'sort_by' option to -has is renamed to 'order_by'.


Features

* Cowboy support via mochicow. Specify {server, cowboy} in your boss.config. Thanks to Chan Sisowath.
* WebSocket support via modules in your project's src/websocket directory. Requires Cowboy. BIG thanks to Chan Sisowath for all his work to make this happen.


   CB WebSocket example: https://github.com/mihawk/draw

* Routes support Regex matching, capturing, and named groups. Thanks to Niclas Axelsson for the initial patch.


* New {stream, Generator, Acc0} controller return value incrementally returns data for HTTP chunked encoding. Thanks to me :-)
* New {moved, Location} controller return value performs a 301 permanent redirect. Thanks to Daniel Connolly.
* Templates: New _session variable makes all session data available to templates.
* Session cookies can be limited by domain with new 'session_domain' config option. Thanks to Jose Luis Gordo Romero.
* ErlyDTL: {% regroup %} supports grouping by nested values. Thanks to Lukas Larsson
* ErlyDTL: The "_" translator function can now take a variable, not just a string literal. Thanks to Jose Luis Gordo Romero for the initial patch.
* ErlyDTL: Support for {% elif %}. Thanks to Björn-Egil Dahlberg.
* BossDB: The PostgreSQL adapter supports parameterized queries with boss_db:execute/2.
* BossDB: The MongoDB adapter now returns undefined for properties that are not defined in the database. Thanks to Matt Husby.


Bug fixes

* 404 handlers did not return an HTTP 404 status code. Thanks to Daniel Connolly for the report.
* ErlyDTL: Fix date formatting of "h" value. Thanks to Colin MacDonald.
* BossDB: The Tyrant adapter was not properly initialized.
* BossDB: MySQL adapter did not properly update records with undefined foreign keys. Thanks to Jose Luis Gordo Romero.


The big 1.0 release is closer than ever, but we'll need lots of TESTING to make sure CB is rock-solid before unleashing it on the world. The number of bug fixes in this release is relatively low, which I hope means we've gotten rid of most of the bugs, but the number of new features is relatively high so it's likely there are some new "quirks".

In other news, the Chicago Boss mailing list now has over 200 members and has been quite active lately with many patches, questions, and answers. On GitHub, Chicago Boss is now the #14 most watched Erlang project with over 400 followers (#11 if you don't count defunct projects). I'd say the energy behind the project is strong! Hopefully we can keep up the good work and make a world-class final release later this year.

Happy bossing,

Evan

Karmen Blake

unread,
Jul 27, 2012, 5:22:51 PM7/27/12
to chica...@googlegroups.com
congrats! this is awesome!

Paul Barry

unread,
Jul 28, 2012, 12:37:37 PM7/28/12
to chica...@googlegroups.com
Downloaded it, and ran 'make'. I get the following error message:

...
Compiled src/mimetypes.erl
Compiled src/mimetypes_scan.erl
Compiled src/mimetypes_parse.erl
ERROR: One or more modules listed in mimetypes.app are not present in
ebin/*.beam:
* mimetypes_disp
* mimetypes_map
make: *** [all] Error 1


Any ideas where I start looking for a fix?

Thanks.

Paul.

P.S. Thrilled to see this release appear with so much extra activity
in the community. Congrats to all involved!
--
Paul Barry, w: http://paulbarry.itcarlow.ie - e: paul....@itcarlow.ie
Lecturer, Computer Networking: Institute of Technology, Carlow, Ireland.

Kai Janson

unread,
Jul 28, 2012, 12:47:45 PM7/28/12
to chica...@googlegroups.com
./rebar get-deps compile will do the trick

Sent from my iPhone

Evan Miller

unread,
Jul 28, 2012, 1:12:16 PM7/28/12
to chica...@googlegroups.com
Thanks, try redownloading
--
Evan Miller
http://www.evanmiller.org/

Paul Barry

unread,
Jul 28, 2012, 1:53:02 PM7/28/12
to chica...@googlegroups.com
That worked. Thanks! :-)

Just have to update my calls to boss_db:find... which is a small price to pay.

Regards.

Paul.

Mats Rauhala

unread,
Jul 30, 2012, 4:28:41 AM7/30/12
to ChicagoBoss
Hi,

I downloaded the 0.8.0 release, compiled it and created a new project,
but if I try to compile the project, it complains about
failing compiling of priv/rebar/._boss_rebar.erl module. I have attached
a typescript of the session.

--
Mats Rauhala
MasseR
typescript

chan sisowath

unread,
Jul 30, 2012, 4:50:26 AM7/30/12
to chica...@googlegroups.com
yes, i have the same issue,

here the log:
+ dirname ./init-dev.sh
+ cd .
+ ./init.sh start-dev
+ dirname ./init.sh
+ cd .
+ ./rebar boss c=start_dev_cmd
+ grep -v ==>
+ START_DEV=FATAL: Failed compilation of /home/mihawk/temp/ChicagoBoss-0.8.0/priv/rebar/._boss_rebar_eunit.erl module
+ FATAL: Failed compilation of /home/mihawk/temp/ChicagoBoss-0.8.0/priv/rebar/._boss_rebar_eunit.erl module
./init.sh: 25: ./init.sh: FATAL:: not found
m


solution:

tar zxvf ChicagoBoss-0.8.0.tar.gz
cd ChicagoBoss-0.8.0
find . -name ".\_*" -type f -exec rm -f  '{}' \;
make
 

2012/7/30 Mats Rauhala <mats.r...@gmail.com>

Konstantin Nikiforov

unread,
Jul 30, 2012, 4:31:33 AM7/30/12
to chica...@googlegroups.com
rm -rf ChicagoBoss
git clone git://github.com/evanmiller/ChicagoBoss.git

В Sat, 28 Jul 2012 17:37:37 +0100
Paul Barry <paul.jam...@gmail.com> пишет:
signature.asc

郎咸武

unread,
Jul 30, 2012, 5:26:48 AM7/30/12
to chica...@googlegroups.com
" including WebSockets " Very cool.

2012/7/30 chan sisowath <chan.s...@gmail.com>



--
只为成功找方法,不为失败找理由

Evan Miller

unread,
Jul 30, 2012, 8:40:23 AM7/30/12
to chica...@googlegroups.com
On Mon, Jul 30, 2012 at 4:50 AM, chan sisowath <chan.s...@gmail.com> wrote:
> yes, i have the same issue,
>
> here the log:
> + dirname ./init-dev.sh
> + cd .
> + ./init.sh start-dev
> + dirname ./init.sh
> + cd .
> + ./rebar boss c=start_dev_cmd
> + grep -v ==>
> + START_DEV=FATAL: Failed compilation of
> /home/mihawk/temp/ChicagoBoss-0.8.0/priv/rebar/._boss_rebar_eunit.erl module
> + FATAL: Failed compilation of
> /home/mihawk/temp/ChicagoBoss-0.8.0/priv/rebar/._boss_rebar_eunit.erl module
> ./init.sh: 25: ./init.sh: FATAL:: not found
> m
>
>
> solution:
>
> tar zxvf ChicagoBoss-0.8.0.tar.gz
> cd ChicagoBoss-0.8.0
> find . -name ".\_*" -type f -exec rm -f '{}' \;
> make

Thanks for the tip. Sorry about that everyone, I usually cut releases
on a Linux box but only have access to a Mac, which adds all sorts of
mysterious files to its tar balls. If you redownload, the issue has
been addressed.

Evan

>
>
> 2012/7/30 Mats Rauhala <mats.r...@gmail.com>
>>
>> Hi,
>>
>> I downloaded the 0.8.0 release, compiled it and created a new project,
>> but if I try to compile the project, it complains about
>> failing compiling of priv/rebar/._boss_rebar.erl module. I have attached
>> a typescript of the session.
>>
>> --
>> Mats Rauhala
>> MasseR
>
>



Reply all
Reply to author
Forward
0 new messages