An HTTP server that handles requests through I / O devices?
This question will probably only be answered for Unix-like systems that follow the "everything as file" idiom.
Would it be difficult to create a web server that mounts local devices to handle http traffic? This will allow the program to read raw HTTP requests from /dev/httpin
(for example) and write responses to /dev/httpout
. I think it would be nice, because it would allow me to create an http handler from any programming language that is capable of handling I / O streams.
I don't know where to start. Any suggestions for setting up such a system?
a source to share
I agree with Javier, checking standards like FastCGI , Rack , WSGI , or indoate OWIN . These interfaces mainly exist so that disparate software components can exchange HTTP messages on the same computer without using network sockets.
Personally, if I wanted to do this, I would use my favorite JVM library, Restlet (with Groovy or Jython perhaps ) and implement a custom one ServerConnector
that would construct the object Request
and then pass it on to the rest of the framework. This architecture flexibility is why I love Restlet.
a source to share