SlideShare a Scribd company logo
1 of 31
Download to read offline
Azure Cosmos DB
Landing to the NoSQL
08.03.21
Starting to work in IT on 2006:
● Developer
● IT Consultant
● Project Manager
● Software Engineer
● Tech Lead Cloud Solution
GIORGIO DESIDERI
Who am I ?
CLOUD TEAM
Who are we ?
● Cosmos DB
○ Service description
○ DB Model supported
● First Contact
○ How approach to Cosmos DB
○ Examples
● Cosmos DB in Deep
○ Consistency level
○ Request Units concepts
● Considerations
AGENDA
What we are going to “Seven Peaks Speaks” about
PRE-FACE
What is required ?
● Be a Developer
○ Analyze and Consider before to do the code
○ Avoid to focus only on code
○ Avoid to apply the way “this is fashion, so I will use it”
● NoSQL concepts
○ SQL definition
○ NoSQL definition
○ Data model is focused upon Denormalization
PRE-FACE
A checklist to pass before to start to enter into Cosmos DB
Azure COSMOS DB
Service and Features description
● Azure Cosmos DB
○ NoSQL Database
○ PaaS
○ Globally distributed
○ Model execution
■ Provisioned
■ Serverless
Azure Cosmos DB
Service Description
Azure Cosmos DB
Resource Model
Logical grouping of database.
Here there is the API model definition
It is the base of the data where the
data are stored. It is the logical group
of the data
Schema-agnostic container of items
Azure Cosmos DB
Resource Model
My data
● API model
○ Core/SQL API
■ Follow the SQL syntax for the instructions ( queries )
○ MongoDB API
■ Document model
○ Cassandra API
■ Multi key-values model
○ Gremlin API
■ Graph model
○ Storage Table API
Azure Cosmos DB
API model
1st Contact
What we have to do, to do what we want to do avoid what we don’t want to do !
● Is it a migration from existing NoSQL database ( MongoDB /
Cassandra / Gremlin / Storage Table, etc. )?
○ YES, the choice is done!
○ NO, see next.
Azure Cosmos DB
How to choose the right API Model ?
● Do you have the data ?
○ YES
■ What model of NoSQL can fit those data ?
● Semi-Structured model
● Document model
● Key-value model
● Graph model
○ NO
■ CORE API as default
■ Write a PoC
Azure Cosmos DB
How to choose the right API Model ?
EXAMPLEs
What we want to do ...
Azure Cosmos DB
Example
● Product Catalog
○ CORE API
○ Reason:
■ Semi-structured data
■ Multi search typed-data
Azure Cosmos DB
Example
● Order History
○ Mongo DB or Table API
○ Reason:
■ Document-structure data.
■ No search
■ Directly access to the single item
Azure Cosmos DB
Example
● Recommended Engine
○ Gremlin API
○ Reason:
■ Graph model
■ Multi-search and aggregation search
Azure Cosmos DB
Example
● Web Analytics
○ Cassandra API
○ Reason:
■ Key-Value model
■ Column Family for N-N relationships with small data
Azure Cosmos DB
Example
● IoT System
○ Azure Table API
○ Reason:
■ Store-only
■ Minimum of the structured data
■ Huge Storage capacity
Cosmos DB in Deep
Not so deep !
Azure Cosmos DB
Consistency Level
● Levels
○ Strong
○ Bounded Staleness
○ Session
○ Consistent Prefix
○ Eventual
https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels
Azure Cosmos DB
Request Unit
● Request Units
○ Request unit usage is measured per second, so the unit of
measure is request units per second (RU/s).
○ The number of RU consumed for an operation changes
depending on :
■ the document size
■ the number of properties in the document
■ the operation being performed
■ consistency level
■ indexing policy
Azure Cosmos DB
Request Unit
● Throughput of Request Unit
○ Dedicated or Shared
○ Manual
■ Per database
■ Per container
○ Autoscale
■ Define the Max RU/s to use
EXAMPLEs
What we want to do ...
Azure Cosmos DB
Consistency Level
● How to define the throughput that I need?
○ Choose the right API model of Cosmos DB
○ PoC
■ Identify the most valuable features
■ Develop the most valuable features
■ Start from the minimum RU/s ( 400 or 100 )
■ Test as a maniac
● Business Logic Testing
● Performance Testing
■ Review the reports
■ Go to point #3
Azure Cosmos DB
Consistency Level
● Product Catalog
○ Start with 400 RU/s
○ Define the main categories of products
○ Batch insert an average 50 products per category
○ Create the model of the usage of your catalog
○ Test focusing on
■ Search the product by category, name
■ Scale user numbers 1 - 10 - 100 - 250 - 500 …
○ See the results
■ Can use the Azure Synapse Link
Considerations
Final Resume
Azure Cosmos DB
Consistency Level
● Migration to cloud
○ Consider what you have
● Plan the API model to use according the data model that you
have or will have
● Take in serious consideration the model of “experiment” first,
and decide basing on the experiment
○ Risk #1, model doesn’t fit the reality
○ Risk #2, monitoring of the production to predict the
possible changes
○ Risk #3, rewrite the model or PoC because is not flexible
enough
QUESTIONS ?
Please ...
CONTACTS
I am available
giorgio@7peakssoftware.com

