Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The section "TERMINOLOGIES > Servers" is more confusing than necessary #13

Open
milu71 opened this issue May 17, 2011 · 1 comment
Open

Comments

@milu71
Copy link
Contributor

milu71 commented May 17, 2011

In the PSGI spec, the section "TERMINOLOGIES" (which by the way I'd rename to singular - "TERMINOLOGY") contains an entry for "Servers" which raises some question as to what it is actually talking about.

It starts out with "Servers are web servers". Okay, we all know web servers. But then: "In PSGI specification it's a Perl process that's running inside an HTTP server (e.g. mod_perl in Apache), a daemon process called from a web server (e.g. FastCGI daemon) or a pure perl HTTP server." So FastCGI isn't a web server. Neither is plain old CGI, which isn't mentioned here.

Now I'm not 100 % sure what the actual intent is, but isn't it to present a list of the environments a PSGI application is supposed to be runnable from, such as presented on http://plackperl.org/ under the heading "Servers"?

Then, I think, the reference to "web servers" in the spec could be dropped, and "servers" should not be defined as "web servers" because as far as the PSGI application is concerned it is irrelevant whether there is an actual web server serving up the app to the world, or whether it's only a fake process that dumps everything to a diagnostic panel and is driven by a user clicking on a GUI.

The only thing the PSGI app should be concerned with is that it's a Perl process conforming to a certain interface vis-à-vis the application, like a bit like a Java Servlet container, only simpler. (Don't know the Python and Ruby pendants.) And it doesn't even have to be a server process, it could be an ordinary one-off process exiting after doing its one and only request.

So I think "PSGI container" would be much more appropriate as a term than "web server". I realize it's a bit late to make such an objection, though.

And maybe I'm getting it all wrong? 8-/ Wouldn't be the first time. :-)

It's me, by the way, the guy who reported that Plack filehandle bug on StackOverflow.

PSGI Response: What kinds of filehandles can be expected to work with PSGI, and Plack?
http://stackoverflow.com/questions/6011793

Best,

Michael

@miyagawa
Copy link
Member

You're right that a server is more of a PSGI application container - be it a command line program, standalone HTTP server, or a fastcgi daemon or CGI script.

Changing the servers instances with containers sounds like a radical change. I'd probably like to solve that confusion exactly inside Terminology here - it'd be like "Servers typically behave as web servers but it could be anything that runs PSGI applications...". I don't know, I'll accept patches ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants