Today, megacities have become synonymous with economic growth. In both developing and developed countries, cities with populations of 10 million or more account for one-third to one-half of their gross domestic product.
Many analysts and policymakers think this trend is here to stay. The rise of big data analytics and mobile technology should spur development, they assert, transforming metropolises like Shanghai, Nairobi and Mexico City into so-called "smart cities" that can leverage their huge populations to power their economies and change the power balance in the world.
As technology researchers, however, we see a less rosy urban future. That's because digitisation and crowdsourcing will actually undermine the very foundations of the megacity economy, which is typically built on some combination of manufacturing, commerce, retail and professional services.
The exact formula differs from region to region, but all megacities are designed to maximise the productivity of their massive populations. Today, these cities lean heavily on economies of scale, by which increased production brings cost advantages, and on the savings and benefits of co-locating people and firms in neighbourhoods and industrial clusters.
But technological advances are now upending these old business models, threatening future of megacities as we know them.
Manufacturing on the fritz
One classic example of a disruptive new technology is 3-D printing, which enables individuals to "print" everything from ice cream to machine parts.
As this streamlined technique spreads, it will eliminate some of the many links in the global production process. By taking out the "middle men," 3-D printing may ultimately reduce the supply chain to just a designer on one end and a manufacturer on the other, significantly reducing the production costs of manufactured goods.
That's good for the profit margins of transactional companies and consumers, but not for factory cities, where much of their transportation and warehousing infrastructure may soon become redundant.
In short, 3-D printing has transformed the economies of scale that emerged from industrialisation into economies of one or few. As it spreads, many megacities, particularly Asian manufacturing centers like Dongguan and Tianjin, both in China, can expect to see widespread disruption to their economies and work forces.
Decline of the shopping mall
The retail sector is experiencing a similar transformation. Shopping malls, for example, which once thrived in megacities, are now suffering from the advent of e-commerce.
The value proposition of shopping malls was always that their economies of scale were location-dependent. That is, for malls to be profitable, they had to be sited near a large consumer base. Densely populated megacities were perfect.
But as stores have moved online, megacities have lost this competitive advantage. While online shopping has not completely replaced brick-and-mortar retail, its ease and convenience have forced many shopping malls to close worldwide. In the US, mall visits declined 50 percent between 2010 and 2013.
Cities in China, where the government has sought to build its national economy on consumption, will be hit particularly hard by this phenomenon. China has the world's largest e-commerce market, and it is estimated that one-third of the country's 4,000 shopping malls will shut down within the next five years.
As mobile technology continues its spread, accessing even the most remote populations, this process will accelerate globally. Soon enough, retail websites like Amazon, Alibaba and eBay will have turned every smartphone into a virtual shopping mall, especially if the dream of drone delivery becomes a reality.
The new work force: Robots, AI and the human cloud
Changes in the business world will also affect cities worldwide.
Even in jobs that cannot be easily automated, the digitized gig economy is putting people into direct competition with a global supply of freelancers to do tasks both menial and specialized.
There are certainly benefits to crowdsourcing. Using both AI and the crowdsourced knowledge of thousands of medical specialists across 70 countries, the Human Diagnosis Project has built a global diagnosis platform that's free to all patients and doctors - a particular boon to people with limited access to public health services.
But by taking collaboration virtual, the "human cloud" business model is also making the notion of offices obsolete. In the future, medical professionals from various specialities will no longer need to work near to each other to get the job done. The same holds for other fields.
In a world without office space, traditional business and financial centers like New York and London would feel the pain, as urban planning, zoning and the real estate market struggle to adjust to firms' and workers' changing needs.
Crisis in the making
At some point, all this change may end up meaning that economies of scale matter much, much less. If that happens, population size - currently the motor of the modern metropolis - will become a liability.
Megacities have long struggled with the downsides of density and rapid urbanisation, including communicable disease, critical infrastructure shortages, rising inequality, crime and social instability. As their economic base erodes, such challenges are likely to grow more pressing.
The damage will differ from city to city, but we believe that the profound shifts underway in retail, manufacturing and professional services will impact all of the world's seven main types of megacities: global giants (Tokyo, New York), Asian anchors (Singapore, Seoul), emerging gateways (Istanbul, São Paulo), factory China (Tianjin, Guangzhou), knowledge capitals (Boston, Stockholm), American middleweights (Phoenix, Miami) and international middleweights (Tel Aviv, Madrid).
And because 60 percent of global GDP is generated by just 600 cities, struggle in one city could trigger cascading failures. It's conceivable that in 10 or 20 years, floundering megacities may cause the next global financial meltdown.
If this forecast seems dire, it's also predictable: Places, like industries, must adapt with technological change. For megacities, it's time to start planning for a disrupted future.