Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

What anonymonk said. The whole (([PW]S)|C)GI is just the specification for how code talks with the server. In the same kind of way HTTP is a specification for how browsers talk to servers. The server used to only be things like apache back in the day. So it could directly execute scripts on demand, giving the script the environment variables the spec requires, and get back an HTTP response or the parts to complete. No other application layer necessary. No code held in memory to be re-executed persistently.

PSGI is just a newer standard that affords persistent and modern code connections (like streaming) better. WSGI is the Python version of PSGI. Plack is a suite of packages that implement the PSGI standard for Perl; the same way the CGI.pm package and friends implement the CGI standard for Perl.

I don’t think I’d recommend Catalyst to anyone at this point. It’s large and powerful and stable… but it’s also coasting on fumes and things like websockets are difficult while they are trivial in Mojolicious. uWSGI is an application engine, the persistence layer. So it’s what is running your code and managing the number of worker processes and hot restarts and such. It’s usually put behind a normal webserver like nginx or apache.

It is difficult to talk about this stuff tersely. I know it seems complicated at first. I remember spending like an entire weekend back in 1998 searching, probably altavista and yahoo at that point, trying to just understand what the fsck a “webserver” was. But this stuff is all mostly pretty easy, it just has a lot of moving parts. Something I wish I had started with instead of learning by osmosis and context is vanilla HTTP. That informs a huge amount of everything that follows.

Update: pulled some redundant words.


In reply to Re^9: Perl FCGI Error: mod_fcgid: error reading data from FastCGI server by Your Mother
in thread Perl FCGI Error: mod_fcgid: error reading data from FastCGI server by knox

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (8)
As of 2024-03-28 09:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found