The world trusts Google to deliver quality internet search results. And now, it's delivering your toilet paper, too.

That may sound like nonsense, but it's true, and it could lead to a weird new world where the stuff you need arrives at your side before you even realize you need it.

On Wednesday, Google announced that its same-day delivery service has emerged from its private testing phase and is now available to anyone in San Francisco and Silicon Valley who's willing to turn over a credit card number.

As with the competing eBay Now service, Google Shopping Express involves placing an order with nearby chain stores via an app or the web. A courier then picks up the order from the store and delivers it.

>As personal digital assistant apps such as Google Now become widespread, so does the idea of algorithms that can not only meet but anticipate our needs

These services differ in the details. eBay lets you shop at only one store at a time and promises delivery "in about an hour," while Google lets you shop at multiple stores and pick your own delivery time window. But both fit into an emerging category that has also captivated other big companies, including Amazon and Walmart. Local same-day delivery, a difficult logistical problem to solve on a large scale, has become an experimental playground for companies adept at solving big logistical problems – though all of these companies are moving into this game at slow and careful pace.

On one level, the business motivation is obvious: Whoever can deliver the most stuff the fastest with the least hassle wins. Online shopping is big and only getting bigger. And since all the big players can more or less match each other on selection and price, the shopping "experience" – of which delivery is a key part – becomes one of the few ways retailers can sell themselves as the better option.

But the game goes deeper. As personal digital assistant apps such as Google Now become widespread, so does the idea of algorithms that can not only meet but anticipate our needs. Extend the concept from the purely digital into the realm of retail, and you have what some industry prognosticators are calling "ambient commerce." In a sensor-rich future where not just phones but all kinds of objects are internet-connected, same-day delivery becomes just one component of a bigger instant gratification engine.

On the same day Google announced that its Shopping Express was available to all Bay Area residents, eBay Enterprise Marketing Solutions head of strategy John Sheldon was telling a roomful of clients that there will soon come a time when customers won't be ordering stuff from eBay anymore. Instead, they'll let their phones do it.

Sheldon believes the "internet of things" is creating a data-saturated environment that will soon envelope commerce. In a chat with WIRED, he describes a few hypothetical examples that sound like they're already within reach. Imagine setting up a rule in Nike+, he says, to have the app order you a new pair of shoes after you run 300 miles. Or picture a bicycle helmet with a sensor that "knows" when a crash has happened, which prompts an app to order a new one.

>'Ambient commerce is about consumers turning over their trust to the machine.' John Sheldon

Now consider an even more advanced scenario. A shirt has a sensor that detects moisture. And you find yourself stuck out in the rain without an umbrella. Not too many minutes after the downpour starts, a car pulls up alongside you. A courier steps out and hands you an umbrella – or possibly a rain jacket, depending on what rules you set up ahead of time for such a situation, perhaps using IFTTT.

"Ambient commerce is about consumers turning over their trust to the machine," Sheldon says.

Though it might be hard to believe, the logistics of delivering that umbrella are likely more complex than the math behind detecting the water. Delegating drivers along optimal routes is a notoriously difficult computing problem compared to the if-then logic of "water = order umbrella." In that context, the tentativeness of even the most powerful businesses in rolling out same-day delivery is understandable, as is their ambition to perfect it.

"The ability to both sense a need and fulfill on that need in that compressed a time frame is very, very powerful," Sheldon says.

Before that can happen, the smartest companies on the planet have to figure out whether same-day delivery on a wide scale is even doable. This explains why all of these services are still limited to a few cities, and in some cases have been for years. No one knows for sure yet whether its possible to make money on the promise of same-day delivery – or whether most shoppers even care about getting their stuff so quickly.

But clearly Google, eBay, and the others see some kind of potential here. And why shouldn't they? Between what these companies know about our interests, our friends, our whereabouts, our purchases, and anything else we're willing to feed them, whether by email, Twitter, Facebook, GPS, or credit card, they probably should have a very good idea of what we want and when and where we want it. Add in the even more granular data provided by the internet of things, and a future of ambient commerce seems not just possible but probable – a utopian future in which running out of toilet paper at the wrong time will never, ever happen again.