tag:blogger.com,1999:blog-2363643920942057324.post8413796850426758491..comments2023-08-09T23:00:54.857+10:00Comments on Graham Dumpleton: Improving Commercial Python/WSGI Hosting OptionsGraham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.comBlogger21125tag:blogger.com,1999:blog-2363643920942057324.post-58717797100401121522009-06-16T11:26:21.086+10:002009-06-16T11:26:21.086+10:00The way that mod_python supports CGI scripts is a ...The way that mod_python supports CGI scripts is a kludge and isn't always going to work.<br /><br />In respect of Python, CGI is superseded by WSGI. So no, there is no intention to offer direct support for CGI scripts implemented in Python, although you could always kludge together such a solution if you really want to on top of WSGI.<br /><br />So, you would be much better off porting any Graham Dumpletonhttps://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-28559156818617044572009-06-15T18:49:05.615+10:002009-06-15T18:49:05.615+10:00Thanks for this, sorry to be dumb, but I got the i...Thanks for this, sorry to be dumb, but I got the impression mod_wsgi wouldn't be a substitute for mod_python as such. <br /><br />Just to clarify, if a web hoster who doesn't yet have mod_python and does not yet offer Python installs mod_wsgi, will this mean that one can then use the same CGI scripts etc. as one would have with mod_python without re-writing these?<br /><br />As I see it, Cushaghttps://www.blogger.com/profile/14576518665210361618noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-40688898802263010882009-06-15T10:24:58.467+10:002009-06-15T10:24:58.467+10:00@Cushag
The point in part of mod_wsgi is that it ...@Cushag<br /><br />The point in part of mod_wsgi is that it be a better mk2 version of mod_python. If not familiar with mod_wsgi you perhaps should have a look at it and the roadmap the blog post referred to.Graham Dumpletonhttps://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-66686313904688037772009-06-15T04:18:30.928+10:002009-06-15T04:18:30.928+10:00It strikes me that the ideal would be to have an e...It strikes me that the ideal would be to have an easy to install Apache module which is suitable for shared hosting - mod_python mk2 if you like.<br /><br />An alternative tack might be to bypass the 'web hosters' and use Virtual Python. It would seem possible to install this on shared hosting even if Python isn't provided and no SSH. Having an easy to install Virtual Python Cushaghttps://www.blogger.com/profile/14576518665210361618noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-11840556679493359342009-04-20T13:56:00.000+10:002009-04-20T13:56:00.000+10:00@Greg: FWIW, I have talked to a couple of hosts wh...@Greg: FWIW, I have talked to a couple of hosts who happened to be using Phusion Passenger for Rails and they didn't even know it could do WSGI as well.<br /><br />One problem am starting to see though with hosting mechanisms which are actually designed for another language, is that the requirements of the other language predominate and so the configuration settings, which are usually global and Graham Dumpletonhttps://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-78103051082560564152009-04-20T13:44:00.000+10:002009-04-20T13:44:00.000+10:00Dreamhost does appear to have 'unsupported' suppor...Dreamhost does appear to have 'unsupported' support ;-) for Passenger/WSGI which is better than nothing:<br />http://wiki.dreamhost.com/Passenger_WSGIGreg Whitescarverhttps://www.blogger.com/profile/09235651080908874850noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-34754970408259486512009-04-20T09:12:00.000+10:002009-04-20T09:12:00.000+10:00@garylinux: If they are still running PHP embedded...@garylinux: If they are still running PHP embedded in Apache using mod_php then all users code is running as the Apache user. This is an insecure way of running web applications. These are not the sort of web hosting companies we would want to attract.<br /><br />What we want for Python web hosting is quality of service. We don't want web hosting companies who only want to pay lip service to Graham Dumpletonhttps://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-57184986198186225412009-04-20T04:59:00.000+10:002009-04-20T04:59:00.000+10:00I agree with almost all you are saying except mos...I agree with almost all you are saying except most virtual hosts (That I have seen) still use apache and mod_php<br /><br />And the last think you said<br />"can still carry a reasonable number of Python web applications, just not as many perhaps as with PHP" <br />is one of the kickers not as much as php means not as much profit per machine.<br /><br />I also just did a quick icq questioning garylinuxhttps://www.blogger.com/profile/03682928140340344602noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-65069866380678051582009-04-19T14:41:00.000+10:002009-04-19T14:41:00.000+10:00@garylinux: When they use fastcgi in combination w...@garylinux: When they use fastcgi in combination with PHP they are already using processes that survive beyond one request. How quickly they reap processes when idle, or whether they periodically restart them to ensure no creeping memory usage will depend on their configuration. So, they already use long running processes.<br /><br />Obviously Python web applications are different in that in PHP,Graham Dumpletonhttps://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-42532452784748170702009-04-18T14:37:00.000+10:002009-04-18T14:37:00.000+10:00One of the draw backs to python hosting in virtual...One of the draw backs to python hosting in virtual hosting setups is the long running process. Sysadmins don't like them on virtual domains hosts. That only leaves cgi and that is slow in python.garylinuxhttps://www.blogger.com/profile/03682928140340344602noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-7901157600921985232009-04-18T10:39:00.000+10:002009-04-18T10:39:00.000+10:00@Michael: You can see some discussion about PHP vs...@Michael: You can see some discussion about PHP vs Python and mod_python/mod_wsgi in the following posts:<br /><br />http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/<br />http://blog.dscpl.com.au/2009/03/load-spikes-and-excessive-memory-usage.html<br /><br />@Chris: Yes the Ruby folks matter in as much as they have made good progress in getting web hosting companies to use Graham Dumpletonhttps://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-84351489081192065642009-04-18T04:28:00.000+10:002009-04-18T04:28:00.000+10:00You can count me in 'the masses' as I have primari...You can count me in 'the masses' as I have primarily been working on PHP applications since the late 90's. That, however, might be a chicken/egg thing, since I have been dissuaded from adopting other languages like Ruby and Python largely because of convenience issues. I do consider myself language-agnostic in theory, but it's not my cup of tea to really tear into the Apache documentation when Greg Whitescarverhttps://www.blogger.com/profile/09235651080908874850noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-16976630952972076012009-04-18T03:59:00.000+10:002009-04-18T03:59:00.000+10:00I think the challenge here is to separate the issu...I think the challenge here is to separate the issues. "Easy" and "Optimal" might mean different things to different *types* of web hosting firms.<br /><br />For example, a commodity firm that operates a cookie-cutter clone of CPanel/WHMCS install, with installation script managers like "Fantastico" and such - most of them (sorry folks) are clueless. Many are resellers of some other entity which Michael Watkinshttps://www.blogger.com/profile/07422297152178282002noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-16390692015976427892009-04-18T03:33:00.000+10:002009-04-18T03:33:00.000+10:00I definitely see the advantages of thinking in ter...I definitely see the advantages of thinking in terms of FastCGI when thinking of how to create a PHP for Python type environment, but I wonder if the proxy method might be simpler. For example, if the webhost provides a simple interface for starting a python script on a specific port and then providing simple X headers for gathering any extra data not provided by the default proxy modules. The elarsonhttps://www.blogger.com/profile/10311421080197766290noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-56852812978140767222009-04-18T01:48:00.000+10:002009-04-18T01:48:00.000+10:00Just throwing this out, but perhaps in addition to...Just throwing this out, but perhaps in addition to pursuing "mass virtual hosting," a parallel effort with the ever-growing number of specialized, Ruby/RoR hosting companies might make sense? They've got Rack, understand their platforms and probably appreciate having stable, mature tools. I've met "the masses" and they are going to keep doing PHP. If something like Zine were to become a killer Chrishttps://www.blogger.com/profile/18167737911493104561noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-49557387539577540052009-04-18T01:12:00.000+10:002009-04-18T01:12:00.000+10:00Graham, rest assured your comments are not being t...Graham, rest assured your comments are not being taken as a rant, although I would agree that some ranting is perfectly justified on this topic.<br /><br />I'm interested in this subject matter myself as recently I've had some reason to look beyond the comfy spot where my own applications reside and think about mass hosting, or at least "bulk" hosting, of Python apps.<br /><br />Are you aware of Michael Watkinshttps://www.blogger.com/profile/07422297152178282002noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-20459761574829587732009-04-17T19:40:00.000+10:002009-04-17T19:40:00.000+10:00True, they probably don't understand and why it is...True, they probably don't understand and why it is in part an education process. I find that even people involved with Python web applications are sometimes quite clueless when it comes to Apache.<br /><br />There are a couple of forums in particular where I have given up trying to help people because some of the principles on the lists, either through arrogance or some religious zeal over Graham Dumpletonhttps://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-71150136642594613722009-04-17T17:49:00.000+10:002009-04-17T17:49:00.000+10:00I think perhaps even more than the infrastructure ...I think perhaps even more than the infrastructure concerns, most commodity web hosts don't want to touch Python because they don't understand it. They barely understand PHP. They've been burned many times by insecure PHP installations, by their own insecure infrastructure, and by poorly written PHP applications, hence "Hardened PHP", suhosin, suexec - and so on.<br /><br />Michael Watkinshttps://www.blogger.com/profile/07422297152178282002noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-53355753972103822732009-04-17T16:33:00.000+10:002009-04-17T16:33:00.000+10:00Yes, agree that management interfaces such as Cpan...Yes, agree that management interfaces such as Cpanel/WHM are important.<br /><br />Once you look at getting into that, and providing Cpanel scripts for easy upload of application, the whole issue of Python packaging systems rears its ugly heads, as does controlled restart of application processes and migration to new code base and database schemas.<br /><br />As to SCGI, I don't see that as a Graham Dumpletonhttps://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-66136276760572449212009-04-17T16:24:00.000+10:002009-04-17T16:24:00.000+10:00Agreed. If the goal is to hit the mass market of "...Agreed. If the goal is to hit the mass market of "web hosters", a great many of whom are fairly clueless appliance operators - where CPanel/WHM is the appliance - then you've got to convince or work with those behind those tools to make things happen.<br /><br />Could take awhile.<br /><br />So I also agree with Graham's other thrust - coming up with well documented solutions. Get enough of thoseMichael Watkinshttps://www.blogger.com/profile/07422297152178282002noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-22331532391568772332009-04-17T16:11:00.000+10:002009-04-17T16:11:00.000+10:00I think the key is to work with Cpanel/whm, plex a...I think the key is to work with Cpanel/whm, plex and other control panels to have them include good python support by default.<br /><br />Think of Cpanel as a platform like windows or linux, and you'll notice that python is not very portable for web host platforms.René Dudfieldhttps://www.blogger.com/profile/17762358075557755436noreply@blogger.com