Live data from Hacker News

Brubeck: A new Python web framework running on mongrel2

brubeck.io

11–20 of 53 posts

Re: Brubeck: A new Python web framework running on mongrel2

#11
post #8

OK, now this is interesting. Like twisted or Node.js enabled a new class of web applications, this is offering a lot more than just another Rails/Django clone. I'm happy that there are so many frameworks to choose from based on your personal preferences, but I'm really happy to see a project trying something completely different. This is the first time j2labs crossed my radar… is this part of a larger project? Anyone…

J2 Labs is the name of my consulting company (and twitter account @j2labs).

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.

Re: Brubeck: A new Python web framework running on mongrel2

#12
post #5

There are so many different web frameworks available for Python now. How would somebody make the choice over Brubeck, Flask, Bottle, web.py, Django, Pylons, etc... I know somebody will probably say something like "use the best tool for the job" but what is best for what job? edit; That's just Python frameworks. The situation gets even messier when you start to consider every other languages for web development. Lots…

Agreed. For a newcommer, the question "which framework is most worth my time investment" has has become rather daunting. Seems like the safest choices are the big ones like Rails or Django, but there always seems to be something tempting and fun on the horizon.

I think it's unfortunate that the power of choice isn't as appreciated outside the Python world but I can also relate to people who feel they have to read way too much stuff.

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.

Re: Brubeck: A new Python web framework running on mongrel2

#13
post #5

There are so many different web frameworks available for Python now. How would somebody make the choice over Brubeck, Flask, Bottle, web.py, Django, Pylons, etc... I know somebody will probably say something like "use the best tool for the job" but what is best for what job? edit; That's just Python frameworks. The situation gets even messier when you start to consider every other languages for web development. Lots…

Agreed. For a newcommer, the question "which framework is most worth my time investment" has has become rather daunting. Seems like the safest choices are the big ones like Rails or Django, but there always seems to be something tempting and fun on the horizon.

"Spending too much Time with the Choice of Framework

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."

http://lucumr.pocoo.org/2010/12/24/common-mistakes-as-web-de...

Re: Brubeck: A new Python web framework running on mongrel2

#14
post #9

Armin Ronacher—author of Flask and Werkzeug—pointed out earlier on Twitter[1] that (for better or for worse) it doesn't support WSGI. [1] http://twitter.theinfo.org/92202624614539264

The difference here is that Brubeck answers ZeroMQ messages from Mongrel2 instead of being a web server. So instead of using WSGI, Brubeck connects to Mongrel2 via a ZeroMQ socket and reads messages representing the web requests. 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: http…

Its relatively difficult to find maintained Mongrel2 Python libraries, but projects like http://wsgid.com/ , https://github.com/rfk/m2wsgi , and (maybe unmaintained) https://github.com/berry/Mongrel2-WSGI-Handler make it fairly easy to run WSGI apps behind Mongrel2.

I wouldn't use Brubeck without WSGI solely because I don't want to write an app dependent on its web server.

Re: Brubeck: A new Python web framework running on mongrel2

#15
post #5

There are so many different web frameworks available for Python now. How would somebody make the choice over Brubeck, Flask, Bottle, web.py, Django, Pylons, etc... I know somebody will probably say something like "use the best tool for the job" but what is best for what job? edit; That's just Python frameworks. The situation gets even messier when you start to consider every other languages for web development. Lots…

Agreed. For a newcommer, the question "which framework is most worth my time investment" has has become rather daunting. Seems like the safest choices are the big ones like Rails or Django, but there always seems to be something tempting and fun on the horizon.

Also consider that some frameworks (ala Django) go for the 'kitchen sink' approach which is better for newcomers. Others (like Express with NodeJS) just do a few minimal helpers and otherwise get out of the way.

In this case, the plethora of frameworks is an advantage for the advanced developer, while the few big obvious ones stand out for newcomers.

Re: Brubeck: A new Python web framework running on mongrel2

#16

Earlier quoted context omitted.

Agreed. For a newcommer, the question "which framework is most worth my time investment" has has become rather daunting. Seems like the safest choices are the big ones like Rails or Django, but there always seems to be something tempting and fun on the horizon.

"Spending too much Time with the Choice of Framework 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 sh…

That is a goal of Brubeck too. By using DictShield for modeling you get all your modeling needs, including serializing to Python dictionaries or JSON strings, but it doesn't have an opinion on what database you us.

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.

Re: Brubeck: A new Python web framework running on mongrel2

#17
post #9

Earlier quoted context omitted.

The difference here is that Brubeck answers ZeroMQ messages from Mongrel2 instead of being a web server. So instead of using WSGI, Brubeck connects to Mongrel2 via a ZeroMQ socket and reads messages representing the web requests. 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: http…

Its relatively difficult to find maintained Mongrel2 Python libraries, but projects like http://wsgid.com/ , https://github.com/rfk/m2wsgi , and (maybe unmaintained) https://github.com/berry/Mongrel2-WSGI-Handler make it fairly easy to run WSGI apps behind Mongrel2. I wouldn't use Brubeck without WSGI solely because I don't want to write an app dependent on its web server.

That's a fair point, but there's a lot to love about Mongrel2!

Re: Brubeck: A new Python web framework running on mongrel2

#19
post #8

OK, now this is interesting. Like twisted or Node.js enabled a new class of web applications, this is offering a lot more than just another Rails/Django clone. I'm happy that there are so many frameworks to choose from based on your personal preferences, but I'm really happy to see a project trying something completely different. This is the first time j2labs crossed my radar… is this part of a larger project? Anyone…

J2 Labs is the name of my consulting company (and twitter account @j2labs). 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 sta…

"...Tornado because it offers little support for the plethora of Python drivers that are blocking only."

Could you list an example of what you mean by support for blocking drivers? Thanks.

Re: Brubeck: A new Python web framework running on mongrel2

#20
post #19

Earlier quoted context omitted.

J2 Labs is the name of my consulting company (and twitter account @j2labs). 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 sta…

"...Tornado because it offers little support for the plethora of Python drivers that are blocking only." Could you list an example of what you mean by support for blocking drivers? Thanks.

I guess what he means is that for drivers like mysql which are blocking only there is little support in tornado to not freeze the tornado instance during the request response cycle.
Post reply on HN