More Related Content

What's hot

SOLR Power FTW: short version
SOLR Power FTW: short versionSOLR Power FTW: short version
SOLR Power FTW: short versionAlex Pinkin
 
Going Serverless with AWS Lambda at ReportGarden
Going Serverless with AWS Lambda at ReportGardenGoing Serverless with AWS Lambda at ReportGarden
Going Serverless with AWS Lambda at ReportGardenJay Gandhi
 
The XML Forms Architecture
The XML Forms ArchitectureThe XML Forms Architecture
The XML Forms ArchitectureiText Group nv
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesKyle Banerjee
 
Part Two: Building Web Apps with the MERN Stack
Part Two: Building Web Apps with the MERN StackPart Two: Building Web Apps with the MERN Stack
Part Two: Building Web Apps with the MERN StackMongoDB
 
Wwc london-perf-apps
Wwc london-perf-appsWwc london-perf-apps
Wwc london-perf-appsClaire Tran
 
Ruby onrails overview
Ruby onrails overviewRuby onrails overview
Ruby onrails overviewPiyush Chand
 
MongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql DatabaseMongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql DatabaseSudhir Patil
 
MongoDB Hadoop DC
MongoDB Hadoop DCMongoDB Hadoop DC
MongoDB Hadoop DCMike Dirolf
 
Mongo and ElasticSearch
Mongo and ElasticSearchMongo and ElasticSearch
Mongo and ElasticSearchSreejith c
 
AEM/CQ Montreal User Group Meeting - March 25, 2015 - Takeaways from Adobe Su...
AEM/CQ Montreal User Group Meeting - March 25, 2015 - Takeaways from Adobe Su...AEM/CQ Montreal User Group Meeting - March 25, 2015 - Takeaways from Adobe Su...
AEM/CQ Montreal User Group Meeting - March 25, 2015 - Takeaways from Adobe Su...INM_
 
Sql no sql comparision
Sql no sql comparisionSql no sql comparision
Sql no sql comparisionzwak1234
 
Web Scraping Technologies
Web Scraping TechnologiesWeb Scraping Technologies
Web Scraping TechnologiesKrishna Sunuwar
 
Building Scalable, Globally Distrubuted System with Azure Cosmos DB Introduction
Building Scalable, Globally Distrubuted System with Azure Cosmos DB IntroductionBuilding Scalable, Globally Distrubuted System with Azure Cosmos DB Introduction
Building Scalable, Globally Distrubuted System with Azure Cosmos DB IntroductionHasan Savran
 
