In my previous article, I talked about three different ways enterprises use Hadoop. Thinking a bit more, you may have come to realize that the three usage patterns are very similar to how we use Tomcat. I will compare these two for commonalities and differences.
First of all, both Hadoop and Tomcat are Java based open source projects from Apache Foundation, thus copyrighted by the same Apache license. As a result, you can freely use Hadoop in the same way as you have used Tomcat in terms of license compliance.
Lost VMs or Containers? Too Many Consoles? Too Slow GUI? Time to learn how to "Google" and manage your VMware and clouds in a fast and secure HTML5 App.
Secondly, they are both container frameworks that simplify application development. In Tomcat case, it loads Web applications and dispatch a HTTP request to one of them which processes and returns HTTP response back to Tomcat, which forwards responses to a Web client like browser. The Tomcat developers don’t need to know the networking and multithreading, but write a small piece of code that implements interfaces required by Java Servlet spec to process request and return response.
Similarly, the Hadoop framework can distribute MapReduce jobs to nodes of a cluster which read in data, process it, and save the result on HDFS. The Hadoop developers don’t need to know the distributed processing, job scheduling, but write a small piece code that implement Hadoop interfaces as well. Although the IO channels are different (Tomcat from network, Hadoop from HDFS), the way to simplify programming model is quite similar.
Lastly, the usage patterns are very similar. The frameworks can be used as a framework, platform, or application. You can find out more details in the article.
Now, let’s look at the differences.
Obviously, Hadoop and Tomcat solve quite different problems: one for distributing big data processing, and the other for hosting Web applications. This difference makes Hadoop less feasible for hosting model than Tomcat because transferring big data over the network between enterprises and service providers is not efficient and not economic.
The difference also means two frameworks complement each other very well. The Tomcat can be used to build Web front end for submitting jobs and managing the Hadoop clusters.