With Cosmos DB, Microsoft wants to build one database to rule them all

Comment

Image Credits: Bryce Durbin /

“We want this to be the database of the future and to last for many decades to come,” Microsoft Technical Fellow Dharma Shukla told me when we talked about Cosmos DB, the new globally distributed database the company is launching at its Build developer conference today. And for Shukla, this is a project that started seven years ago when he started prototyping what a globally distributed (or “planet-scale,” as Microsoft often likes to call it) database would look like. This project (which at the time was called “Project Florence”) first turned into DocumentDB, Azure’s NoSQL database service, which launched in 2015 and is now morphing into Cosmos DB.

Cosmos DB is, in Shukla’s words, “a major leap forward” from what DocumentDB was able to offer. DocumentDB only offered a subset of the capabilities of what is now Cosmos DB. While DocumentDB was essentially a store for JSON data, Cosmos DB goes much further. It extends the idea of an index-free database system and adds support for various new data types that allows Cosmos DB enough flexibility to work as a graph database or key-value database, for example. And for those who are looking to store more traditional columnar relational data, Cosmos DB will also offer support for those.

All of this is driven by a mantra that you’ll almost inevitably hear when you talk to somebody from Microsoft’s developer division these days: “We want to meet developers wherever they are.” So while you could also use the MongoDB APIs to access your data in DocumentDB, Cosmos DB also features support for SQL, Gremlin and Azure Tables — and the team plans to launch a large number of similar driver and translation layers in the near future.

“No data is born relational,” Shukla told me. “In the real world, nobody thinks in terms of schemas — they think graphs or maybe JSON document if you’re an IOT device. […] We want to make sure that the systems we build have a common engine to efficiently map different data models.”

Given its heritage, it’s no surprise that Cosmos DB takes many of its cues from DocumentDB. One of those is the availability of tunable consistency models. If you don’t spend your days thinking about globally distributed databases, then consistency models may not exactly be all that important to you, but most competing database systems (including Google’s recently launched Cloud Spanner), only feature two consistency models: strong consistency and eventual consistency. With strong consistency, whenever data is written to the database, all the different nodes (which could be spread around data centers across the globe) have to agree on a new value before it becomes visible in an app, for example. That comes with some obvious performance trade-offs given the added latency of this. Eventual consistency is essentially a more lenient system where, over time, all the nodes don’t update simultaneously and instead come to agree on a value only after there hasn’t been any recent update for a while.

“What is unusual about Cosmos DB is that it provides different consistency models where the user gets a trade-off between how much consistency he gets over how much of a performance hit he takes,” Leslie Lamport, the Turing Award winner whose work underpins many of these concepts (and who also wrote the LaTeX document preparation system) and who joined Microsoft Research in 2001, told me. Cosmos DB offers three different flavors of consistency for different use cases. “Those kind of intermediary consistency guarantees sort of have been around in academic systems that people build to write papers around,” Lamport explained. Cosmos DB is among the first commercially available database systems to offer this variety of consistency models.

For Cosmos DB (and previously for DocumentDB), that means you can choose between a consistency model where reads are allowed to lag behind writes for only a certain amount of milliseconds, for example, or a model that focuses on offering consistency for a specific client session (in a Twitter-like app, for example), but where it’s not all that important that every user sees every write at the same time (or even in the exact same order).

As Shukla noted, though, his idea here was to build a database system that could last decades. To do this, he also brought in Lamport to teach the team TLA+. Lamport has long had a special interest in how developers spec out their applications. TLA+ is essentially a formal language for doing just that. “When we started out in 2010, we wanted to build a system — a lasting system. This was the database of the future for Microsoft,” Shukla told me. “We try to apply as much rigor to our engineering as we possibly can. […] TLA+ has been wonderful in getting that level of rigor in a team of engineers to set the bar high for quality.” TLA+, Lamport noted, allows you to do the high-level design of a system in a completely formal way — and because it’s done formally, it can be checked for correctness, too (and to be fair, AWS and others also use TLA+ to spec out their distributed systems). “I don’t want to give the impression that TLA+ is great and I’m brilliant. It’s great because it’s almost entirely based on mathematics,” Lamport added.

The Cosmos DB feels strongly enough about its engineering chops that it is also offering a number of SLAs that are somewhat unusual in the database space. While it’s typical to guarantee a certain degree of uptime, Microsoft also offers SLAs for throughput, consistency and latency. “The thing I’m super proud of — and we feel this is the legacy — it’s done with careful craftsmanship,” said Shukla.

It’s worth noting that, as is now a tradition at Microsoft, Cosmos DB has long been used internally at Microsoft. In its previous incarnation as DocumentDB, Cosmos DB currently serves “tens of thousands of customers,” Microsoft says, and stores petabytes of data.

Cosmos DB is now live in 34 Azure regions and is generally available, with all the SLA promises that entails. All existing DocumentDB customers (and their data) will automatically become Cosmos DB users.

More TechCrunch

After Apple loosened its App Store guidelines to permit game emulators, the retro game emulator Delta — an app 10 years in the making — hit the top of the…

Adobe comes after indie game emulator Delta for copying its logo

Meta is once again taking on its competitors by developing a feature that borrows concepts from others — in this case, BeReal and Snapchat. The company is developing a feature…

Meta’s latest experiment borrows from BeReal’s and Snapchat’s core ideas

Welcome to Startups Weekly! We’ve been drowning in AI news this week, with Google’s I/O setting the pace. And Elon Musk rages against the machine.

Startups Weekly: It’s the dawning of the age of AI — plus,  Musk is raging against the machine

IndieBio’s Bay Area incubator is about to debut its 15th cohort of biotech startups. We took special note of a few, which were making some major, bordering on ludicrous, claims…

