How about a "Chicago Minion"?

92 views
Skip to first unread message

Metin Akat

unread,
Jan 31, 2014, 7:39:28 AM1/31/14
to chica...@googlegroups.com
Hello

Congratulations about Chicago Boss. From what I see, it's the "best" Erlang web framework I have seen so far. The parts that interest me are very good. Namely: routing, controllers, session, websockets. I like the design of the APIs very much. Lots of thought has been put into them.
When I think about it, during the past years, I have repeatedly re-invented parts of what CB does - on top of either Webmachine or Cowboy. And I am a bit tired of it.

But at it's current state, CB is practically unusable to me. I will state some "problems" (from my point of view), and will ask some questions.
Please, don't read it as a criticism. I very much appreciate CB's philosophy and goals. Giving a complete and working solution to Erlang newbies is a huge accomplishment. I hope it brings more people to Erlang-land.

So, here we go:

1. At it's current state, I cannot integrate CB into my projects. While developing them, I have adopted something very similar to what Riak does: apps/ dir to hold several applications that make the entirety of the project. Then generate a release in rel/myproject and run everything by using app.config and vm.args, as OTP principles rule. My "web" part of the project would be a separate application and CB itself would go into deps/. Currently, CB projects get crated with a "CB config" and custom script to run that. What is worse... all these get created with hardcoded paths written to them.
Yes, I know that part of the goals for CB 1.0 is OTP compliance. I am very much interested to find out what is your plan.
And there is more...

2. CB is HUGE. It has more dependencies than my otherwise huge project. By adding a CB project to my code, the deps/ dir will more than double. The build time will more than double. The release package will grow a lot too. I certainly don't need (or want to) ship MongoDB libraries with my project.

3. I don't need most of CB. And I suspect the greater part of the seasoned Erlang developers don't either. I don't need Models, BossDB. In such projects usually the data is retrieved from other parts of the Erlang system. They on the other hand might, or might not talk to different (or no) databses, third party services etc. Most of the time I don't need Templates, as I usually create JSON/REST APIs with no HTML generation. I just want an easy way to add some http/websockets functionality to my project. And no, I no more want to "just use Cowboy/Webmachine", as I end up with a custom framework around it. And it usually ends up not very well designed, and hard to maintain.


So, have you guys thought about the possibility of extracting a "Chicago Minion" out of the "Chicago Boss". Very much like riak_core ended up being a dependency to Riak, and usable by third parties.

As I see it, it would be Routing + Controllers + Websockets in a well packaged OTP compliant application. Very slim and with the bare minimum of dependencies.
And then, maybe have also BossDb, Models, Sessions etc. in separate OTP packages. And still have the huge "Chicago Boss" meta-package that does exactly what it does now (or better).

So, my questions are:

1. Do you guys think this is possible, or feasible with the current code base (I haven't read it).
2. Do you think it's a good idea?

If you decide to take on such a direction, I would offer some help with it.

Cheers,
Metin



Daniel Widgren

unread,
Jan 31, 2014, 7:50:10 AM1/31/14
to chica...@googlegroups.com
Hi Metin,

Have you looked at https://github.com/kivra/giallo

I think Giallo is kind of CB lite.

regards,
Daniel


2014-01-31 Metin Akat <akat....@gmail.com>:

--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/50431de8-d543-4a9e-84bc-915999e72901%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Metin Akat

unread,
Jan 31, 2014, 8:07:47 AM1/31/14
to chica...@googlegroups.com
Hm, it might do for now. Thanks!
Still, I think that my proposed changes to the architecture are valid point. And would very much like to know what people think on the topic.

Cuong Thai

unread,
Jan 31, 2014, 11:11:29 PM1/31/14
to chica...@googlegroups.com
Hi Metin Akat,
CB is heavy for you, so just use Cowboy. It' simple and beautiful, let's develop from it, your app will be compact.

chan sisowath

unread,
Feb 21, 2014, 7:38:21 PM2/21/14
to chica...@googlegroups.com
hi metin,

 bit late to reply "traveling in mayanmar for chinese new year, ;)",
 you can do release with CB, check my draw app: http://github.com/mihawk/draw

cheer
mihawk



Metin Akat

unread,
Feb 22, 2014, 5:08:43 AM2/22/14
to chica...@googlegroups.com
Hi,
Yes, after I started this thread I proceeded and figured on my own how to force CB into a release. Very similar to your result. My other complaints still apply though... In practice I still prefer to not use CB because of its size.


--
You received this message because you are subscribed to a topic in the Google Groups "ChicagoBoss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/chicagoboss/p_2r6IZNLSg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chicagoboss...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages