473,686 Members | 2,242 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using Python for my web site

Hi, I am interested in re-writing my website in Python vs PHP but have
a few questions. Here are my specs, please advise as to which
configuration would be best:

1.Dell Poweredge Server, w/IIS, currently Windows but considering
FreeBSD
2. Site consists of result pages for auctions and items for sale (100
per page)
3. MySQL (Dell Poweredge w/AMD) database server connected to my web
server
4. Traffic, 30 million page loads/month

I am trying to have the fastest page loads, averaging 100 items per
result page. I have read about using Apache's mod_python so I could
use PSP. Any help or tips are appreciated.

-Adam

Jul 31 '06 #1
48 2451
northband wrote:
Hi, I am interested in re-writing my website in Python vs PHP but have
a few questions. Here are my specs, please advise as to which
configuration would be best:

1.Dell Poweredge Server, w/IIS, currently Windows but considering
FreeBSD
2. Site consists of result pages for auctions and items for sale (100
per page)
3. MySQL (Dell Poweredge w/AMD) database server connected to my web
server
4. Traffic, 30 million page loads/month

I am trying to have the fastest page loads, averaging 100 items per
result page. I have read about using Apache's mod_python so I could
use PSP. Any help or tips are appreciated.

-Adam

you should try http://www.ikaaro.org/itools it is a python library and
has all you need, although it is still in alpha state, it is running
some heavy applications such as http://destinationsflybe.com as an example.

for the mysql you can use the csv module.

for now it has not been ported on window$, try gentoo or freebsd

--
Norman Khine
Jul 31 '06 #2
Thanks I will look into it.

-Adam

Norman Khine wrote:
northband wrote:
Hi, I am interested in re-writing my website in Python vs PHP but have
a few questions. Here are my specs, please advise as to which
configuration would be best:

1.Dell Poweredge Server, w/IIS, currently Windows but considering
FreeBSD
2. Site consists of result pages for auctions and items for sale (100
per page)
3. MySQL (Dell Poweredge w/AMD) database server connected to my web
server
4. Traffic, 30 million page loads/month

I am trying to have the fastest page loads, averaging 100 items per
result page. I have read about using Apache's mod_python so I could
use PSP. Any help or tips are appreciated.

-Adam
you should try http://www.ikaaro.org/itools it is a python library and
has all you need, although it is still in alpha state, it is running
some heavy applications such as http://destinationsflybe.com as an example.

for the mysql you can use the csv module.

for now it has not been ported on window$, try gentoo or freebsd

--
Norman Khine
Jul 31 '06 #3
northband wrote:
Hi, I am interested in re-writing my website in Python vs PHP but have
a few questions. Here are my specs, please advise as to which
configuration would be best:

1.Dell Poweredge Server, w/IIS, currently Windows but considering
FreeBSD
I may be a bit biased, but I would not run a web server under Windows...
2. Site consists of result pages for auctions and items for sale (100
per page)
3. MySQL (Dell Poweredge w/AMD) database server connected to my web
server
Have you considered Postgresql instead ?
4. Traffic, 30 million page loads/month

I am trying to have the fastest page loads, averaging 100 items per
result page. I have read about using Apache's mod_python so I could
use PSP.
That's a possible solution.
Any help or tips are appreciated.
You may eventually be interested in Django (full stack MVC web
framework, runs on mod_apache, supports both MySQL and Postgresql)

http://www.djangoproject.com/

or Myghty (Python's extended port of Perl::Mason, runs on mod_apache,
not tied to any RDBMS) + eventually SQLAlchemy (orm)
http://www.myghty.org/
http://www.sqlalchemy.org/

Now I can't tell if either one or the other beats PSP when it comes to
raw perfs...

My 2 cents
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom. gro'.split('@')])"
Jul 31 '06 #4
Thanks for the info. Reason why we are interested in PSP is because we
think our developers would be able to quickly adapt to the migration,
they are familiar with php and asp.

I agree on the windows webserver, we are looking into using FreeBSD
instead.

What would postgre's advantage over MySQL be?

