Live data from Hacker News

Brubeck: A new Python web framework running on mongrel2

brubeck.io

51–53 of 53 posts

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

#51
post #38

Earlier quoted context omitted.

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

Agreed. If you limit your application to WSGI then mongrel2 is "just" another high-performance event-driven webserver. To really take advantage of the advanced features of m2 you need a framework that's more closely tied to its model of the world. (speaking as author of the m2wsgi module linked above)

I haven't done anything significant with Mongrel2 yet, so my mental model of its operation is probably somewhat flawed, but I was thinking about my above post for a while yesterday.

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.

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

#52

How baked is this? Has anyone written any apps on it?

The project is still new but I have written a complete example app and have been building a far more complex app since.

Listsurf: https://github.com/j2labs/listsurf

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

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

#53
post #26

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

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.

BTW, how is the performance compared to sync pymongo in your use? I'm testing with eventlet and seeing it about 10-20% slower.

https://gist.github.com/1088452

Post reply on HN