Posts

Showing posts from November, 2013
A Snake in the Whirlwind Non-blocking I/O web servers are kind of a newish thing around, so there aren't many of them at the moment. Web servers are aplenty. Few of them, called lightweight web servers , are supposed to be very fast. But these are all general purpose web servers and none of them is programable by web application developers. This relatively new kind of non-blocking I/O web servers based on some server-side scripting languages is in another category whatsoever. These are libraries/frameworks used for writing network applications, and not really web servers. Actually, application that you write becomes (or contains) your very own web server. Tornado is the first of the kind to be reviewed here. Before we proceed to it just brief discussion on sockets, which was perhaps due in the post about non-blocking I/O, but better late than never. Protocols, Ports and Sockets On Unix, including its derivatives like Linux, everything is a file . Including I/O d
Image
Test site You might have noticed beautiful blue button to the right with the inscription “Test site”. If you venture to click on it, web page http://web-appz.hp.af.cm/ will open in the new tab. In it you'll see this:                             Node.js testing site for web-appz.blogspot.com I agree, it's not much. To be honest it is less than “not much”, but it is a beginning. Behind the page is this illustrious code: var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/html'}); res.end('Node.js testing site for <a href="http://web-appz.blogspot.com">web-appz.blogspot.com</a>'); }).listen(process.env.VMC_APP_PORT || 1337, null); The experience with appfog was so satisfactory that I think it would be fair to share it. AppFog https://www.appfog.com/ is where the test site is hosted. I went there, I clicked “Sign Up” and was redirected to their s