newbie ?s

Discussion in 'Python' started by Venkat B, Jan 13, 2005.

  1. Venkat B

    Venkat B Guest

    Hi folks,

    I'm looking build a CGI-capable SSL-enabled web-server around Python 2.4 on
    Linux.
    It is to handle ~25 hits possibly arriving "at once". Content is non-static
    and built by the execution of py cgi-scripts talking to a few backend
    processes.

    1) I was wondering if anyone has opinions on the ability of CGIHTTPServer (a
    forking variant) to be able to handle this.
    2) If so, would something like pyOpenSSL be useful to make such a webserver
    SSL-enabled.

    I checked out John Goerzen's book: Foundations of Python Network Programming
    (ISBN 1590593715) and searched around. While I found how one can write py
    scripts that could communicate with SSL-enabled webservers, tips on building
    SSL-enabled webservers isn't obvious.

    I was hoping to build a cleaner solution around the CGIHTTPServer variant
    instead of say something like mini-httpd/OpenSSL/Python. I'd appreciate any
    pointers.

    TIA,
    /venkat
     
    Venkat B, Jan 13, 2005
    #1
    1. Advertising

  2. Venkat B

    Paul Rubin Guest

    "Venkat B" <> writes:
    > I'm looking build a CGI-capable SSL-enabled web-server around Python 2.4 on
    > Linux.
    > It is to handle ~25 hits possibly arriving "at once". Content is non-static
    > and built by the execution of py cgi-scripts talking to a few backend
    > processes.
    >
    > 1) I was wondering if anyone has opinions on the ability of CGIHTTPServer (a
    > forking variant) to be able to handle this.


    Why not use apache?

    > 2) If so, would something like pyOpenSSL be useful to make such a webserver
    > SSL-enabled.


    I haven't used pyOpenSSL but I don't see any other way to do it. Well
    maybe mxCrypto which I haven't used either. The SSL socket library
    doesn't understand certificates.
     
    Paul Rubin, Jan 13, 2005
    #2
    1. Advertising

  3. Venkat B

    Peter Hansen Guest

    Venkat B wrote:
    > Hi folks,
    >
    > I'm looking build a CGI-capable SSL-enabled web-server around Python 2.4 on
    > Linux.
    > It is to handle ~25 hits possibly arriving "at once". Content is non-static
    > and built by the execution of py cgi-scripts talking to a few backend
    > processes.


    Twisted? I'm not sure what, if anything, it has in the
    way of CGI support, but that could probably be hacked
    on pretty darn quick if you needed. At least Twisted
    has support for server-side SSL (i.e. it can deal with
    certificates).

    -Peter
     
    Peter Hansen, Jan 13, 2005
    #3
  4. Venkat B

    Venkat B Guest

    > > 1) I was wondering if anyone has opinions on the ability of
    CGIHTTPServer (a
    > > forking variant) to be able to handle this.

    >
    > Why not use apache?


    Wanted something with less footprint.
     
    Venkat B, Jan 13, 2005
    #4
  5. Venkat B

    Larry Bates Guest

    You should probably take a look at:

    http://www.amk.ca/python/code/medusa

    Larry Bates
    Syscon, Inc.



    Venkat B wrote:
    > Hi folks,
    >
    > I'm looking build a CGI-capable SSL-enabled web-server around Python 2.4 on
    > Linux.
    > It is to handle ~25 hits possibly arriving "at once". Content is non-static
    > and built by the execution of py cgi-scripts talking to a few backend
    > processes.
    >
    > 1) I was wondering if anyone has opinions on the ability of CGIHTTPServer (a
    > forking variant) to be able to handle this.
    > 2) If so, would something like pyOpenSSL be useful to make such a webserver
    > SSL-enabled.
    >
    > I checked out John Goerzen's book: Foundations of Python Network Programming
    > (ISBN 1590593715) and searched around. While I found how one can write py
    > scripts that could communicate with SSL-enabled webservers, tips on building
    > SSL-enabled webservers isn't obvious.
    >
    > I was hoping to build a cleaner solution around the CGIHTTPServer variant
    > instead of say something like mini-httpd/OpenSSL/Python. I'd appreciate any
    > pointers.
    >
    > TIA,
    > /venkat
    >
    >
    >
    >
     
    Larry Bates, Jan 14, 2005
    #5
  6. Venkat B

    Steve Holden Guest

    Venkat B wrote:

    > Hi folks,
    >
    > I'm looking build a CGI-capable SSL-enabled web-server around Python 2.4 on
    > Linux.
    > It is to handle ~25 hits possibly arriving "at once". Content is non-static
    > and built by the execution of py cgi-scripts talking to a few backend
    > processes.
    >
    > 1) I was wondering if anyone has opinions on the ability of CGIHTTPServer (a
    > forking variant) to be able to handle this.


    I wouldn't even consider it. The *HTTPServer modules aren't really
    intended to be much beyond a proof-of-concept, IMHO. Certainly you'd be
    likely to stress the system having 25 requests arrive in a bunch, though
    a modern computer would probably handle it.

    > 2) If so, would something like pyOpenSSL be useful to make such a webserver
    > SSL-enabled.
    >

    There is a *lot* to do to SSL-enable a server. Since you advertise
    yourself as a newbie, I'd suggest there were better places to focus your
    efforts.

    > I checked out John Goerzen's book: Foundations of Python Network Programming
    > (ISBN 1590593715) and searched around. While I found how one can write py
    > scripts that could communicate with SSL-enabled webservers, tips on building
    > SSL-enabled webservers isn't obvious.
    >
    > I was hoping to build a cleaner solution around the CGIHTTPServer variant
    > instead of say something like mini-httpd/OpenSSL/Python. I'd appreciate any
    > pointers.
    >

    I believe the Twisted package may be your best alternative, though this
    is at best hearsay since I am not (yet) an active user.

    regards
    Steve
    --
    Steve Holden http://www.holdenweb.com/
    Python Web Programming http://pydish.holdenweb.com/
    Holden Web LLC +1 703 861 4237 +1 800 494 3119
     
    Steve Holden, Jan 14, 2005
    #6
    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. Id0x
    Replies:
    4
    Views:
    1,222
    Erik Max Francis
    Jul 21, 2003
  2. JohnE

    newbie with newbie questions

    JohnE, Aug 17, 2009, in forum: ASP .Net
    Replies:
    3
    Views:
    536
    Gregory A. Beamer
    Aug 17, 2009
  3. Jerry C.
    Replies:
    8
    Views:
    279
    Uri Guttman
    Nov 23, 2003
  4. Kruno Saho
    Replies:
    0
    Views:
    170
    Kruno Saho
    Apr 7, 2013
  5. Dave Angel
    Replies:
    0
    Views:
    147
    Dave Angel
    Apr 7, 2013
Loading...

Share This Page