Discovering Cosmos: The Database for the Global Economy
Microsoft’s Cosmos isn’t a new database. It’s been around since 2010. But when coupled with Azure, its globally-distributed database in the cloud model seems ideal for business app developers in 2020.
“Cosmos DB enables you to build highly responsive and highly available applications worldwide,” touts Microsoft in its introduction to its NoSQL database. “Cosmos DB transparently replicates your data wherever your users are, so your users can interact with a replica of the data that is closest to them.”
The proximity of data to users is important because speed thrills when it comes to building business apps in the global mobile world. Users expect to see the information they need in a blink of an eye and that’s what Azure Cosmos provides.
“You can elastically scale throughput and storage, and take advantage of fast, single-digit-millisecond data access using your favorite API including SQL, MongoDB, Cassandra, Tables, or Gremlin,” Microsoft explains.
The elastic scalability of Azure Cosmos provides the flexibility business apps need where market demands can go up and down within hours, minutes or even seconds.
“You can elastically scale up from thousands to hundreds of millions of requests/sec around the globe, with a single API call and pay only for the throughput (and storage) you need,” according to Microsoft. “This capability helps you to deal with unexpected spikes in your workloads without having to over-provision for the peak.”
Retail and Marketing
Applications that can handle the peaks and valleys of the retail industry are among the use cases that Microsoft highlights for Azure Cosmos. Here the company eats its own dog food: “Azure Cosmos DB is used extensively in Microsoft's own e-commerce platforms that run the Windows Store and XBox Live.”
Beyond its own applications, Microsoft says Cosmos is designed to handle online retail functions such as storing catalog data and event sourcing in order processing pipelines:
“Catalog data usage scenarios involve storing and querying a set of attributes for entities such as people, places, and products. Some examples of catalog data are user accounts, product catalogs, IoT device registries, and bill of materials systems. Attributes for this data may vary and can change over time to fit application requirements.
“Consider an example of a product catalog for an automotive parts supplier. Every part may have its own attributes in addition to the common attributes that all parts share. Furthermore, attributes for a specific part can change the following year when a new model is released. Azure Cosmos DB supports flexible schemas and hierarchical data, and thus it is well suited for storing product catalog data.”
Cosmos Case Study
Microsoft backs up its claims for Azure Cosmos with case studies of the database in action from a number of prestigious customers.
One Microsoft customer story highlights how FUJIFILM employed Azure Cosmos database speed to enhance their customers’ experience. The Japanese company, which has transitioned from the photographic film business to become a leader in digital photography, wanted to improve digital photo management and file sharing for users of its IMAGE WORKS service. Photographers are typically anxious to see and share their work as instantly as possible. Using Azure Cosmos DB for its image file database, FUJIFILM was able to provide users with higher responsiveness and lower latency from IMAGE WORKS. Microsoft noted that response time for end users accelerated by a factor of 10 while some photographer interactions accelerated by 20 times and more over the previous database. With Azure Cosmos, a tree view photo display in image search processing, which included 140 tables and 1,000 rows of SQL queries, went from 45 seconds, which would seem like an eternity to impatient shutterbugs, to two seconds. “The more responsive we can make IMAGE WORKS, the more productive our customers can be,” said Yuki Chiba, Design Leader of the Advanced Solutions Group IMAGE WORKS Team at FUJIFILM Software.
Deep Dive on Cosmos DB
If you want to go beyond reading about it and really explore the Cosmos, Visual Studio Live! coming to Austin, TX March 30 through April 3 offers a full afternoon Deep Dive on Cosmos DB. Leonard Lobel, Microsoft MVP and CTO at Sleek Technologies, Inc., will lead developers on a journey through the Cosmos DB starting with an introduction including its multi-model capabilities which allow you to store and query schema-free JSON documents (using either SQL or MongoDB APIs), graphs (Gremlin API), and key/value entities (table API).
Diving deeper, in Part II, “Building Cosmos DB Applications,” you'll learn how to write apps for Cosmos DB, and see how to work with the various Cosmos DB APIs. These APIs support a variety of data models, including the SQL API (for JSON documents), Table API for (key-value entities), Gremlin API (for graphs) and Cassandra (for columnar). Regardless what you choose as a data model of choice, you'll learn how to provision throughput, and how to partition and globally distribute your data to deliver massive scale. You’ll come away knowing how to:
- Write code to build Cosmos DB applications
- Use the Cosmos DB server-side programming model to run stored procedures, triggers, and user-defined functions and explore the special version of SQL designed for querying Cosmos DB
- Use the Cosmos DB server-side programming model to run stored procedures, triggers, and user-defined functions
Sign up for the Visual Studio Live! Austin Code Trip today!
Posted by Richard Seeley on 02/13/2020