Big Data – Web Application Services – Node.js versus Tornado


(T) To cover the capital investments (CAPEX) and the operating investments (OPEX) required for a cloud-based infrastructure such as the ones from Facebook, Yahoo, or Amazon, in order to provide a consumer Web-based service, you will need to come up with a business case that generates several billions of dollars a year. To provide a Web service to over 100 millions of consumers, you will probably need to invest over a billion dollars to build a data center. To operate that datacenter, you will probably need to spend over a hundred millions dollars a year.

Emerging cloud-based applications have three attributes: first they need to support thousands of concurrent users and clients; second, they are data-intensive: they process a lot of data and generate in that process more data; and third they are real-time.

Among emerging development platforms for backend Web services, go to any conference, and you will hear about Node.js.

While JavaScript is the de-facto standard to integrate scripts into Web pages, Node.js does not implement JavaScript for frontend but for backend applications. The large number of developers with JavaScript expertise has certainly contributed to the success of Node.js.

In a nutshell, Node.js provides server-side C/C++ libraries that run into a JavaScript (JS) engine. The JS engine is based on open source Google’s V8, written in C++, and implemented in Google Chrome. In addition, to Chrome V8 C++ libraries, Node.js adds a number of key networking libraries for TCP/DNS/HTTP.

In order to scale to a large number of clients, and to provide real-time intensive data applications, Node.js architecture is event-driven and performs asynchronous and non-blocking I/Os at the kernel layer. This architecture is more efficient in terms of CPUs and memory than a synchronous blocking I/O architecture that requires more threats to support the direct associations to the network connections. By not systematically associating connections and threads, Node.js needs only a main event loop thread, and many but fewer kernel threads to perform the required I/Os.

Node.js was created by Ryan Dhal while working at Joyent. It is part of Joyent’s cloud offering SmartOS.

However, if you have a pure Web background, you are likely to have designed many Web sites in Python and Django. An alternative but less popular to Node.js is Tornado.

Tornado has a very similar architecture to Node.js but is written in Python instead of JavaScript. Tornado was created by Bret Taylor for social media updates FriendFeed, a company that was acquired by Facebook. Tornado is now part of Facebook Open Source contributions.

Copyright © 2005-2012 by Serge-Paul Carrasco. All rights reserved.
Contact Us: asvinsider at gmail dot com.

Categories: Back-End, Open source, Web