While the premise of picking up lunchboxes and delivering at work places sounds simple, there is a highly sophisticated and more than a century old process that quietly works behind the scenes. The efficiency of the process has earned the Dabbawalas a six-sigma rating from Forbes magazine. The Six Sigma quality certification was established by the International Quality Federation in 1986, to judge the quality standards of an organization. There are more than 5000 Dabbawalas who deliver over 300,000 lunchboxes everyday covering every nook and corner of Mumbai. Braving extreme weather conditions which is common during the monsoon season in Mumbai, the Dabbawalas manage to deliver the boxes on time every working day. The local Dabbawalas at the receiving and the sending ends are known to the customers personally, so that there is no question of lack of trust. Also, they are well accustomed to the local areas they cater to, which allows them to access any destination with ease. They rely on bicycles, carriages and the local trains to transport the lunchboxes during the round trip. On an average, every lunch box changes hands four times and travels 60-70 kilometres in its journey to reach its eventual destination. Each box is differentiated and sorted along the route on the basis of markings on the lid, which give an indication of the source as well as the destination address. Here is a quick summary of the steps that take place from the time the lunchbox is picked up at the home and gets returned by evening.
The process is just reversed in the evening to return the empty lunchboxes.
If you are familiar with MapReduce, this should already ring a bell. Almost a century before Google published the GFS and the Google MapReduce papers, the Mumbai Dabbawalas mastered the algorithm of MapReduce for their own, efficient distributed processing! For the uninitiated, Apache Hadoop is a framework to process large amounts of data in a highly parallelized and distributed environment. It solves the problem of processing petabytes of data by slicing the dataset into individual chunks that can be processed individually by inexpensive machines in a cluster. Apache Hadoop has two components – 1) A file system called HDFS that is designed to deal with the distributed data in a highly reliable way and, 2) the MapReduce engine that processes each slice of the data by applying the algorithm. For example, the Indian Meteorological department would have recorded the temperatures of each city on a daily basis for the last 100 years. Undoubtedly, this dataset would run into a few Terabytes! Imagine the computing power that is required to query this dataset to find the city with the highest temperature in the last 100 years. This is exactly where Hadoop can play a role! Once the Terabyte sized dataset is submitted to HDFS, it would slice the dataset into equal chunks and distributes each chunk to a machine running within the cluster. Then, the developer would need to write the code in two parts – 1) The code that finds the maximum temperature per each slice of dataset running on each machine (Mapper) and, 2) the code that can collect and aggregate the output of the previous step to find the city with maximum temperature (Reducer). MapReduce is precisely the algorithm that helps developers perform these two steps efficiently. If the developer writes the MapReduce code to find the city with the maximum temperature on a tiny dataset with just a few records, that same code will seamlessly work against Petabytes of data! Effectively, Apache Hadoop makes it easy to process large datasets by letting the developers focus on the core logic than worrying about the complexity and size of the data. In between the Map and Reduce phases, there are sub processes to shuffle and sort the data to make it easy for the reducers to aggregate the results. Below is an illustration of MapReduce process.
Now that we have explored both the models, let’s compare and contrast the Mumbai Dabbawala methodology with Apace Hadoop.
Just like the way each node in the cluster does its job without the knowledge of other processes, each Dabbawala participates in the workflow just by focusing on his task. This an evidence of how a parallelized environment can scale better.
It is fascinating to see how the century old Dabbawala system has adopted an algorithm that is now powering the Big Data revolution!
PS – I have intentionally simplified the description of Apache Hadoop and used the Indian Meteorological scenario only for illustration purposes. The solution to this problem can be achieved just with a Mapper.
- Janakiram MSV, Chief Editor, CloudStory.in