DBAs vs Developers: JSON in SQL Server
DBAs vs Developers: JSON in SQL ServerDBAs vs Developers: JSON in SQL Server
DBAs vs Developers: JSON in SQL ServerBert Wagner
 
JSON in SQL Server 2016
JSON in SQL Server 2016JSON in SQL Server 2016
JSON in SQL Server 2016Bert Wagner
 

What's hot (20)

SOLR Power FTW: short version
SOLR Power FTW: short versionSOLR Power FTW: short version
SOLR Power FTW: short version
 
Mongo db
Mongo dbMongo db
Mongo db
 
Going Serverless with AWS Lambda at ReportGarden
Going Serverless with AWS Lambda at ReportGardenGoing Serverless with AWS Lambda at ReportGarden
Going Serverless with AWS Lambda at ReportGarden
 
The XML Forms Architecture
The XML Forms ArchitectureThe XML Forms Architecture
The XML Forms Architecture
 
MongoDB SF Ruby
MongoDB SF RubyMongoDB SF Ruby
MongoDB SF Ruby
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
 
Part Two: Building Web Apps with the MERN Stack
Part Two: Building Web Apps with the MERN StackPart Two: Building Web Apps with the MERN Stack
Part Two: Building Web Apps with the MERN Stack
 
Wwc london-perf-apps
Wwc london-perf-appsWwc london-perf-apps
Wwc london-perf-apps
 
Ruby onrails overview
Ruby onrails overviewRuby onrails overview
Ruby onrails overview
 
MongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql DatabaseMongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql Database
 
MongoDB Hadoop DC
MongoDB Hadoop DCMongoDB Hadoop DC
MongoDB Hadoop DC
 
Mongo and ElasticSearch
Mongo and ElasticSearchMongo and ElasticSearch
Mongo and ElasticSearch
 
AEM/CQ Montreal User Group Meeting - March 25, 2015 - Takeaways from Adobe Su...
AEM/CQ Montreal User Group Meeting - March 25, 2015 - Takeaways from Adobe Su...AEM/CQ Montreal User Group Meeting - March 25, 2015 - Takeaways from Adobe Su...
AEM/CQ Montreal User Group Meeting - March 25, 2015 - Takeaways from Adobe Su...
 
Sql no sql comparision
Sql no sql comparisionSql no sql comparision
Sql no sql comparision
 
MongoDB
MongoDBMongoDB
MongoDB
 
Web Scraping Technologies
Web Scraping TechnologiesWeb Scraping Technologies
Web Scraping Technologies
 
Building Scalable, Globally Distrubuted System with Azure Cosmos DB Introduction
Building Scalable, Globally Distrubuted System with Azure Cosmos DB IntroductionBuilding Scalable, Globally Distrubuted System with Azure Cosmos DB Introduction
Building Scalable, Globally Distrubuted System with Azure Cosmos DB Introduction
 
DBAs vs Developers: JSON in SQL Server
DBAs vs Developers: JSON in SQL ServerDBAs vs Developers: JSON in SQL Server
DBAs vs Developers: JSON in SQL Server
 
No sql
No sqlNo sql
No sql
 
JSON in SQL Server 2016
JSON in SQL Server 2016JSON in SQL Server 2016
JSON in SQL Server 2016
 

Similar to Developers Guide to Cosmos DB

No sql bigdata and postgresql
No sql bigdata and postgresqlNo sql bigdata and postgresql
No sql bigdata and postgresqlZaid Shabbir
 
Columbus AWS Meetup: AWS Certifications
Columbus AWS Meetup: AWS CertificationsColumbus AWS Meetup: AWS Certifications
Columbus AWS Meetup: AWS CertificationsAndrewMay59
 
Aws Developer Associate Overview
Aws Developer Associate OverviewAws Developer Associate Overview
Aws Developer Associate OverviewAbhi Jain
 
Introduction to Cosmos DB Presentation.pptx
Introduction to Cosmos DB Presentation.pptxIntroduction to Cosmos DB Presentation.pptx
Introduction to Cosmos DB Presentation.pptxKnoldus Inc.
 
