The incredible story of Ashish Gupta - how a humble techie from Ludhiana engineered Flipkart’s scaleAlok Soni
Between 2012 and 2017, Flipkart grew more than 20 times in revenues. A large part of that growth can be attributed to systems shaped by Ashish Gupta, our Techie Tuesdays’ candidate for the week.
When we restarted Techie Tuesdays in early 2017, we decided to take it a level ahead. We wanted to give more reasons to techies across India and the globe to connect with the some of the best minds in their field. We made sure that this column isn’t just about what did they build, but also how they did it, what it led to, who they are and why you can do it too. Looking back, it appears to be a great idea apart from one point. These people are often so busy building systems and technology that they miss out on speaking about it. And why should they? Usually, they are not used to opening up these details of their life and work to the public. That’s why for almost all individuals featured in Techie Tuesdays, it happens to be their first detailed (biographical) profile in the media.
Ashish Gupta, this week’s Techie Tuesdays’ candidate, is no exception. He has devoted more than two decades of his life working on challenging problems in technology. In his last assignment at Flipkart, he built systems that could support the massive growth of the e-commerce giant. Currently, he’s building and leading the India team of cloud data management company Rubrik.
Here is the story of a boy from Ludhiana who is building the best of tech and tech teams out of India.
A family of scholars
Ashish was born and brought up in a professor's family in Punjab Agricultural University campus in Ludhiana. Both his parents were professors. Ashish proudly shares that his father did his PhD in genetics just two years after Watson and Crick discovered DNA.
His father’s love for music was inherited by Ashish and the LP vinyl record player, along with a state-of-the-art stereo system, became the highlight of his life growing up. He maintained a library of cassettes and LP records.
Ashish got an idea of engineering for the first time in his life when his father passed down a 50-year-old toy to him when he was around six years old. The Meccano set, which first belonged to Ashish’s grandfather, comprised reusable metal strips, plates, angle girders, wheels, axles and gears and high quality plastic parts that could be connected using nuts, bolts and set screws. The set could be used to build working models and mechanical devices like cycles, cars, buildings. Ashish built an Eiffel Tower, which even had a working lift (using the pulley system).
His very first computer
When Ashish’s father heard about database for the first time in year 1986-87, he became keen to store his research in a searchable database. He, along with Ashish, went to The Calculus, India’s first IT retail outlet in Delhi. He couldn’t stop noticing Ashish’s excitement when the shop owners were giving a demo. Finally, he brought home an IBM PC 80 (PS/2; which had an 80386 chip) and database software. He also bought another fully functional desktop (similar to Sinclair) for Ashish. It only had RAM so as soon as it was switched off the program would vanish. Soon, Ashish learnt that using a mono tape it was possible to store a program.
He recalls, “It was almost magical to see how these programs could be stored. I was equally surprised to see and learn about the floppy disc later.”
The next year, Ashish built a program for an astrological chart using BASIC programming language. He recalls having a tough time drawing it as he only knew how to draw horizontal and vertical lines; the chart needed diagonal lines as well. Eventually he figured it out and gained an introduction to linear equations (y=mx+c).
The techie among the biologists
Everyone around Ashish was a biologist but he wasn’t sure about going in that direction. He questioned his sister, a medical student, about the curriculum and realised that it wasn’t his cup of tea. He chose non-medical (Maths Science) in Class 11. Simultaneously, he also joined Agarwal Classes and Brilliant Tutorials correspondence courses to prepare for the Joint Entrance Examination (JEE).
He recalls, “I didn't know calculus in the beginning and used to get disappointed when I couldn't solve IE Irodov [book] problems.”
His craze for JEE was so high that when he went to appear at the JEE examination in Chandigarh with his friend, the duo wrote “JEE Aspirants” on the back of their car. Eventually, he got an All India Rank ~240 and joined the electrical engineering course at IIT Delhi.
The ‘Professor’ at IIT Delhi
In his second year, Ashish got interested in computer architecture. That stayed with him for almost 10 years. His friends at IIT called him professor because they thought he would pursue a PhD in Digital Signal Processing and Computer Architecture after his graduation.
While at college, he worked on multimedia content-based search embedded in a browser. Mosaic browser's source code had just opened up (by NCSA) then. He downloaded the code and inserted a search bar inside the browser where it could search through a set of servers in all machines in the local network.
He explains, “We had small daemons running in different servers which would search, index the content and bring merged results as links to the machine on which you were running the browser.”
Towards his final year, Ashish started gravitating towards real-world problems. After graduation, he joined IBM in Bengaluru where he provided support for IBM AIX modules. But soon, he started looking for complex problems and grabbed the first opportunity he saw. Through IBM, he went to the Silicon Valley to work at Compression Labs, a video conferencing vendor. He developed an encryption module for a H.320-based video-conferencing system running VRTX RTOS.
The networking world at Cisco
In 1998, Ashish joined Cisco and worked in the platform redundancy team with a goal to achieve 99.999 percent up-time/reliability/ serviceability using voiceover IP and voiceover ATM (Asynchronous Transfer Mode). He then worked on adding a few features into a micro-coded network processing engine. This was his first foray into Assembly (programming language).
He explains, “We reverse-engineered an entire microcode from the processor of a Boston-based company (which Cisco worked with). We wrote documents to map out the whole code and added new features Cisco wanted to add.”
Ashish also worked on circuit emulation over ATM and added 2-3 protocols that were, so far, not supported by anyone. Unfortunately, this project didn't find any customers because ethernet and IP were upcoming technologies. Catalyst switches suddenly gained a lot of popularity in Cisco and a lot of VAN protocol started coming on Ethernet-based backplane and Ethernet-based core switching. Ashish moved from ATM to Ethernet, which was the core Internet Operating System (IOS) of Cisco. He was a part of the 11-member Toaster (unofficial name of a 16-processor chip that Cisco had) team.
The second time offer
After spending three years at Cisco, Ashish’s boss, who he had great respect for, moved on and invited him to join his startup. Ashish didn't join him then. But a few years down the line, when his boss asked again, Ashish agreed to join his wireless technology startup, Firetide Networks.
Mesh wireless (peer-to-peer WiFi) was a new technology then and the company had 4-5 patents in mesh wireless.
Ashish says, “We [Firetide Networks] were making these networks stable and converging in the presence of lot of failures and losses taking place at the links. We were able to clock 180Mbps over a 27-km link.”
Ashish worked on the routing protocol code.
For example, Firetide Networks had 2,000 cameras spread across Chicago running on its network and a centrally located control room had access to live data from all these cameras. The backhaul from the feeds from all the cameras was completely over wireless.
Ashish explains, “Every node is a transmitting feed, not only for itself but also for all the cameras behind it. The camera would be co-located with wireless nodes and these nodes would've antennas to connect to the nearest wireless nodes. It would form a wireless mesh across the city. And this mesh would be transmitting video to the corner of the city where the control room existed.”
Using this technology, the police control room (network) up-time went up to 99 percent and Firetide Networks became popular among police departments across the US and other countries.
In 2005, Ashish’s father was diagnosed with cancer and he shuttled between the US and India. A few months later, he decided to move back to India. By this time, his wife had completed her PhD in psychology.
The India story
Ashish joined Mobera Systems, a Chandigarh-based services startup doing cutting-edge work in networking technology. It was run by his friends who had moved back from the Bay area. He stayed there for almost two years and worked in network security protocol for a few clients. However, when he realised the lack of a challenge, he decided to move on.
Ashish returned to Firetide Networks. “I was given the task of building the India team [in Bengaluru], which was facing attrition”
Very soon, he realised that the root cause was the way team was structured and the lack of independence.
Rather than merely being a sister team of US counterparts, we decided to drive an independent project from India. This was a risky proposition and I asked for three months to make it work.
Ashish and his team in India took up the task of solving the mobility problem, which was basically video (live streaming data) transmission from a moving train/bus to a control room. They had to do switching from pole to pole (beside the tracks) with trains moving at a speed of 80km/hour. Metro installations were coming up with the need for live video surveillance and Ashish wanted to get into that. In a month's time, his team came up with the “monkey algorithm”.
“We put two radios on the node on the train where one radio would be connected to the previous pole and the other radio would be scanning for the other pole. It was ‘make before break’, similar to a monkey which holds the next branch before letting the previous branch go,” he explains.
This helped convince the Chief Engineer at Bangalore Metro and he chose Firetide Networks' solution over others. Ashish was also building a solution for Seoul Subway (it was mostly on tunnels so there was the issue of self-interference from the walls). For this, he came up with the “leap of faith” algorithm, which defined the right time for antennas to switch from pole to pole where you only move(switch) if the signal strength meets a minimum level. In total, Ashish’s team built 8-9 patents out of India around the same technology.
Even though the company offered cutting-edge technology, it wasn't doing great in business; this left Ashish frustrated. Netgear, a licensee for Firetide Networks, acquired half of the 60-member team, which was working on mesh, and started Netgear India.
However, Ashish wasn't keen on joining Netgear as he doubted if there was enough to learn for him in the (networking) industry. He decided to move to another industry that needed innovation.
In 2012, he spoke to Amazon, Google, Microsoft and Flipkart, and found Flipkart the most “exciting”.
I met Amod Malviya, Sachin Bansal, Binny Bansal and others, and liked the great depth, clarity and passion the team had. I told them I've never written a line of Java code, I've no idea of e-commerce and internet as an industry, but I know how to deliver great solution, how to build a world-class team and how to have them deliver solutions to problems that have never been solved.
Building horizontally scalable systems at Flipkart
In 2012, Ashish joined Flipkart to start the retail engineering team. This was to replace the existing Microsoft Excel (maintained manually for pricing, buying, inventory planning) by a horizontally scalable web-based system for retail decision-making. Without automating the decision-making process of pricing, discounting and inventory planning (what to buy, how much to buy, whom to buy it from), it would have difficult to support the growth of the number of products from 10 million to 40 million in a year.
He says, “We realised the need to build forecasting models and started a team for demand forecasting. We used the data of viewing and buying (how many people viewed the product and how many of them bought) to help pick the right model for pricing.”
Ashish looked at the elasticity curve of demand and price and noticed things like the impact a Rs 10 price change had on the demand for pen drives.
The retail engineering team followed the minimum operating price models for some products, while for a few the price was completely set by the business team.
However, the bigger problem was on the buying side where the company wanted to be in-stock but not over-stock while being within the budget of buying.
Ashish says, “We had to figure out how to place the right amount of inventory in the right location for the best SLA or delivery time to the consumers and ensure that it did not go out of stock very soon. And this had to be cost-effective as well.”
While manual methods could take the inventory to 70-75 percent in stock, demand forecasting models took it to 90-95 percent.
While figuring out the costs of buying, Ashish learnt about the lack of data at accounting level. He then started a retail accounting team and implemented an equivalent of a SAP/Oracle Financial accounting package internally.
“We captured every point at which the goods were flowing, as an event in the ledger. All this data became available as granular cost data and we were able to bring down our cost of procurement and minimise our dead stock,” he says.
Facing payment efficiency and reconciliation
To understand the problem of unreconciled invoices, Ashish started visiting warehouses. He learnt that goods coming to Flipkart warehouses had just paper challans and in absence of digitisation, there was no way to do a three-way reconciliation (what was ordered, what was received, what was invoiced), when the challans were lost.
Almost a third of paper invoices were reported lost and there was a big pile of invoices that was not reconciled because of which Flipkart couldn't pay vendors on time. This became a huge issue for the buying team.
Ashish and his team implemented ways in which through barcoding and digitisation at gate, they could track each box and its delivery challan. They automated the purchase order life cycle and payments collection. Ashish says, “It wasn't just OCR technology. We could reconcile every item in the invoice back to the purchase order [and what was received]. It created the ability to handle paper-based transactions otherwise and not lose any data.”
This was a five-month project and as a result, hundreds of crores of unreconciled invoices shrank to a crore and payment efficiency went from 36 percent to 99 percent.
Working on this problem made Ashish realise that there are a lot of ground-level problems in the ecosystem.
He says, “You have to play the way things are and not expect it to be API to API compliant. As a commerce company, you've to take the burden of solving all these problems before getting to the first-world problems of forecasting.”
Ashish knew that all the innovations had to happen at the ground level before coming to esoteric modelling. This also gave Flipkart an edge when Amazon entered the Indian market because Flipkart had fixed many ground-level problems and those specific to Indian customers.
The demand-shaping platform for Flipkart
In 2015, Flipkart moved to a 100 percent marketplace model and Ashish oriented the whole retail engineering team along with its models into services (buying, discounting) that could be offered to sellers. It was called the demand-shaping team.
Later, he took over the catalogue team to help solve the problem of misclassification of products. Flipkart was adding seven lakh products per day into the catalogue. One of the biggest problems the e-commerce firm was facing was the poor quality of the data in the catalogue for items other than head items. This could be fixed by information extraction and automatic categorisation of these products from the sellers' feed.
Ashish says, “We started addressing that problem at scale by applying machine learning and computer vision.”
“The data science team in the US (called F7 labs, which was acquired in the beginning of 2016) worked on algorithms and we worked on the platform to make them live and operationally correct,” he adds.
Ashish had decided early on to not take any established ERP solutions because they were all vertically scalable and didn't quite know commerce in his opinion. He implemented the concepts from the existing ERP models in a horizontally scalable way to support an increasing number of products and customers.
“This was not just for supply chain part but for decision-making as well. All big players in e-commerce created their own ERP,” he says.
In his five years at Flipkart, the company saw a 20 times growth in revenues which Ashish believes was largely possible because a lot of decision-making could be done through horizontally scalable systems.
Switching gears with Rubrik
Towards the end of 2016, Ashish met Arvind Jain, co-founder of Rubrik, who wanted to start the Rubrik India team. Ashish found Rubrik’s plan a revelation of sorts.
He says, “There’s a large untapped market of managing data for enterprises. The way data is managed for individual consumers is way more efficient (as compared to that of enterprises).”
Ashish believes that enterprises have on-premise secondary and tertiary storage and have operated in the same way for almost two decades. According to him, cloud is the ability to do analysis to scale and to be agnostic of hardware failures.
“None of these horizontal scalable fault-tolerant architectures (Google file systems, HBase, Bigtable, Cloud spanner) have been applied to managing data at enterprises,” he says.
The number of unsolved problems in this space excited Ashish. He has a huge regard for Arvind and the Rubrik team.
“In my 21-year career, the amount of learning in the last six months is the highest. Data management is a lot more than backup and recovery. There wasn't any infinitely scalable fault-tolerant way to manage data. Rubrik created a whole new distributed file system optimised for data management,” he says.
Ashish joined Rubrik Inc to build the India team and make it equivalent to the US counterparts.
You may also like - Meet Vibhore Sharma – the self-taught technologist who’s CTO of Naukri.com
Lessons in team building and life
Ashish has successfully built three teams in India over the last decade. While hiring, he looks at the following attributes to make his dream team:
- The foundational aspect is to have problem-solving caliber of the highest level.
- The key aspect is the hunger to solve real-world problems and create an impact.
- Next, what has the person done to follow their curiosity and how deeply have they gone to pursue their passion?
Ashish likes to be with people who “have hunger“ and are deeply passionate and focused about what they are solving. This is what attracted him to Flipkart. And this is what got him to Rubrik as well.
He believes in grit, persistance, depth of understanding and relentlessness. He has never stopped believing in the ability to bounce back in the face of failures.
In the future, Ashish wants to continue to go deep in solving every tough problem out there and to channelise the enormous energy of sharp minds by pairing them with these problems. This joy of problem-solving and creating an environment of excellence keeps him going.