Live data from Hacker News

Brubeck: A new Python web framework running on mongrel2

brubeck.io

21–30 of 53 posts

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

#21
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…

A quick question ---

can i say use pymongo in Brubeck and you are saying the blocking nature of pymongo won't affect the async nature of Brubeck ??

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

#22

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…

A quick question --- can i say use pymongo in Brubeck and you are saying the blocking nature of pymongo won't affect the async nature of Brubeck ??

For some reason my other account is blocked from responding so I created this one.

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.

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

#23
post #19

Earlier quoted context omitted.

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

That is correct. Eventlet has database pooling for python drivers that are written in C.

See my response to your other comment for how eventlet handles drivers written entirely in Python. In short, it converts them.

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

#24
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…

And Bulbflow was released yesterday -- a new Python persistence framework for graph databases (http://bulbflow.com).

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

#25
post #22

Earlier quoted context omitted.

A quick question --- can i say use pymongo in Brubeck and you are saying the blocking nature of pymongo won't affect the async nature of Brubeck ??

For some reason my other account is blocked from responding so I created this one. 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 avail…

wonderful.

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 ?

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

#26

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…

A quick question --- can i say use pymongo in Brubeck and you are saying the blocking nature of pymongo won't affect the async nature of Brubeck ??

I use pymongo with gevent. A small hack is necessary to prevent pymongo from making a new connection for each thread that accesses mongodb (because with gevent, you can have a massive number of threads). I'd imagine the same is true with eventlet.

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

#28
post #22

Earlier quoted context omitted.

For some reason my other account is blocked from responding so I created this one. 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 avail…

wonderful. 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 ?

You know more about thrift than I do. If the "blocking" code is in python, eventlet should be able to fix it. You can't do anything about the native machine code, though. It appears that the client library includes a c-based codec to improve performance, but it should not be a problem if the transport is based on python sockets.

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

#29
post #19

Earlier quoted context omitted.

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

If you do use mysql, you're in luck... here's a pure python client module that can easily be monkey-patched for gevent/eventlet:

http://code.google.com/p/pymysql/

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

#30

Earlier quoted context omitted.

"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 th…

Is there a Socket.IO interface, such as Tornadio (https://github.com/MrJoes/tornadio) for Tornado?
Post reply on HN