View previous topic :: View next topic |
Author |
Message |
dgt84 Guru
Joined: 27 May 2003 Posts: 355 Location: Germany => USA
|
Posted: Fri Apr 23, 2004 2:44 pm Post subject: Mod_Python and PSP Tutorial |
|
|
I recently wrote a tutorial for installing, setting up, and using mod_python and PSP (Python Server Pages) under Gentoo Linux. It includes quite a few useful examples that I wish I could have seen as I was moving my website to PSP.
I've been debating posting it here, mostly because the entire tutorial is on my site, but I don't think this is against the rules. Here is the introduction, and if you are interested, feel free to read the rest:
Introduction
This tutorial will teach you how to get started using mod_python and PSP. [programmer-art.org] is using both mod_python and PSP, and I am going to share the knowledge that I've gained from converting [it] from PHP to PSP.
What the heck is PSP? PSP is basically Python code embedded within web pages that is run when the page is accessed. This is accomplished in our tutorial through the mod_python DSO for Apache 2.
Why PSP? I love Python! I'm very comfortable with it, and when I heard that I could use it with my site I was very excited. I didn't fully understand the mod_python publisher and I am used to the style that PHP uses, so I chose PSP instead of full out mod_python coding, which I'm sure some people will protest. Following the references at the end of this document you can learn to use PSP as a templating system instead of how I use it on [programmer-art.org], so feel free to do so. One problem I ran into during my quest is that there isn't much documentation on PSP, so I told myself if I got everything working I'd write up this tutorial, and well, here we are.
I hope this tutorial will help someone, and that you have an easy transition into making sites using PSP.
Read the rest... _________________ Lila themes | The Porthole Portage Frontend | SVG-Utils |
|
Back to top |
|
|
S_aIN_t Guru
Joined: 11 May 2002 Posts: 488 Location: Ottawa
|
Posted: Fri Apr 23, 2004 7:43 pm Post subject: |
|
|
looks nice.. how fast is it mod_python though? _________________ "That which is overdesigned, too highly
specific, anticipates outcome; the anicipation of
outcome guatantees, if not failure, the
absence of grace."
- William Gibson, "All Tomorrow's Parties"
----
http://petro.tanreisoftware.com |
|
Back to top |
|
|
dgt84 Guru
Joined: 27 May 2003 Posts: 355 Location: Germany => USA
|
Posted: Fri Apr 23, 2004 8:15 pm Post subject: |
|
|
I don't have any test results, but my server load is generally extremely low (not that many people visit my site...)
I'd be interested in seeing someone with a high-load website do some testing with this! _________________ Lila themes | The Porthole Portage Frontend | SVG-Utils |
|
Back to top |
|
|
S_aIN_t Guru
Joined: 11 May 2002 Posts: 488 Location: Ottawa
|
Posted: Fri Apr 23, 2004 9:04 pm Post subject: |
|
|
dgt84 wrote: | I don't have any test results, but my server load is generally extremely low (not that many people visit my site...)
I'd be interested in seeing someone with a high-load website do some testing with this! |
it is possible to write some code that would load test your site (or a more complicated site). i think it would have to use a some threads to load the pages continuously. run it a couple of times, and calculate the average.
it would be an interesting exercise. _________________ "That which is overdesigned, too highly
specific, anticipates outcome; the anicipation of
outcome guatantees, if not failure, the
absence of grace."
- William Gibson, "All Tomorrow's Parties"
----
http://petro.tanreisoftware.com |
|
Back to top |
|
|
myuser Apprentice
Joined: 31 Jan 2004 Posts: 218
|
Posted: Sun Apr 25, 2004 3:02 am Post subject: |
|
|
A distinction here should be made between mod_python and psp. Whilst psp requires mod_python, to get faster speeds you have to use mod_python at a more raw level.
mod_python speeds are comparable to mod_perl, which in turn are close to fastcgi (or scgi). Fastcgi and scgi introduce a degree of latency to the system but scale better and can achieve a greater throughput.
mod_php is a little slower than mod_perl and mod_python (but things do have a habit of moving on) and the zend adaptations should move mod_php into the same sort of realms. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|