IndieBio’s SF incubator lineup is making some wild biotech promises

YouTube TV has announced that its multiview feature for watching four streams at once is now available on Android phones and tablets. The Android launch comes two months after YouTube…

YouTube TV’s ‘multiview’ feature is now available on Android phones and tablets

Featured Article

Two Santa Cruz students uncover security bug that could let millions do their laundry for free

CSC ServiceWorks provides laundry machines to thousands of residential homes and universities, but the company ignored requests to fix a security bug.

19 hours ago
Two Santa Cruz students uncover security bug that could let millions do their laundry for free

OpenAI’s Superalignment team, responsible for developing ways to govern and steer “superintelligent” AI systems, was promised 20% of the company’s compute resources, according to a person from that team. But…

OpenAI created a team to control ‘superintelligent’ AI — then let it wither, source says

TechCrunch Disrupt 2024 is just around the corner, and the buzz is palpable. But what if we told you there’s a chance for you to not just attend, but also…

Harness the TechCrunch Effect: Host a Side Event at Disrupt 2024

Decks are all about telling a compelling story and Goodcarbon does a good job on that front. But there’s important information missing too.

Pitch Deck Teardown: Goodcarbon’s $5.5M seed deck

Slack is making it difficult for its customers if they want the company to stop using its data for model training.

Slack under attack over sneaky AI training policy

A Texas-based company that provides health insurance and benefit plans disclosed a data breach affecting almost 2.5 million people, some of whom had their Social Security number stolen. WebTPA said…

Healthcare company WebTPA discloses breach affecting 2.5 million people

Featured Article

Microsoft dodges UK antitrust scrutiny over its Mistral AI stake

Microsoft won’t be facing antitrust scrutiny in the U.K. over its recent investment into French AI startup Mistral AI.

21 hours ago
Microsoft dodges UK antitrust scrutiny over its Mistral AI stake

Ember has partnered with HSBC in the U.K. so that the bank’s business customers can access Ember’s services from their online accounts.

Embedded finance is still trendy as accounting automation startup Ember partners with HSBC UK

Kudos uses AI to figure out consumer spending habits so it can then provide more personalized financial advice, like maximizing rewards and utilizing credit effectively.

Kudos lands $10M for an AI smart wallet that picks the best credit card for purchases

The EU’s warning comes after Microsoft failed to respond to a legally binding request for information that focused on its generative AI tools.

EU warns Microsoft it could be fined billions over missing GenAI risk info

The prospects for troubled banking-as-a-service startup Synapse have gone from bad to worse this week after a United States Trustee filed an emergency motion on Wednesday.  The trustee is asking…

A US Trustee wants troubled fintech Synapse to be liquidated via Chapter 7 bankruptcy, cites ‘gross mismanagement’

U.K.-based Seraphim Space is spinning up its 13th accelerator program, with nine participating companies working on a range of tech from propulsion to in-space manufacturing and space situational awareness. The…

Seraphim’s latest space accelerator welcomes nine companies

OpenAI has reached a deal with Reddit to use the social news site’s data for training AI models. In a blog post on OpenAI’s press relations site, the company said…

OpenAI inks deal to train AI on Reddit data

X users will now be able to discover posts from new Communities that are trending directly from an Explore tab within the section.

X pushes more users to Communities

For Mark Zuckerberg’s 40th birthday, his wife got him a photoshoot. Zuckerberg gives the camera a sly smile as he sits amid a carefully crafted re-creation of his childhood bedroom.…

Mark Zuckerberg’s makeover: Midlife crisis or carefully crafted rebrand?

Strava announced a slew of features, including AI to weed out leaderboard cheats, a new ‘family’ subscription plan, dark mode and more.

Strava taps AI to weed out leaderboard cheats, unveils ‘family’ plan, dark mode and more

We all fall down sometimes. Astronauts are no exception. You need to be in peak physical condition for space travel, but bulky space suits and lower gravity levels can be…

Astronauts fall over. Robotic limbs can help them back up.

Microsoft will launch its custom Cobalt 100 chips to customers as a public preview at its Build conference next week, TechCrunch has learned. In an analyst briefing ahead of Build,…

Microsoft’s custom Cobalt chips will come to Azure next week

What a wild week for transportation news! It was a smorgasbord of news that seemed to touch every sector and theme in transportation.

Tesla keeps cutting jobs and the feds probe Waymo

Sony Music Group has sent letters to more than 700 tech companies and music streaming services to warn them not to use its music to train AI without explicit permission.…

Sony Music warns tech companies over ‘unauthorized’ use of its content to train AI

Winston Chi, Butter’s founder and CEO, told TechCrunch that “most parties, including our investors and us, are making money” from the exit.

GrubMarket buys Butter to give its food distribution tech an AI boost

The investor lawsuit is related to Bolt securing a $30 million personal loan to Ryan Breslow, which was later defaulted on.

Bolt founder Ryan Breslow wants to settle an investor lawsuit by returning $37 million worth of shares

Meta, the parent company of Facebook, launched an enterprise version of the prominent social network in 2015. It always seemed like a stretch for a company built on a consumer…

With the end of Workplace, it’s fair to wonder if Meta was ever serious about the enterprise

X, formerly Twitter, turned TweetDeck into X Pro and pushed it behind a paywall. But there is a new column-based social media tool in town, and it’s from Instagram Threads.…

Meta Threads is testing pinned columns on the web, similar to the old TweetDeck

As part of 2024’s Accessibility Awareness Day, Google is showing off some updates to Android that should be useful to folks with mobility or vision impairments. Project Gameface allows gamers…

Google expands hands-free and eyes-free interfaces on Android