Forms using Perl vs PHP or others? (speed/volume)

J

Jan

I need to make a form with about 20 fields, at peak the submit button
will be pressed on average once every second (3600 persons submitting
the form per hour).

Due to this volume, I would like to make things as robust and
responsive as possible. I've previously just stored the values in an
incremental text log file using a perl script on an Apache Debian
installation. There's no database interaction.

Is Perl more efficient, faster, robust (low downtime) than e.g. PHP or
is there any other solutions that you suggest?

Fields are: Name, DOB, Address, Zip Code, Phone numbers etc. Validation
is mainly to check if DOB is a valid date, that ZIP and phone is the
right format after stripping leading/trailing spaces, and displaying
error messages. In addition a language cookie will be read and stored
with the values.

It should work with all browsers, so no java script or similar will be
used.
 
J

J. Gleixner

Jan said:
I need to make a form with about 20 fields, at peak the submit button
will be pressed on average once every second (3600 persons submitting
the form per hour).

Due to this volume, I would like to make things as robust and
responsive as possible. I've previously just stored the values in an
incremental text log file using a perl script on an Apache Debian
installation. There's no database interaction.

Is Perl more efficient, faster, robust (low downtime) than e.g. PHP or
is there any other solutions that you suggest?

Depends much more on your server and network architecture, and a little
on the language and systems you already know.

Your best bet is to have a good server(s) and do your own benchmark.

Apache with mod_perl will perform much better, compared to a pure CGI
driven site, however if you know PHP, then use it. Handling 3600
requests per hour isn't a big deal, so even a CGI driven site will not
be that stressed.
Fields are: Name, DOB, Address, Zip Code, Phone numbers etc. Validation
is mainly to check if DOB is a valid date, that ZIP and phone is the
right format after stripping leading/trailing spaces, and displaying
error messages. In addition a language cookie will be read and stored
with the values.

Doesn't matter. Do as much validation on the client side, using
Javascript, as possible. The script can/should also do it, however
checking on the client side is usually a much better customer experience.
It should work with all browsers, so no java script or similar will be
used.

That's good, since this is a group about perl, not about browsers,
forms, Javascript, etc.
 
M

Matt Garrish

J. Gleixner said:
Depends much more on your server and network architecture, and a little on
the language and systems you already know.

Your best bet is to have a good server(s) and do your own benchmark.

Apache with mod_perl will perform much better, compared to a pure CGI
driven site, however if you know PHP, then use it. Handling 3600 requests
per hour isn't a big deal, so even a CGI driven site will not be that
stressed.


Doesn't matter. Do as much validation on the client side, using
Javascript, as possible. The script can/should also do it

*Must* do it.

There's no reason to think the data will come through your form. Even if
it's not a critical application, do you really want to have to go back and
clean out your data because you assumed it would come through clean? I often
submit garbage to sites just to see what I can break... : )

Matt
 
J

J. Gleixner

Matt said:
*Must* do it.

There's no reason to think the data will come through your form. Even if
it's not a critical application, do you really want to have to go back and
clean out your data because you assumed it would come through clean? I often
submit garbage to sites just to see what I can break... : )

Totally agree. I shouldn't have left 'can' in there.
 
X

xhoster

Jan said:
I need to make a form with about 20 fields, at peak the submit button
will be pressed on average once every second (3600 persons submitting
the form per hour).

Oh piffle. Based on this load, there is little reason to be concerned.
I just benchmarked our crappiest server with a CGI that makes no effort
to be fast, and it does connection to a database on each invocation.
It could do about 5 per second without a problem, so I think you have a
comfortable margin.
Due to this volume, I would like to make things as robust and
responsive as possible. I've previously just stored the values in an
incremental text log file using a perl script on an Apache Debian
installation. There's no database interaction.

Is Perl more efficient, faster, robust (low downtime) than e.g. PHP or
is there any other solutions that you suggest?

Depends entirely on the skill of the people who will be writing and
administering the code.
Fields are: Name, DOB, Address, Zip Code, Phone numbers etc. Validation
is mainly to check if DOB is a valid date, that ZIP and phone is the
right format after stripping leading/trailing spaces, and displaying
error messages. In addition a language cookie will be read and stored
with the values.

It should work with all browsers, so no java script or similar will be
used.

Ask whoever is going to write the code what language they want to write it
in. If you force people to work in a language/system they are not familiar
with, expect problems.

Xho
 
T

Tintin

Jan said:
I need to make a form with about 20 fields, at peak the submit button
will be pressed on average once every second (3600 persons submitting
the form per hour).

You could run something like that on a crappy 386 without it breaking into a
sweat.
 
B

Bart Van der Donck

Matt said:
There's no reason to think the data will come through your form. Even if
it's not a critical application, do you really want to have to go back and
clean out your data because you assumed it would come through clean? I often
submit garbage to sites just to see what I can break... : )

Aaaaah, it is you all the time !! :)
 
B

Brian Wakem

Jan said:
I need to make a form with about 20 fields, at peak the submit button
will be pressed on average once every second (3600 persons submitting
the form per hour).

Due to this volume, I would like to make things as robust and
responsive as possible.


Running mod_perl on decent hardware you can expect a well written script to
execute 1000 times a *second*
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top