Online retail colossus Amazon.com Inc. (AMZN) is regarded as the undisputed leader of the industry as it prepares to plunge into brick-and-mortar selling with its bid for upscale grocery chain Whole Foods Market inc. (WFM). But a Chinese e-commerce giant, JD.com Inc. (JD), already is far ahead of Amazon in the game of merging virtual stores with real ones. It has a strategic alliance with the world's largest brick-and-mortar retailer, Wal-Mart Stores Inc. (WMT), CNBC reports.

Outperforming Amazon

JD.com's share performance is worth noting for Amazon-obsessed investors. JD.com's ADR shares trading on the Nasdaq are up by 88%, while Amazon has gained 31% for the year-to-date through Wednesday's close. (For more, see also: These Techs Have Left FAANG Stocks in the Dust.)

The Alliance

A key to that outperformance is JD.com's ability to partner with Wal-Mart to exploit a Chinese online consumer market that's far bigger than the U.S. Wal-Mart entered China in 1996, and operates 433 store locations there, employing approximately 100,000 associates, according to the company's website. The alliance with JD.com began in June 2016, and resulted in Wal-Mart gaining a 5% stake in the Chinese company, per Wal-Mart's press initial press release. The concept was that that Wal-Mart would be able to tap JD.com's significant base of online customers and vast same-day delivery network, while JD.com's customers would gain access to a wide range of new and imported items from Wal-Mart and Sam's Club, according to Wal-Mart. Wal-Mart later increased its stake to about 12%.

The Win-Win

That strategy has worked. JD.com is offering its customers over 1,700 of Wal-Mart's most popular items from its retail stores across China, CNBC reports. Winston Chen, the president of JD International, told CNBC that the deal has the prospect of allowing his company to sell "a tremendous number of quality products not previously widely available in China." Meanwhile, Wal-Mart is stocking its stores with merchandise from JD.com, which allows that company to expand its fulfillment capabilities, with delivery times now "about 30 minutes," as Chen also told CNBC. China already is an important market for Wal-Mart, which generates about 33% of its non-U.S. sales revenue there, according TechCrunch, citing analysis by the Wall Street Journal.

Online Consolidation

The original deal wth JD.com in 2016 involved a number of steps. It included Wal-Mart's sale of its own Chinese e-commerce marketplace to JD.com, with Wal-Mart retaining the direct sales business and becoming a seller within the site, rather than its operator. The former Wal-Mart site, called Yihaodian, focuses on grocery items for an affluent female customer base, with its strongest presence in eastern and southern China. Wal-Mart took a minority stake in 2011, then bought it outright in 2015, according to Tech Crunch. However, with under 2% of the Chinese e-commerce market, Yihaodian was at competitive disadvantage to JD.com and Alibaba Group Holding Ltd. (BABA) which combine for over 80%, per data from iResearch cited by TechCrunch. A key difference between Alibaba and JD.com is that the latter owns its logistics system and specializes in fast delivery and fresh goods, per TechCrunch.

The success that JD.com and Wal-Mart are having in meshing virtual and physical stores in China shows just how far Amazon has to go in the U.S. Amazon may be the giant of e-commerce, but the Whole Foods merger may test how nimbly it can exploit the new and old worlds of retailing.

Want to learn how to invest?

Get a free 10 week email series that will teach you how to start investing.

Delivered twice a week, straight to your inbox.