Hacker Newsnew | comments | show | ask | jobs | submit login

I honestly don't understand why this is called a "web server", and not a "reverse proxy", which is what it appears to be.

I also don't understand what "self-hosting" means for a reverse proxy written in C. It appears to mean "it compiles and runs", which would be a curious use of the word "self-hosting".

The section "Let this sink in for a moment" appears to extoll the following revolutionary notion: when you contact backends through TCP or a messaging library with bindings for many languages, these backends can be written in many languages, and the proxy won't care. To that amazing achievement I would add the following little-known astounding fact: when you visit a web site with your browser, the web server answering the request could be written in any programming language with decent networking libraries, and the browser won't care. The browser "loves all languages equally!". I believe this to be an early forerunner of this amazing language-agnostic technique that mongrel2 will now fully popularize to the programming masses.




Well, this is only the beginning. Right now it proxies, and that was one week or so of work. Next it will really pick up web server features: routing, configuration, serving files, etc.

That's why "Self-Hosting" was in quotes. It's self-hosting in that I can serve the chat demo up and that proves out the design. That was my goal for this week.

Now, yes, your web server can take one HTTP request and hand it to one backend. Applause all around, it is "language agnostic". Oh, well after you write an HTTP server in every language. Oh, and for only one request. Oh, and to only one backend. Oh, and the response can go to only one frontend server. Oh, and except that every web server thinks everything is a "file". Oh, and then there's that nasty config you dare not change. Oh, and when you want to add another 100 backends you gotta change every frontend to be aware of them.

And so on. The revolutionary part is with Mongrel2 I'm trying to break the 1:1 mapping of REQUEST:RESPONSE so that you can have N:N mapping easily, and that backends can be simple 0mq handlers of JSON and in any language. You can have N requests map to arbitrarily any N backends and they can respond to any N frontends asynchronously.

That's how the chat demo works right now. I get a request, and then the backend replies to the front end to deliver messages to all connected browsers. I could even start up 10 backends without changing one thing in the front end. Try that with current web servers without tons of hacks.

Another way to put this, and much more simply, is that right now web servers need to know every little thing about your backend architecture, and they force you to cram it into the concept of "files at URLs". Mongrel2 will not care what your backend is as long as it responds, and it won't constrain to everything being a cohesive file or even HTTP.

-----




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: