Hacker News new | comments | show | ask | jobs | submit login
Mod_python - the long story (grisha.org)
147 points by gtrubetskoy 1185 days ago | hide | past | web | 33 comments | favorite

Mod_python has been dead for so long now that its death has gone from a liability to a potential asset. After this much time not supporting its legacy, it hardly has any legacy left to support, and not having legacy baggage can be exploited as a significant advantage.

I hope that if the author wants to resurrect it, he'll consider creating a new mod_python focused exclusively on the new Python. Position it that way. Make it Python 3.4 or later with no support for anything earlier so that all effort can focus on creating the world's best support for the next generation of Python web apps.

Just a thought.

Uhm, did you even read the article?

The project is already being worked on and support for Py3 is implemented. He's reaching out looking for people to help him test it.

Uhm, do you understand what "focused exclusively" and "no support for earlier" mean and how they differ from merely adding "Py 3 support" to a legacy product?

Any resources (time, attention, research, answering user questions, design simplicity, ...) that are expended in an effort to support pre-3.4 versions and users are resources that could be turned instead to the challenge of making the 3.4+ product even better.

With this approach, he could potentially, gradually, change the market's mindset from "mod_python is dead, use mod_wsgi" to "if you're still stuck with Py2, you'll have to use mod_wsgi, but if you are starting a new project, you should go with mod_python."

Priority should be given to making mod_python compile for Apache httpd 2.4, so applications stuck on httpd 2.2/Python 2 can be migrated. This is likely to generate the strongest initial interest. Dropping support for Python 2 would interfere, especially where libraries are used that haven't been updated to work with Python 3.

All projects have finite resources that they allocate as they see fit. You say that priority should be given to legacy upgraders for the sake of "strongest initial interest." That may well be his preference, too, and if so, the costs of doing so will be debited from available resources.

It is, of course, his choice, but I'm suggesting that there is an alternative where all available resources are focused on the future, benefiting new projects at the expense of whatever remains of the legacy, going for strongest ultimate interest even at the possibility that it might not produce the strongest initial interest, and attempting to own the mindshare of "best system for new Python projects" by positioning itself exclusively as that, not positioning new Python project support a recent add-on to an old, legacy technology.

It's a matter of choosing market, positioning, and resource allocation, and I'm pointing out how, with a certain choice, the market perception that "mod_python is dead" doesn't have to be a problem and could even have advantages.

That's not at odds with what the poster is saying.

>(Back in those days this is how programmers worked, there was no “agile” and “daily stand ups”, everyone understood that things take time. I miss those days very much)

Hear, Hear! As much as I think Agile is an improvement over more misused software development models, I still prefer working on my own time at my own pace the best.

Very excellent story.

In my experience over the last 5 years: Agile isn't.

Agile is like any other development process, past and future: one set of people making sure that some other set of people do things the way the first set has had some perceived success with, according to some definition of perceived and success.

Not really. I've had some form of so-called "Agile" processes thrust upon me by people who didn't have any prior experience with it. All they did was read and article or a book or attended some 1-day course on it.

But agile (well scrum) is about working at your own pace.

Measure your velocity to predict delivery times.

Not push yourself to hit required (i.e. hoped for) delivery.

Is there much demand still for a Python apache module? Not to disencourage gtrubetskoy, but we've extended our application server (Phusion Passenger) to support WSGI and were met with little enthousiasm from the community. It seems as though Python users are quite content with reverse proxy setups, or there's another contender we haven't heard of that's serving the community well.

I am certainly interested in how the Python community will react to the mod_python revival.

(It hasn't been long since we've added nodejs support, but that community has shown a lot more love already)

I think it's interesting that in your mind "WSGI" equates with Python support. In my opinion little enthusiasm has to do with how limited and boring WSGI is - I think you'd find much more enthused users if you offered something better than WSGI.

