I get that it follows the theme of Django and Sinatra. But Brubeck is not a very common name (the musician Dave Brubeck is my second cousin) and I don't normally see the musical Brubecks intrude into "my" domain. :)
The world keeps getting smaller and smaller :)
I first heard take 5 when I was 11 and I've been a fan of odd time signatures ever since.
This is the first time j2labs crossed my radar… is this part of a larger project? Anyone in the know want to give the backstory on how this came about?
Brubeck + DictShield are both projects that have risen from building API's for startups. I aim to make Brubeck as useful as possible for building web projects a quick and easy process, without sacrificing easy scaling.
My thinking here is that a solid model should help developers build their idea fast and make it through the early days of startups without breaking their backs.
I don't particularly like working with Tornado because it offers little support for the plethora of Python drivers that are blocking only. On top of that, the callback model, while powerful, can lead to some seriously confusing code.
I believe people will find the combination of Mongrel2, eventlet and a database agnostic modeling system (DictShield) very flexible.
Could you list an example of what you mean by support for blocking drivers? Thanks.
See my response to your other comment for how eventlet handles drivers written entirely in Python. In short, it converts them.
can i say use pymongo in Brubeck and you are saying the blocking nature of pymongo won't affect the async nature of Brubeck ??
That is correct about pymongo. Eventlet will convert any drivers that are written entirely in Python into nonblocking driver. Gevent, an alternative to eventlet, can do the same. Brubeck supports both.
In addition to that it also makes ZeroMQ nonblocking. The combination of ZeroMQ support and pymongo, pyredis and pyriak all being available entirely as python (bson is in c tho) is what convinced me I had to write a new framework.
Can you also shed light on thrift protocol ? i have struggled with the blocking nature of thrift(client).
Does eventlet convert blocking thrift client written in python to non-blocking ?
edit; That's just Python frameworks. The situation gets even messier when you start to consider every other languages for web development. Lots of 'hip' technologies I would love to put time into learning but I can't learn them all...
There are many python frameworks and each serves a different need. If you are a Tornado user but find the blocking / nonblocking paradigm confusing, you would probably get a lot out of Brubeck because it replaces the IOLoop (like Twisted's reactor) with a simpler system, eventlet.
I'm glad you think it's hip! It's only a couple months old.
This should probably go to the top. If you have a small application (say less than 10.000 lines of code) the framework probably isn't your problem anyways. And if you have more code than that, it's still not that hard to switch systems when you really have to. In fact even switching out core components like an ORM is possible and achievable if you write a little shim and get rid of that step by step. Better spend your time making the system better. The framework choice used to be a lot harder when the systems were incompatible. But this clearly no longer is the case."
Your database layer might change, for whatever reason, so you adjust a few queries for loading data and you're back in action.
In addition to this many people haphazardly choose their framework and make the mistake of using Tornado without understanding how nonblocking I/O works. If a user chooses.
Brubeck, they would get nonblocking support for free, which makes it a considerably safer haphazard choice.
In spite of this, however, Brubeck indeed aims to be a one-stop shop. It uses coroutines + nonblocking I/O to make scaling up easy but it also a web.py style routing system because all of us know this style already.
If someone is getting started in a vacuum, they're doing it wrong.
In this case, the plethora of frameworks is an advantage for the advanced developer, while the few big obvious ones stand out for newcomers.
I never got around to playing around with Mongrel2 but always wanted to.
I'm a huge Flask fan and will most likely (after looking through some of the source) be using Brubeck from now on on the Py side of things. It covers the basics very well.
Btw, equally impressive is DictShield.
Will you create any special cases for 'modules/extentions' or will continue to keep things agnostic?
Beyond that I attempted to create a familiar interface for everyone who's used a pythonic web framework before. Indeed, a lot like Flask, but also like Tornado.
* Tornado style routing: https://github.com/j2labs/brubeck/blob/master/demos/demo_min...
* Flask style routing: https://github.com/j2labs/brubeck/blob/master/demos/demo_noc...
I wouldn't use Brubeck without WSGI solely because I don't want to write an app dependent on its web server.
(speaking as author of the m2wsgi module linked above)
It seems like WSGI supports a subset of Mongrel2 features. Any "pure" WSGI app can run fine behind Mongrel2, but Mongrel2 allows much more than the WSGI model. For example, a response in Mongrel2 is just a socket getting written to. Mongrel2 can send a request to server A, and then receive the response from a completely seperate server B. Can WSGI support something like this? As far as I know, someone would need to reimplement a lot of Mongrel2's functionality in Python (which is idiotic) just for WSGI compliance.
Again, I've yet to build anything with Mongrel2 and I haven't read the WSGI PEP in a while, so please correct me if I'm wrong about anything. After thinking about it yesterday, I find the differences between a more traditional WSGI-esque model and something like Mongrel2 to be fascinating.
I must give it a try at the next new web project.
Having built-in support for Tornado templates will make it much easier to transform an existing one in the future.
Thank you j2lab for sharing!
TIR == LUA
Brubeck == Python
The more complex app implements a full social network on top of Brubeck. I think it will be called Rubik, but I'm not sure yet.
It'll pop up on my github page sooner or later though: https://github.com/j2labs