OpenSearch.pdf
OpenSearch.pdfOpenSearch.pdf
OpenSearch.pdfAbhi Jain
 
ГАННА КАПЛУН «noSQL vs SQL: порівняння використання реляційних та нереляційни...
ГАННА КАПЛУН «noSQL vs SQL: порівняння використання реляційних та нереляційни...ГАННА КАПЛУН «noSQL vs SQL: порівняння використання реляційних та нереляційни...
ГАННА КАПЛУН «noSQL vs SQL: порівняння використання реляційних та нереляційни...GoQA
 
Cloud Big Data Architectures
Cloud Big Data ArchitecturesCloud Big Data Architectures
Cloud Big Data ArchitecturesLynn Langit
 
Mongo db first steps with csharp
Mongo db first steps with csharpMongo db first steps with csharp
Mongo db first steps with csharpSerdar Buyuktemiz
 
Heterogenous Persistence
Heterogenous PersistenceHeterogenous Persistence
Heterogenous PersistenceJervin Real
 
MongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDBMongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDBLisa Roth, PMP
 
MongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDBMongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDBMongoDB
 
UNIT-1 MongoDB.pptx
UNIT-1 MongoDB.pptxUNIT-1 MongoDB.pptx
UNIT-1 MongoDB.pptxDharaDarji5
 
Beyond Relational
Beyond RelationalBeyond Relational
Beyond RelationalLynn Langit
 
Database Choices
Database ChoicesDatabase Choices
Database ChoicesLynn Langit
 
