Skip to main content
Top

2018 | Book

Cosmos DB for MongoDB Developers

Migrating to Azure Cosmos DB and Using the MongoDB API

insite
SEARCH

About this book

Learn Azure Cosmos DB and its MongoDB API with hands-on samples and advanced features such as the multi-homing API, geo-replication, custom indexing, TTL, request units (RU), consistency levels, partitioning, and much more. Each chapter explains Azure Cosmos DB’s features and functionalities by comparing it to MongoDB with coding samples.
Cosmos DB for MongoDB Developers starts with an overview of NoSQL and Azure Cosmos DB and moves on to demonstrate the difference between geo-replication of Azure Cosmos DB compared to MongoDB. Along the way you’ll cover subjects including indexing, partitioning, consistency, and sizing, all of which will help you understand the concepts of read units and how this calculation is derived from an existing MongoDB’s usage.
The next part of the book shows you the process and strategies for migrating to Azure Cosmos DB. You will learn the day-to-day scenarios of using Azure Cosmos DB, its sizing strategies, and optimizing techniques for the MongoDB API. This information will help you when planning to migrate from MongoDB or if you would like to compare MongoDB to the Azure Cosmos DB MongoDB API before considering the switch.
What You Will LearnMigrate to MongoDB and understand its strategies
Develop a sample application using MongoDB’s client driver
Make use of sizing best practices and performance optimization scenarios
Optimize MongoDB’s partition mechanism and indexing
Who This Book Is For

MongoDB developers who wish to learn Azure Cosmos DB. It specifically caters to a technical audience, working on MongoDB.

Table of Contents

Frontmatter
Chapter 1. Why NoSQL?
Abstract
Working on a system that handles data populated from multiple data streams and adheres to one defined structure is extremely difficult to implement and maintain. The volume of data is often humongous and mostly unpredictable. In such cases, splitting data into multiple pieces while inserting and joining the tables during data retrieval will add excessive latency.
Manish Sharma
Chapter 2. Azure Cosmos DB Overview
Abstract
NoSQL was conceived to address issues related to scalability, durability, and performance. However, even highly performant systems are limited by the computing capacity available from an on-premise machine or a virtual machine in the cloud. In the cloud, having a massive compute-capacity PaaS is the most desirable option, as, in this case, one needn’t worry about scalability, performance, and availability. All of these will be provided by the cloud service provider.
Manish Sharma
Chapter 3. Azure Cosmos DB Geo-Replication
Abstract
Availability of the database is of utmost importance to any application’s experience. In cases in which the user engagement is critical, and the availability of the database in data-driven application is most important, one must ensure the availability and scalability of the database. Among examples of data-driven applications problems could be the following: an e-commerce application with a plethora of easy-to-use and marquee features going down every time a user tries to make a purchase, because something in the database is not available; a billing solution for a hospital that leaves patients standing in line to make payments, owing to a database instance not being available; or a transport company with footprints across the globe seeking to access the system, but apart from that at the main location, the system performs badly, owing to latency issues. So, how do you ensure that a database is available? How do you ensure that the database is always deployed nearest to the relevant application? And how do you achieve the lowest possible latency?
Manish Sharma
Chapter 4. Indexing
Abstract
Now, let’s consider an example in which the field we have selected is not using an index. See Listing 4-4 for details.
Manish Sharma
Chapter 5. Partitioning
Abstract
Scale, scale, scale…For most of the professional life span of a database architect, these words reverberate whenever a new application is being developed. The most difficult challenge is to design a database in elastic mode. In the world of relational database management systems (RDBMSs) Relational database management systems (RDBMSs), this can occasionally be a nightmare, and it presents no less difficult a task in the realm of NoSQL too. In this chapter, you are going to learn how, using partitioning, Azure Cosmos DB scales databases.
Manish Sharma
Chapter 6. Consistency
Abstract
In such scenarios, ensuring consistency can be quite cumbersome. Let’s look at an example.
Manish Sharma
Chapter 7. Sizing
Abstract
So far, I have covered various aspects of Azure Cosmos DB from the usage perspective. In this chapter, I will explain the sizing aspect of Azure Cosmos DB.
Manish Sharma
Chapter 8. Migrating to Azure Cosmos DB–MongoDB API
Abstract
Now that I have covered most of the aspects of Azure Cosmos DB–MongoDB API, in this chapter, we will delve into the actual logistics of migrating an entire application to Azure Cosmos DB–MongoDB API.
Manish Sharma
Chapter 9. Azure Cosmos DB–MongoDB API Advanced Services
Abstract
Finally, we have reached the last chapter in our journey, and I would like to share some of the important points that are applicable in day-to-day scenarios.
Manish Sharma
Backmatter
Metadata
Title
Cosmos DB for MongoDB Developers
Author
Manish Sharma
Copyright Year
2018
Publisher
Apress
Electronic ISBN
978-1-4842-3682-6
Print ISBN
978-1-4842-3681-9
DOI
https://doi.org/10.1007/978-1-4842-3682-6

Premium Partner