Exam 70-487: Accessing Data - How to choose the Appropriate Data Access Technology - Azure Cosmos DB?

According to Microsoft,Azure Cosmos DBis a database for building blazing fast, planet scale applications with native support for NoSQL. It was built from the ground up with global distribution and horizontal scale at its core. It offers turnkey global distribution across any number of Azure regions by transparently scaling and replicating your data wherever your users are.

Azure cosmos DB is now part of Exam 70-487's latest update and you should study it deeply. Focus on understanding when it is a perfect choice for data storage and access.It is important to read some of the use cases presented by Microsoft: Common Azure Cosmos DB use cases
CosmosDB can be used for document, key value, relational, and graph models. It is more or less a NoSQL database because it does not rely on any schemas. However, it uses query language similar to SQL and can easily support ACID transactions.

CosmosDB is useful for companies that are looking for a database system that is scalable and globally distributed, meaning that all resources are partitioned horizontally in every region of the world, as well as replicated across different geographical areas, thereby significantly reducing latency.

It uses five different consistency levels: Strong, Bounded Staleness, Session, Consistent Prefix and Eventual. You must have a thorough understanding of these levels.

Strong: Strong consistency offers a linearizability guarantee. The reads are guaranteed to return the most recent committed version of an item. A client never sees an uncommitted or partial write. Users are always guaranteed to read the latest committed write.

Bounded staleness: The reads are guaranteed to honor the consistent-prefix guarantee. The reads might lag behind writes by at most "K" versions (that is "updates") of an item or by "t" time interval. When you choose bounded staleness, the "staleness" can be configured in two ways:

  • The number of versions (K) of the item
  • The time interval (t) by which the reads might lag behind the writes

Bounded staleness offers total global order except within the "staleness window." The monotonic read guarantees exist within a region both inside and outside the staleness window. Strong consistency has the same semantics as the ones offered by bounded staleness. The staleness window is equal to zero. Bounded staleness is also referred to as time-delayed linearizability. When a client performs read operations within a region that accepts writes, the guarantees provided by bounded staleness consistency are identical to those guarantees with the strong consistency.

Session: The reads are guaranteed to honor the consistent-prefix (assuming a single “writer” session), monotonic reads, monotonic writes, read-your-writes, and write-follows-reads guarantees. Session consistency is scoped to a client session.

Consistent prefix: Updates that are returned contain some prefix of all the updates, with no gaps. Consistent prefix guarantees that reads never see out-of-order writes.

Eventual: There's no ordering guarantee for reads. In the absence of any further writes, the replicas eventually converge.

Besides the consistency levels, you need to also know the different APIs:

  • SQL API  (Non-relational Document database)
  • Azure Cosmos DB's API for MongoDB
  • Gremlin API (Graph database to model and traverse relation among entities)
  • Table API (For querying Azure Table storage)
  • Cassandra API (Cassandra)

Why choose CosmosDB and its APIs over other data Access methods?

Really, not just for the exam, but for general knowledge, you have to become familiar with all the CosmosDB use cases. Read this 10-minutes Microsoft Docs on CosmosDB use cases as many times as you can:

IoT and telematics Systems:

  • Ingest bursts of data from device sensors of various locales
  • Process and analyze streaming data to derive real-time insights
  • Archived to cold storage for batch analytics

Retail and marketing Systems

  • Store catalog data 
  • Provide event sourcing in order processing pipelines.
  • Azure Cosmos DB supports flexible schemas and hierarchical data, and thus it is well suited for storing product catalog data.

Gaming Systems

  • Perform graphical processing on mobile/console clients, but rely on the cloud to deliver customized and personalized content like in-game stats, social media integration, and high-score leaderboards. 
  • Require single-millisecond latencies for reads and writes to provide an engaging in-game experience. 
  • Need database to be fast and be able to handle massive spikes in request rates during new game launches and feature updates.

Web and mobile applications (Social Applications with global reach; personalization)

  • Model social interactions, integrating with third-party services, and for building rich personalized experiences
  • Store and query user generated content (UGC) for web, mobile, and social media applications
  • Respond to changing schemas from other social networks they integrate with
  • Need to be able to retrieve personalized settings effectively to render UI elements and experiences quickly.

Social Applications



Consistency Levels:

How to choose the right consistency level:

CosmosDB APIs:


Post a Comment

Popular posts from this blog

Why can't Microsoft install IIS on Window Operating Systems by default?

Exam 70-487: Accessing Data - How to choose the Appropriate Data Access Technology - Entity Framework?