Well that's certainly interesting. Isn't the python web dev community dominated by web frameworks on top of wsgi like django and flask? What kind of improvements would you be thinking about? Or is mod_python already better than wsgi in some way?

mod_python predates WSGI by many years, and I personally am not too happy with WSGI. I just wrote about it: http://grisha.org/blog/2013/10/26/my-thoughts-on-wsgi/

There is no compelling reason to switch to or use passenger. Only the enterprise version is feature-parity equivalent to mod_wsgi. Ofcourse mod_wgsi doesn't have an external daemon (the flying mode) but uWSGI has that and many other non-equated features ...

We already have a very good Python apache module in mod_wsgi, https://code.google.com/p/modwsgi/. It's pretty much the default for production Python web deployments.

I thought the WSGI support for passenger was neat, and I'm glad there's at least one option for Python deployment with little server configuration required, but I don't use it because I don't want to bugger around recompiling nginx :)

Please note that in most environments Passenger now comes as a binary distribution so there is no need to recompile anymore.

Unless ofcourse you are using it together with other nginx modules, that's an unfortunate effect of nginx's module architecture I'm afraid.

Yes, I know. nginx is explicitly not designed for being an app launcher; I don't blame Passenger for this.

It seems people mostly use gunicorn & similar. But uWSGI provides most features.

"It’s an open source project people, it’s only dead if you do not contribute to it."


The "expose the internals of the webserver" model is much like the Lua support for Nginx in Openresty. The "is this an application server" question still comes up...

I sympathize with this story and it makes me feel sorry.

But I also feel sorry for all the people who have struggled to do normal things with mod_python, often just because they assumed it was the default due to its name, and did not know that it got left behind by the rest of the world. This is why people say "mod_python is dead," to save others the pointless struggle typically encountered while trying to do the typical things with mod_python. And it's not only the long period without maintenance or the weak documentation. The whole ecosystem just moved on. It's been many years.

The reason it is you against the world today is that you want everyone to drop WSGI to use mod_python. Maybe this was possible in 2003-2005 or so. But for a long time now, mod_python is just not a good alternative to WSGI and all the tools that use it, even if it is good in its own ways. Trying to replace WSGI with mod_python today doesn't make sense. Please give up the goal of replacing WSGI with mod_python and take a new direction!

I have been developing for the web since 2002, but I have only been doing Python for the last few years, the "mod_python is dead" phase. In fact with the first site that I launched in python, I was starting to setup a beta environment with mod_python when my boss told me not to use it. Looking forward to reading up on the new release.

Why not just use the webserver as a proxy to gunicorn or uwsgi?

Are you suggesting that a webserver is best used as a proxy, or that gunicorn and uwsgi are not webservers?

I don't think he was suggesting either. In the suggested setup, the webserver can still be used as a webserver, giving you the power of years of development into security, modules, etc, while proxying through certain requests requiring custom application work - which passes to your local webserver. Neither is what I'd consider the primary role of the application, though.

I'm not sure about uWSGI, but Gunicorn's default worker was designed to be behind a proxy that buffers slow clients.

I wrote a fairly large application (by academic standards) in mod_python, which I babied along until about two years ago when I converted it to plain cgi since the light traffic didn't justify the extra infrastructure.

The only thing I wanted was a simple means to pass around input that I didn't have to write by hand... much to the contrary of mod_python's intent.

I am glad Grisha is working on it again, though. I am always pleased to see labors of love for 20 years get sustained attention.

Hmmmm... not a mention of Graham Dumpleton, who seemed to be the force behind mod_python while I was using it (and mod_wsgi now). Maybe he took over when Grisha burned out?

Anyway, thank-you for your enormous contribution to Python on the web, Graham. And if it was his shoulders you stood on, my thanks to Grisha too.

"I didn’t think that people without root access would ever use mod_python."

And without support for reloading, that pretty much guarantees who'll be using it.

I sweetly remember losing a few days to getting mod_python working within cygwin. As lovely as python is I never work with the language anymore.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact