We all know that online shopping is revolutionizing the retail industry. Big bricks-and-mortar businesses are dying out as Amazon and eBay soar. Online retailers are obviously the big winners of this trend, but tech companies aren't the only way to invest in e-commerce. That's because everything you buy online has to be delivered to you. As e-commerce enters new retail segments and new parts of the globe, all that added delivery means big business for the world's largest logistics companies, UPS (NYSE: UPS) and FedEx (NYSE: FDX).

Despite the perception that e-commerce has taken over the marketplace, the growth runway ahead of online retailers remains long -- Internet sales account for only about 5% of all retail sales. As people become more comfortable purchasing a wider variety of goods online, and as technologies emerge that make it easier to replicate a "hands on" shopping experience, I expect e-commerce to grab a much larger share of the retail market.

Indeed, e-commerce has been growing by double digits in recent years, and that's been great for the parcel business. Retail items bought online have few other delivery options besides FedEx and UPS. That's because a delivery business requires huge upfront capital investments -- planes, trucks, sorting systems, warehouses and more, all on a national scale -- before it can even begin to compete. Even then, incumbent players already have millions of customers along established routes, giving them very dense operations that lower the per-unit cost of transportation.

With these advantages keeping competitors at bay, FedEx and UPS have been able to push through price increases in the domestic package delivery business. Domestic ground operations contribute over half of operating profits at both companies, in part due to the high margins they achieve, so the domestic increase in e-commerce will improve not only revenue but also profitability.

Going global
Right now, international parcel delivery is a smaller business, contributing only about a quarter of revenue at FedEx and UPS, but both companies see a lot of growth in emerging markets tied to e-commerce. For example, MercadoLibre (Nasdaq: MELI), a Latin American online marketplace in the mold of eBay, is benefiting from three big trends.

First, the population of Latin America is expanding. An increasingly larger percentage of all Latin Americans are using the Internet. And MercadoLibre is capturing a growing percentage of Internet users. As a result, sales volumes through MercadoLibre have skyrocketed.

Delivery services are prepared. UPS and FedEx are both expanding cautiously into emerging markets. In competing for global growth, FedEx and UPS have huge advantages over potential rivals due to their U.S. operations. An emerging economy likely will need to have strong trade connections with the world's largest economy, something only FedEx and UPS can provide.

Capturing the import/export business can then give the global operators a foothold in new countries from which to expand. Indeed, in its annual report, UPS details that it "typically follow[s] a pattern of entering a market through importing and exporting, expanding domestically with a partner or alliance, and then ultimately acquiring domestic operations where we see value and return." As the rest of the world starts to look more like North America in terms of online shopping, the delivery business is set to grow just as quickly. FedEx and UPS will dominate it.

Quality or value?
There's no question to me that UPS is the better company. It's bigger than FedEx, and in an industry with network effects, size really matters. UPS consistently earns much higher returns on equity, currently crushing FedEx 50% to 13%, and generally achieves better operating margins.

UPS also treats its employees better: Its drivers are unionized and relatively well-compensated, while FedEx has a more oppositional attitude toward its drivers. I generally prefer companies who treat employees as assets rather than liabilities, especially when those employees represent the company to customers.

However, that doesn't mean UPS is the better investment. Shares of UPS are priced for success, selling for 18 times earnings and nine times book value. Comparatively, FedEx looks like a fire sale: 13 times earnings and less than twice book value. So, quality or value?

Luckily, you don't need to pick. My favorite investing strategy when two companies operate a duopoly in a growing market is just to buy them both. If they maintain their grip on the market, then one's failure will be the other's success.

Of course, even a seemingly stable duopoly like FedEx and UPS should be on the lookout for risks, no matter how remote. One small industry has the potential to disrupt the entire delivery industry, by making delivery obsolete. Amazon founder Jeff Bezos has put millions of his own money into this industry, hoping that someday his customers will be able to buy, say, a pair of shoes, and have them instantly printed off right on the desk. Sound crazy? The Motley Fool has a special video report on this technology that could trigger a new industrial revolution, and how you can profit. This report is free, but it's only available for a limited time, so get your copy now.