Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mod_Python and PSP Tutorial
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
dgt84
Guru
Guru


Joined: 27 May 2003
Posts: 355
Location: Germany => USA

PostPosted: Fri Apr 23, 2004 2:44 pm    Post subject: Mod_Python and PSP Tutorial Reply with quote

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
View user's profile Send private message
S_aIN_t
Guru
Guru


Joined: 11 May 2002
Posts: 488
Location: Ottawa

PostPosted: Fri Apr 23, 2004 7:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
dgt84
Guru
Guru


Joined: 27 May 2003
Posts: 355
Location: Germany => USA

PostPosted: Fri Apr 23, 2004 8:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
S_aIN_t
Guru
Guru


Joined: 11 May 2002
Posts: 488
Location: Ottawa

PostPosted: Fri Apr 23, 2004 9:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
myuser
Apprentice
Apprentice


Joined: 31 Jan 2004
Posts: 218

PostPosted: Sun Apr 25, 2004 3:02 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
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