Enterprise PHP Architecture through Design Patterns and Modularization (Midwe...
Enterprise PHP Architecture through Design Patterns and Modularization (Midwe...Enterprise PHP Architecture through Design Patterns and Modularization (Midwe...
Enterprise PHP Architecture through Design Patterns and Modularization (Midwe...Aaron Saray
 

Similar to Developers Guide to Cosmos DB (20)

No sql bigdata and postgresql
No sql bigdata and postgresqlNo sql bigdata and postgresql
No sql bigdata and postgresql
 
Columbus AWS Meetup: AWS Certifications
Columbus AWS Meetup: AWS CertificationsColumbus AWS Meetup: AWS Certifications
Columbus AWS Meetup: AWS Certifications
 
Aws Developer Associate Overview
Aws Developer Associate OverviewAws Developer Associate Overview
Aws Developer Associate Overview
 
Introduction to Cosmos DB Presentation.pptx
Introduction to Cosmos DB Presentation.pptxIntroduction to Cosmos DB Presentation.pptx
Introduction to Cosmos DB Presentation.pptx
 
OpenSearch.pdf
OpenSearch.pdfOpenSearch.pdf
OpenSearch.pdf
 
ГАННА КАПЛУН «noSQL vs SQL: порівняння використання реляційних та нереляційни...
ГАННА КАПЛУН «noSQL vs SQL: порівняння використання реляційних та нереляційни...ГАННА КАПЛУН «noSQL vs SQL: порівняння використання реляційних та нереляційни...
ГАННА КАПЛУН «noSQL vs SQL: порівняння використання реляційних та нереляційни...
 
Mongo DB
Mongo DB Mongo DB
Mongo DB
 
NoSQL Databases
NoSQL DatabasesNoSQL Databases
NoSQL Databases
 
Cloud Big Data Architectures
Cloud Big Data ArchitecturesCloud Big Data Architectures
Cloud Big Data Architectures
 
Mongo db first steps with csharp
Mongo db first steps with csharpMongo db first steps with csharp
Mongo db first steps with csharp
 
mongodb_DS.pptx
mongodb_DS.pptxmongodb_DS.pptx
mongodb_DS.pptx
 
NoSQL and MongoDB
NoSQL and MongoDBNoSQL and MongoDB
NoSQL and MongoDB
 
Heterogenous Persistence
Heterogenous PersistenceHeterogenous Persistence
Heterogenous Persistence
 
MongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDBMongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDB
 
MongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDBMongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDB
 
UNIT-1 MongoDB.pptx
UNIT-1 MongoDB.pptxUNIT-1 MongoDB.pptx
UNIT-1 MongoDB.pptx
 
Beyond Relational
Beyond RelationalBeyond Relational
Beyond Relational
 
Database Choices
Database ChoicesDatabase Choices
Database Choices
 
ArangoDB
ArangoDBArangoDB
ArangoDB
 
Enterprise PHP Architecture through Design Patterns and Modularization (Midwe...
Enterprise PHP Architecture through Design Patterns and Modularization (Midwe...Enterprise PHP Architecture through Design Patterns and Modularization (Midwe...
Enterprise PHP Architecture through Design Patterns and Modularization (Midwe...
 

More from Seven Peaks Speaks

Seven Peaks Speaks - Compose Screenshot Testing Made Easy
Seven Peaks Speaks - Compose Screenshot Testing Made EasySeven Peaks Speaks - Compose Screenshot Testing Made Easy
Seven Peaks Speaks - Compose Screenshot Testing Made EasySeven Peaks Speaks
 
Seven Peaks Speaks - Android Jetpack Compose Animation
Seven Peaks Speaks - Android Jetpack Compose AnimationSeven Peaks Speaks - Android Jetpack Compose Animation
Seven Peaks Speaks - Android Jetpack Compose AnimationSeven Peaks Speaks
 
Seven Peaks Speaks - Compose Navigation
Seven Peaks Speaks - Compose NavigationSeven Peaks Speaks - Compose Navigation
Seven Peaks Speaks - Compose NavigationSeven Peaks Speaks
 
How to Get Better Performance Out of Your App
How to Get Better Performance Out of Your AppHow to Get Better Performance Out of Your App
How to Get Better Performance Out of Your AppSeven Peaks Speaks
 
Secure Development of Azure Function
Secure Development of Azure FunctionSecure Development of Azure Function
Secure Development of Azure FunctionSeven Peaks Speaks
 
Develop Security & Compliances in Azure
Develop Security & Compliances in AzureDevelop Security & Compliances in Azure
Develop Security & Compliances in AzureSeven Peaks Speaks
 
Background Processing With Work Manager
Background Processing With Work ManagerBackground Processing With Work Manager
Background Processing With Work ManagerSeven Peaks Speaks
 
Graph ql vs rest api - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
Graph ql vs rest api - Seven Peaks Software (Node.JS Meetup 18 nov 2021)Graph ql vs rest api - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
Graph ql vs rest api - Seven Peaks Software (Node.JS Meetup 18 nov 2021)Seven Peaks Speaks
 
Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)Seven Peaks Speaks
 
Delivering react app with confidence: Testing Pyramid
Delivering react app with confidence: Testing PyramidDelivering react app with confidence: Testing Pyramid
Delivering react app with confidence: Testing PyramidSeven Peaks Speaks
 
Getting hooked on performance and clean code
Getting hooked on performance and clean codeGetting hooked on performance and clean code
Getting hooked on performance and clean codeSeven Peaks Speaks
 
Establishing secure Biometric authentication in Android
Establishing secure Biometric authentication in AndroidEstablishing secure Biometric authentication in Android
Establishing secure Biometric authentication in AndroidSeven Peaks Speaks
 
Utilizing kotlin flows in an android application
Utilizing kotlin flows in an android applicationUtilizing kotlin flows in an android application
Utilizing kotlin flows in an android applicationSeven Peaks Speaks
 

More from Seven Peaks Speaks (20)

BKK Web: Working with SEO
BKK Web: Working with SEOBKK Web: Working with SEO
BKK Web: Working with SEO
 
Seven Peaks Speaks - Compose Screenshot Testing Made Easy
Seven Peaks Speaks - Compose Screenshot Testing Made EasySeven Peaks Speaks - Compose Screenshot Testing Made Easy
Seven Peaks Speaks - Compose Screenshot Testing Made Easy
 
Seven Peaks Speaks - Android Jetpack Compose Animation
Seven Peaks Speaks - Android Jetpack Compose AnimationSeven Peaks Speaks - Android Jetpack Compose Animation
Seven Peaks Speaks - Android Jetpack Compose Animation
 
Seven Peaks Speaks - Compose Navigation
Seven Peaks Speaks - Compose NavigationSeven Peaks Speaks - Compose Navigation
Seven Peaks Speaks - Compose Navigation
 
How to Get Better Performance Out of Your App
How to Get Better Performance Out of Your AppHow to Get Better Performance Out of Your App
How to Get Better Performance Out of Your App
 
RxSubject And Operators
RxSubject And OperatorsRxSubject And Operators
RxSubject And Operators
 
Concurrency in Swift
Concurrency in SwiftConcurrency in Swift
Concurrency in Swift
 
DevSecOps on Azure
DevSecOps on AzureDevSecOps on Azure
DevSecOps on Azure
 
Secure Development of Azure Function
Secure Development of Azure FunctionSecure Development of Azure Function
Secure Development of Azure Function
 
Develop Security & Compliances in Azure
Develop Security & Compliances in AzureDevelop Security & Compliances in Azure
Develop Security & Compliances in Azure
 
Effective Lists Management
Effective Lists ManagementEffective Lists Management
Effective Lists Management
 
Layout Preview Tooling
Layout Preview ToolingLayout Preview Tooling
Layout Preview Tooling
 
Background Processing With Work Manager
Background Processing With Work ManagerBackground Processing With Work Manager
Background Processing With Work Manager
 
Graph ql vs rest api - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
Graph ql vs rest api - Seven Peaks Software (Node.JS Meetup 18 nov 2021)Graph ql vs rest api - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
Graph ql vs rest api - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
 
Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
 
Delivering react app with confidence: Testing Pyramid
Delivering react app with confidence: Testing PyramidDelivering react app with confidence: Testing Pyramid
Delivering react app with confidence: Testing Pyramid
 
React context
React context  React context
React context
 
Getting hooked on performance and clean code
Getting hooked on performance and clean codeGetting hooked on performance and clean code
Getting hooked on performance and clean code
 
Establishing secure Biometric authentication in Android
Establishing secure Biometric authentication in AndroidEstablishing secure Biometric authentication in Android
Establishing secure Biometric authentication in Android
 
Utilizing kotlin flows in an android application
Utilizing kotlin flows in an android applicationUtilizing kotlin flows in an android application
Utilizing kotlin flows in an android application
 

Recently uploaded

Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 

Recently uploaded (20)

Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 

Developers Guide to Cosmos DB

  • 1. Azure Cosmos DB Landing to the NoSQL 08.03.21
  • 2. Starting to work in IT on 2006: ● Developer ● IT Consultant ● Project Manager ● Software Engineer ● Tech Lead Cloud Solution GIORGIO DESIDERI Who am I ?
  • 4. ● Cosmos DB ○ Service description ○ DB Model supported ● First Contact ○ How approach to Cosmos DB ○ Examples ● Cosmos DB in Deep ○ Consistency level ○ Request Units concepts ● Considerations AGENDA What we are going to “Seven Peaks Speaks” about
  • 6. ● Be a Developer ○ Analyze and Consider before to do the code ○ Avoid to focus only on code ○ Avoid to apply the way “this is fashion, so I will use it” ● NoSQL concepts ○ SQL definition ○ NoSQL definition ○ Data model is focused upon Denormalization PRE-FACE A checklist to pass before to start to enter into Cosmos DB
  • 7. Azure COSMOS DB Service and Features description
  • 8. ● Azure Cosmos DB ○ NoSQL Database ○ PaaS ○ Globally distributed ○ Model execution ■ Provisioned ■ Serverless Azure Cosmos DB Service Description
  • 9. Azure Cosmos DB Resource Model Logical grouping of database. Here there is the API model definition It is the base of the data where the data are stored. It is the logical group of the data Schema-agnostic container of items
  • 10. Azure Cosmos DB Resource Model My data
  • 11. ● API model ○ Core/SQL API ■ Follow the SQL syntax for the instructions ( queries ) ○ MongoDB API ■ Document model ○ Cassandra API ■ Multi key-values model ○ Gremlin API ■ Graph model ○ Storage Table API Azure Cosmos DB API model
  • 12. 1st Contact What we have to do, to do what we want to do avoid what we don’t want to do !
  • 13. ● Is it a migration from existing NoSQL database ( MongoDB / Cassandra / Gremlin / Storage Table, etc. )? ○ YES, the choice is done! ○ NO, see next. Azure Cosmos DB How to choose the right API Model ?
  • 14. ● Do you have the data ? ○ YES ■ What model of NoSQL can fit those data ? ● Semi-Structured model ● Document model ● Key-value model ● Graph model ○ NO ■ CORE API as default ■ Write a PoC Azure Cosmos DB How to choose the right API Model ?
  • 16. Azure Cosmos DB Example ● Product Catalog ○ CORE API ○ Reason: ■ Semi-structured data ■ Multi search typed-data
  • 17. Azure Cosmos DB Example ● Order History ○ Mongo DB or Table API ○ Reason: ■ Document-structure data. ■ No search ■ Directly access to the single item
  • 18. Azure Cosmos DB Example ● Recommended Engine ○ Gremlin API ○ Reason: ■ Graph model ■ Multi-search and aggregation search
  • 19. Azure Cosmos DB Example ● Web Analytics ○ Cassandra API ○ Reason: ■ Key-Value model ■ Column Family for N-N relationships with small data
  • 20. Azure Cosmos DB Example ● IoT System ○ Azure Table API ○ Reason: ■ Store-only ■ Minimum of the structured data ■ Huge Storage capacity
  • 21. Cosmos DB in Deep Not so deep !
  • 22. Azure Cosmos DB Consistency Level ● Levels ○ Strong ○ Bounded Staleness ○ Session ○ Consistent Prefix ○ Eventual https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels
  • 23. Azure Cosmos DB Request Unit ● Request Units ○ Request unit usage is measured per second, so the unit of measure is request units per second (RU/s). ○ The number of RU consumed for an operation changes depending on : ■ the document size ■ the number of properties in the document ■ the operation being performed ■ consistency level ■ indexing policy
  • 24. Azure Cosmos DB Request Unit ● Throughput of Request Unit ○ Dedicated or Shared ○ Manual ■ Per database ■ Per container ○ Autoscale ■ Define the Max RU/s to use
  • 26. Azure Cosmos DB Consistency Level ● How to define the throughput that I need? ○ Choose the right API model of Cosmos DB ○ PoC ■ Identify the most valuable features ■ Develop the most valuable features ■ Start from the minimum RU/s ( 400 or 100 ) ■ Test as a maniac ● Business Logic Testing ● Performance Testing ■ Review the reports ■ Go to point #3
  • 27. Azure Cosmos DB Consistency Level ● Product Catalog ○ Start with 400 RU/s ○ Define the main categories of products ○ Batch insert an average 50 products per category ○ Create the model of the usage of your catalog ○ Test focusing on ■ Search the product by category, name ■ Scale user numbers 1 - 10 - 100 - 250 - 500 … ○ See the results ■ Can use the Azure Synapse Link
  • 29. Azure Cosmos DB Consistency Level ● Migration to cloud ○ Consider what you have ● Plan the API model to use according the data model that you have or will have ● Take in serious consideration the model of “experiment” first, and decide basing on the experiment ○ Risk #1, model doesn’t fit the reality ○ Risk #2, monitoring of the production to predict the possible changes ○ Risk #3, rewrite the model or PoC because is not flexible enough