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

Discussion in 'Perl Misc' started by Jan, Feb 16, 2006.

  1. Jan

    Jan Guest

    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.
     
    Jan, Feb 16, 2006
    #1
    1. Advertising

  2. Jan

    J. Gleixner Guest

    Jan wrote:
    > 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.
     
    J. Gleixner, Feb 16, 2006
    #2
    1. Advertising

  3. Jan

    Matt Garrish Guest

    "J. Gleixner" <> wrote in message
    news:eek:58Jf.84$...
    > Jan wrote:
    >> 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


    *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
     
    Matt Garrish, Feb 16, 2006
    #3
  4. Jan

    J. Gleixner Guest

    Matt Garrish wrote:
    > "J. Gleixner" <> wrote in message
    > news:eek:58Jf.84$...
    >> Jan wrote:


    >>> 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

    >
    > *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.
     
    J. Gleixner, Feb 17, 2006
    #4
  5. Jan

    Guest

    "Jan" <> wrote:
    > 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

    --
    -------------------- http://NewsReader.Com/ --------------------
    Usenet Newsgroup Service $9.95/Month 30GB
     
    , Feb 17, 2006
    #5
  6. Jan

    Tintin Guest

    "Jan" <> wrote in message
    news:...
    > 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.
     
    Tintin, Feb 17, 2006
    #6
  7. Matt Garrish wrote:

    > 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 !! :)

    --
    Bart
     
    Bart Van der Donck, Feb 17, 2006
    #7
  8. Jan

    Brian Wakem Guest

    Jan wrote:

    > 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*


    --
    Brian Wakem
    Email: http://homepage.ntlworld.com/b.wakem/myemail.png
     
    Brian Wakem, Feb 17, 2006
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rajive Narain
    Replies:
    0
    Views:
    2,091
    Rajive Narain
    Sep 18, 2009
  2. Ruby Baby
    Replies:
    13
    Views:
    283
    Josef 'Jupp' SCHUGT
    Feb 20, 2004
  3. __
    Replies:
    1
    Views:
    133
    Gregor Kofler
    Oct 2, 2007
  4. Replies:
    1
    Views:
    213
    Simon Cropper
    Jul 31, 2012
  5. Travis
    Replies:
    3
    Views:
    420
Loading...

Share This Page