I will look into Django.

Thanks for your .2

-Adam
Bruno Desthuilliers wrote:
northband wrot
Hi, I am interested in re-writing my website in Python vs PHP but have
a few questions. Here are my specs, please advise as to which
configuration would be best:

1.Dell Poweredge Server, w/IIS, currently Windows but considering
FreeBSD

I may be a bit biased, but I would not run a web server under Windows...
2. Site consists of result pages for auctions and items for sale (100
per page)
3. MySQL (Dell Poweredge w/AMD) database server connected to my web
server

Have you considered Postgresql instead ?
4. Traffic, 30 million page loads/month

I am trying to have the fastest page loads, averaging 100 items per
result page. I have read about using Apache's mod_python so I could
use PSP.

That's a possible solution.
Any help or tips are appreciated.

You may eventually be interested in Django (full stack MVC web
framework, runs on mod_apache, supports both MySQL and Postgresql)

http://www.djangoproject.com/

or Myghty (Python's extended port of Perl::Mason, runs on mod_apache,
not tied to any RDBMS) + eventually SQLAlchemy (orm)
http://www.myghty.org/
http://www.sqlalchemy.org/

Now I can't tell if either one or the other beats PSP when it comes to
raw perfs...

My 2 cents
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom. gro'.split('@')])"
Jul 31 '06 #5
northband wrote:
Thanks for the info. Reason why we are interested in PSP is because we
think our developers would be able to quickly adapt to the migration,
they are familiar with php and asp.
Yes, I guessed it had do to with something like this. OTOH, the
ServerPage model can quickly lead to a disgusting and barely
maintainable mess of application logic and presentation, while the MVC
approach helps designing and writing much more cleaner code (IMHE). As a
matter of fact, lots of PHP apps turns into some more or less well
backed reimplementatio n of the MVC model.
I agree on the windows webserver, we are looking into using FreeBSD
instead.

What would postgre's advantage over MySQL be?
PostgreSQL is a mature, rock-solid, full-blown RDBMS. While not as
laughable as it used to be until very recently, MySQL is still barely a
DBMS at all - and our experiences with it is that it breaks down way too
easily and is a king-size PITA to maintain and upgrade. In fact, the
real question IMHO is: what would MySQL advantage over PostgreSQL be ?-)
I will look into Django.
I can't tell if it'll meets your needs, but I really thinks it's worth
giving it a try.

--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom. gro'.split('@')])"
Jul 31 '06 #6
On 2006-07-31 15:00:15, Bruno Desthuilliers wrote:
In fact, the real question IMHO is: what would MySQL advantage over
PostgreSQL be ?-)
A few years ago I did some research, and the result was that while
PostgreSQL was claimed to have more features and a better design, the
reports of database corruption seemed to have been more frequent than with
MySQL. The usual reason given was that MySQL was more mature.

I assume you don't agree... :)

Gerhard

Jul 31 '06 #7
On Mon, 2006-07-31 at 17:12 -0300, Gerhard Fiedler wrote:
On 2006-07-31 15:00:15, Bruno Desthuilliers wrote:
In fact, the real question IMHO is: what would MySQL advantage over
PostgreSQL be ?-)

A few years ago I did some research, and the result was that while
PostgreSQL was claimed to have more features and a better design, the
reports of database corruption seemed to have been more frequent than with
MySQL. The usual reason given was that MySQL was more mature.

I assume you don't agree... :)
I certainly don't. MySQL provides two different ways to corrupt your
data: actual database corruption *and* data integrity corruption. You
can escape the second by using InnoDB rather than MyISAM tables, but
that increases your chances of the first (InnoDB not being as "mature"
as either MyISAM or PostgreSQL).

Also, saying "a few years ago I did some research" in software terms is
pretty much equivalent to saying "I don't know".

Regards,
Cliff

--

Jul 31 '06 #8
On 2006-07-31 17:28:00, Cliff Wells wrote:
>I assume you don't agree... :)

I certainly don't. [...]
Also, saying "a few years ago I did some research" in software terms is
pretty much equivalent to saying "I don't know".
Exactly. So what's your point with this comment?

