芝加哥老板[chicagoBoss]
Chicago Boss 这个名字听起来,怎么也让人联想不到 Web 开发领域。反而总让人不由得想起黑帮、枪战、还有私酒泛滥的 1920 年代(估计是最近看《大西洋帝国》给闹的)。但是,的而且确,这个玩意明白无误地就是 Web 开发领域的事儿。
先上亮点:
High Productivity
Compact query syntax:
boss_db:find(person, [age > 25])Elegant controllers:
edit('GET', []) ->
ok;
edit('POST', []) ->
{redirect, "/somewhere"}.
Simple data models:
-module(person, [Id, FirstName, LastName]).full_name() ->
FirstName ++ " " ++ LastName.
Rails-y records:
Person = person:new(id, "Joe", "Blow"),
Person:save()
Django templates:
{% for person in people %}
- {{ person.full_name }}
{% endfor %}
Easy Comet – New in 0.4.5
BossMQ introduces a simple API for sending and receiving messages. Here is a complete long-polling chat backend:
send_chat('POST', [Channel]) ->
boss_mq:push(Channel, Req:post_param("msg")).receive_chat('GET', [Channel]) ->
{ok, Time, Messages} = boss_mq:pull(Channel),
{json, [{time, Time}, {messages, Messages}]}.
With BossMQ, any controller action is a potential Comet endpoint. Thus, Comet endpoints have complete access to your entire application — databases, templates, the whole stack.
High Reliability
100% asynchronous network I/O
- Under load, uses less RAM than synchronous apps (PHP, Rails, Django)
- Comet long-polls won’t block the app server
- Single-process model keeps CPU context switches to a minimum
Supports both SQL and schema-less databases
- MySQL
- PostgreSQL
- MongoDB (NEW)
- Tokyo Tyrant
- Mnesia
- Or write your own adapter — usually ~300 lines of code
Operational simplicity
- Zero downtime code upgrades in production (NEW)
- Standalone server does not require Apache, Nginx, etc.
- Direct SMTP mail delivery does not require Postfix
Unique testing framework
- Closure-based tests reduce test code size
- Run functional tests in-memory — no network I/O
- Integrated web and email testing
Future plans (not yet implemented!)
- Full OTP compliance
- Full test coverage
- See the Roadmap
好吧我得承认,其中的一些亮点其实是来自 Erlang 语言本身的。
毫无疑问,这个项目提供了 Erlang 和 ruby on rails’ way 的跨界组合优势。比如说,在采用高生产力的 rails 方式来构建项目时,如果心存疑虑,担心某一天会被可能的性能问题跳出来反咬一口的话,那么现在又多了一个具有 FP 风格的选择了。
有必要表扬一句的是:chicago boss 的文档整理得相当靠谱,单就这一点而言,在众多的 Erlang Web 项目中,就很有走红潜质。此外,开发过程似乎也可圈可点,按照 roadmad 的特性持续升级,很让人看好。不过也有的地方让人感觉有点奇怪,比如说,源代码竟然是要下载的,而没有用“开源工业标准”的 github ,这多少有点让我不适应。
顺便 blah 一下,如今这世道, web 开发似乎已经渐渐地在更多转变为前端以 jquery 为基础的 ajax 开发了,换句话说,前端正在静态页面化。而所谓的后端系统也已经相对标准——更像是 restful 的 CRUD 接口再加上薄薄的一层业务逻辑。前端与后端之间的接口方式与约定已经相当之稳定。那么,比如说,有了 chicago boss 这么有生产力的架构,在后端性能开始吃紧的情况下,趁着系统升级的机会,简单地整一把,平滑地将后端系统“迁移”到更高效的平台上,未尝也不是一个不错的升级方向嘛。
chicago boss有版本控制的啊:https://github.com/evanmiller/ChicagoBoss
Evan Miller: 没错,就是那个以前开发了许多Nginx模块,写了《Nginx模块开发》的家伙。
@Bingo
真的是有呢。奇怪了,我在官方文档里刻意来回地找了好几趟,就是没找到。看来老眼是昏花了?
Evan Miller 原来是 Nginx 界这么牛的人呀,失禁失禁。
” inspired by Rails and written in Erlang”………和rails没关系,只是受它的启发
没有学过,看起来真的很难懂哦。
This video post is really fantastic, the sound quality and the picture quality of this tape post is in fact amazing.
An impressive share, I just given this onto a associate who was performing a little evaluation on this. And he actually bought me breakfast because I found it for him.. smile. So let me reword that: Thnx for the treat! But yeah Thnkx for spending the time to talk about this, I really feel strongly about it and enjoy reading much more on this topic. If possible, as you turn out to be expertise, would you mind updating your weblog with more particulars? It’s highly helpful for me. Large thumb up for this blog post!