Thanks to improved technology, a new batch of companies is closing in on the Holy Grail of e-commerce--reliable, profitable same-day delivery.One of the lessons to come out of the dot-com crash of 2000 was that same-day service for local delivery was a fool's pursuit. Kozmo and Webvan learned that lesson the hard way. A logistics nightmare with razor-thin margins, same-day delivery was where companies went to die.Lately, however, things have changed. With help from Big Data, mobile technology, and sophisticated algorithms to optimize the delivery flow, several companies are changing the way same-day local delivery is done. (That's without even mentioning Jeff Bezos's slightly spooky plan to ship items before you buy--see "Is Amazon Reading Your Mind?".) That's good news if you want your order delivered before you leave the office. It's bad news if you are in the local-delivery business. The competition just got tougher.InstacartA few big players--like Amazon--have recently started doing same-day grocery delivery, but Instacart is convinced it can do it better. Its secret? Big Data and an army of "personal shoppers" on call to buy, pick up, and deliver items from local grocery stores. When customers place orders on the Instacart website or app, the company's fulfillment engine calculates the optimal way to get those items off the shelf and to the customer.From there, the order is assigned to one of the personal shoppers using an app. The order often arrives to customers in around two hours, often for a delivery charge of less than $5. "We can predict how long it takes to pick individual items, check out at the store on a Sunday afternoon, and how long it will take to travel from Point A to Point B," says CEO Apoorva Mehta. The team also collects data on the deliveries themselves--things such as weather conditions and traffic patterns--so the next trip goes more smoothly.ZookalCollege kids are notorious for putting things off until the last minute, which is why efficiency is so important to Australian textbook-delivery startup Zookal. Zookal CEO Ahmed Haider streamlined his operations but was unable to avoid one kink in the supply chain--the Australian mail system. "We could get an order ready in a minute, but we had to sit around and wait for Australia Post to come," he says.To get around the limitations of traditional delivery, Haider is investigating the use of unmanned drones to deliver textbooks. A year before Jeff Bezos announced Amazon's intentions to use drone delivery service, Haider became a venture partner in Flirtey, a flying-bot service Down Under. Flirtey is seeking regulatory approval from Australia's Civil Aviation Safety Authority. Once approved, Zookal will be the first company to make use of Flirtey's unmanned delivery drones.PostmatesSan Francisco-based Postmates wants to become the world's go-to platform for same-day delivery of just about everything: lunch, office supplies, clothing, toys, you name it. Like the car service Uber, Postmates equips individual contractors with an iOS device, so that when an order is placed, it gets routed to the closest available courier. "The first factor is to decide who delivers," says Bastian Lehmann, the CEO and founder.The computer determines whether the size of the order requires a car or bike and then dispatches the right courier to complete the order. "Each delivery makes our system better," he says. Because the couriers play such a vital role, the company has Facebook groups and community events at which highly motivated couriers meet and exchange ideas.