I stated what was my impression at the time, with the hope that others
might want to comment. Thanks for the comment.

OTOH, anybody who says "I know" regarding a comparison in reliability
between databases must have pretty good data to back that up. Few have.
Most are in the "I don't know, but my impression is that ..." group.

Gerhard

Jul 31 '06 #9
So seems the best approach would be a MVC model rather than server
scripting? Currently our site is built with a closed source hypertext
preprocessor much like PHP. So it would be easier for us to script
another site, but if we would gain performance via a MVC model, then
that's what we need.

I am not very familiar with developing via MVC, any good tutorials out
there or good places to start?

-Adam

Jul 31 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
1964
by: Tim Parkin | last post by:
Terry Ready said: > YUCK< YUCK< YUCK. > <snip> > The pollenation site is one of the worst I have seen. The mockup page > has teeny type that IE will not enlarge. > <snip> > I care that the site remain physically readable and that it remain a > vehicle for information rather than childish egos. > <snip> > Using IE6, I need a magnifying glass
4
4458
by: bmiras | last post by:
I've got a problem using urllib2 to get a web page. I'm going through a proxy using user/password authentification and i'm trying to get a page asking for a HTTP authentification. And I'm using python 2.3 Here is an exemple of the piece of code I use: import urllib2 #Proxy handler proxy_handler = urllib2.ProxyHandler({"http" :
7
7181
by: Carl Waldbieser | last post by:
I tried to adapt the instructions for building the M2Crypto module (http://sandbox.rulemaker.net/ngps/m2/INSTALL.html) to build a version compatible with Python2.3, but I've had some mixed results. I actually got everything to build and install, but when I try to import M2Crypto-- well, here is a sample session: >>> import M2Crypto Traceback (most recent call last): File "<interactive input>", line 1, in ? File...
7
3208
by: Edward Diener | last post by:
I can install Python 2.4 on the Fedora 3 Linux system, but after I do a number of Linux utilities and commands, like yum, stop working because they were dependent on the Python 2.3 installation. What happens is that Python 2.4 replaces the /usr/bin/python module with the Python 2.4 version. If I replace /usr/bin/python with the Python 2.3 version executable, which is still on my system, that all the aforesaid modules depend on, they start...
0
2017
by: Richard Taylor | last post by:
User-Agent: OSXnews 2.07 Xref: number1.nntp.dca.giganews.com comp.lang.python:437315 Hi I am trying to use py2app (http://undefined.org/python/) to package a gnome-python application called gramps (http://www.gramps-project.org) for MAC OS X.
6
1303
by: Petr Jakes | last post by:
I would like to know if anybody can point me to the site, where it is possible to find the tutorial "Using Databases in Python" which is mentioned by Steve Holden here: http://tinyurl.com/ectj8 Thanks Petr Jakes
0
2451
by: Alimah | last post by:
My objective is to log onto a wiki account (specifically wikipedia) using the http proxies provided by them (145.97.39.130 - 145.97.39.140:80). The operating system is Windows XP/Windows Server 2003. Or more conveniently, what do I need to change in the standard python library so that all python>>internet interaction would be done through a proxy? (I'm guessing urlib2.py?) I have a program login.py (full script:...
1
3180
by: jmalone | last post by:
I have a python script that I need to freeze on AIX 5.1 (customer has AIX and does not want to install Python). The python script is pretty simple (the only things it imports are sys and socket). The README file in the Tools/freeze directory of the Python-2.4.4 distribution says the following (and many other things): Previous versions of Freeze used a pretty simple-minded algorithm to
3
4934
by: joe jacob | last post by:
I configured apache to execute python scripts using mod_python handler. I followed below mentioned steps to configure apache. 1. In http.conf I added <Directory "D:/softwares/Apache2.2/htdocs"> AddHandler mod_python .py PythonHandler mptest PythonDebug On </Directory>
0
8517
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9057
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8770
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8780
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6441
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5800
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4309
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2947
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2208
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.