Presentation is loading. Please wait.

Presentation is loading. Please wait.

Explore the Azure Cosmos DB with .NET Core 2.0

Similar presentations


Presentation on theme: "Explore the Azure Cosmos DB with .NET Core 2.0"— Presentation transcript:

1 Explore the Azure Cosmos DB with .NET Core 2.0
12/2/2018 3:14 PM Explore the Azure Cosmos DB with .NET Core 2.0 Jeremy Likness Cloud Developer Advocate © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

2 Jeremy Likness https://blog.jeremylikness.com/ @JeremyLikness
Cloud Dev Microsoft 20 Year Professional Dev @JeremyLikness

3 https://aka.ms/advocates @azureAdvocates https://aka.ms/cosmos-docs
@azureAdvocates

4 Today’s journey … The SQL legacy A different way: NoSQL
Introducing Azure Cosmos DB Demos Conclusion

5 “We are a way for the cosmos to know itself.”
12/2/2018 3:14 PM “We are a way for the cosmos to know itself.” -Carl Sagan © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

6 “But this is how we’ve always done it.”
12/2/2018 3:14 PM “But this is how we’ve always done it.” -Developer © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

7 12/2/2018 3:14 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

8 12/2/2018 3:14 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

9 Disconnect: Relational vs. Domain
12/2/2018 3:14 PM Disconnect: Relational vs. Domain Relational Database ORM Object Object © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

10 Introducing Not Only SQL: NoSQL
12/2/2018 3:14 PM Introducing Not Only SQL: NoSQL Key/Value Column Document Graph © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

11 🗝 🗝 Key/Value Key Value Key1 $3.05 Key2 9/22/1974 Key3 $4.99
12/2/2018 3:14 PM Key/Value Key Value Key1 $3.05 Key2 9/22/1974 Key3 $4.99 Profile1.jpg 🗝 🗝 © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

12 12/2/2018 3:14 PM Column 🏛 🏛 © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

13 12/2/2018 3:14 PM Document 📄 📄 © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

14 12/2/2018 3:14 PM Graph 📈 📈 © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

15 Advantages 🗝 🏛 📄 📈 Independent Flexible Schema Indexing Support
12/2/2018 3:14 PM Advantages Independent Flexible Schema Indexing Support Easy Manipulation JSON Ready Fast Large Datasets Version Proof ORM Free 🗝 🏛 📄 📈 © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

16 Azure Cosmos DB Handles all of your NoSQL Needs
12/2/2018 3:14 PM Azure Cosmos DB Handles all of your NoSQL Needs Column: Cassandra API Document: SQL API, MongoDB API Graph: Gremlin API Key/Value: Table API © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

17 Demo: Create Azure Cosmos DB
12/2/2018 3:14 PM Demo: Create Azure Cosmos DB © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

18 Introducing Serverless NoSQL with Azure Cosmos DB.
12/2/2018 3:14 PM Introducing Serverless NoSQL with Azure Cosmos DB. © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

19 Turnkey Global Distribution
12/2/2018 3:14 PM Turnkey Global Distribution Learn more: © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

20 Turnkey Global Distribution
12/2/2018 3:14 PM Turnkey Global Distribution Learn more: © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

21 Turnkey Global Distribution
12/2/2018 3:14 PM Turnkey Global Distribution Elastic scale out of storage and throughput No single-machine bottleneck Server-side partition management GB to PB Storage, selectable throughput Automatic document expiration Pay by the hour, customize throughput cost Support for requests per second or minute © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

22 Turnkey Global Distribution
12/2/2018 3:14 PM Turnkey Global Distribution Elastic scale out of storage and throughput Guaranteed 99th percentile low latency Strong <10ms + 2RTT Bounded Staleness <10ms Session Prefix Eventual Reads (1 KB) Indexed Writes © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

23 Turnkey Global Distribution
12/2/2018 3:14 PM Turnkey Global Distribution Elastic scale out of storage and throughput Guaranteed 99th percentile low latency Five well-defined consistency models Learn more: Strong Bounded-stateless Session Consistent prefix Eventual © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

24 12/2/2018 3:14 PM 1 2 A - B 0 – 0 1 – 0 1 – 1 2 – 1 2 – 2 3 – 2 3 4 Learn more: © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

25 1 2 Write 1:A +1 Write 1:B +1 Write 2:A +1 … 3-2 2-2 3 4 Learn more:
12/2/2018 3:14 PM 1 2 Write 1:A +1 Write 1:B +1 Write 2:A +1 3-2 2-2 3 4 Learn more: 1-0 1-1 © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

26 Turnkey Global Distribution
12/2/2018 3:14 PM Turnkey Global Distribution Elastic scale out of storage and throughput Guaranteed 99th percentile low latency Five well-defined consistency models Guaranteed latest version of reads Highest consistency Lowest performance Lowest availability 2x cost of Session -> Eventual Strong Bounded-staleness Session Consistent prefix Eventual © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

27 Guaranteed latest version of reads Highest consistency
12/2/2018 3:14 PM 1 2 1 2 3-2 2-2 3-2 2-2 3 4 3 4 Guaranteed latest version of reads Highest consistency Lowest performance Lowest availability 2x cost of Session -> Eventual 1-0 1-1 1-0 1-1 Strong Bounded-staleness Session Consistent prefix Eventual © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

28 Turnkey Global Distribution
12/2/2018 3:14 PM Turnkey Global Distribution Elastic scale out of storage and throughput Guaranteed 99th percentile low latency Five well-defined consistency models Consistent within a time frame (i.e. 5 minutes old) Better performance Low availability 2x cost of Session -> Eventual Strong Bounded-staleness Session Consistent prefix Eventual © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

29 Consistent within a time frame (i.e. 5 minutes old) Better performance
12/2/2018 3:14 PM 1 2 1 2 3-2 2-2 2-2 2-1 3 4 3 4 Consistent within a time frame (i.e. 5 minutes old) Better performance Low availability 2x cost of Session -> Eventual 1-0 1-1 0-0 1-0 Strong Bounded-staleness Session Consistent prefix Eventual © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

30 Turnkey Global Distribution
12/2/2018 3:14 PM Turnkey Global Distribution Elastic scale out of storage and throughput Guaranteed 99th percentile low latency Five well-defined consistency models Consistent for the session Always read own writes Other data ordered but not guaranteed current Good performance Good availability Strong Bounded-staleness Session Consistent prefix Eventual © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

31 Consistent for the session Always read own writes
12/2/2018 3:14 PM 1 2 1 2 3-2 2-2 3-2 2-1 3 4 3 4 Consistent for the session Always read own writes Other data ordered but not guaranteed current Good performance Good availability 1-0 1-1 0-0 1-0 Strong Bounded-staleness Session Consistent prefix Eventual © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

32 Turnkey Global Distribution
12/2/2018 3:14 PM Turnkey Global Distribution Elastic scale out of storage and throughput Guaranteed 99th percentile low latency Five well-defined consistency models Read is consistent to a point in time No guarantee how current Good performance Excellent availability Strong Bounded-staleness Session Consistent prefix Eventual © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

33 Read is consistent to a point in time No guarantee how current
12/2/2018 3:14 PM 1 2 1 2 3-2 2-2 1-1 1-0 3 4 3 4 Read is consistent to a point in time No guarantee how current Good performance Excellent availability 1-0 1-1 1-0 1-0 Strong Bounded-staleness Session Consistent prefix Eventual © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

34 Turnkey Global Distribution
12/2/2018 3:14 PM Turnkey Global Distribution Elastic scale out of storage and throughput Guaranteed 99th percentile low latency Five well-defined consistency models No guaranteed ordering/freshness of data Eventually “catches up” Highest performance Highest availability Strong Bounded-staleness Session Consistent prefix Eventual © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

35 No guaranteed ordering/freshness of data
12/2/2018 3:14 PM 1 2 1 2 3-2 2-2 0-1 1-2 3 4 3 4 No guaranteed ordering/freshness of data Eventually “catches up” Highest performance Highest availability 1-0 1-1 3-2 0-2 Strong Bounded-staleness Session Consistent prefix Eventual © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

36 Demo: Consistency Levels
12/2/2018 3:14 PM Demo: Consistency Levels © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

37 Turnkey Global Distribution
12/2/2018 3:14 PM Turnkey Global Distribution Elastic scale out of storage and throughput Guaranteed 99th percentile low latency Five well-defined consistency models Comprehensive SLAs <10ms Latency 99th percentile 99.99% HA Throughput Guaranteed Consistency Guaranteed © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

38 https://jlik.me/ckv 1 RU = Read 1 KB Item with 10 Unique Properties
12/2/2018 3:14 PM 1 RU = Read 1 KB Item with 10 Unique Properties Item Size Reads/second Writes/second Request units 1 KB 500 100 1,000 RU 3,000 RU 4 KB 1,350 RU 4,150 RU 64 KB 9,800 RU 29,000 RU © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

39 Why Cosmos DB? Automated backups Automatic failover
ACID inside partition Change feed Encryption (rest & transit) Geo-fencing Geospatial data LINQ Local emulator ODBC Recycle bin (30 days) Security (ISO 27001, EUMC, HIPAA) Serverless bindings Sprocs, triggers, UDFs

40 Got Interfaces? Table API SQL API 12/2/2018 3:14 PM
© Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

41 Atom-Record-Sequence (ARS)
12/2/2018 3:14 PM Atoms – primitive types Records – structs Sequences – arrays of atoms, records, or other sequences Atom-Record-Sequence (ARS) © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

42 Atom-Record-Sequence (ARS)
12/2/2018 3:14 PM Projection is used to map ARS to the API Container Atom-Record-Sequence (ARS) © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

43 Atom-Record-Sequence (ARS)
12/2/2018 3:14 PM Collection Table Graph Projection Container Atom-Record-Sequence (ARS) © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

44 Atom-Record-Sequence (ARS)
12/2/2018 3:14 PM 📄Doc 🗝Key 📈Vertex Projection Item Atom-Record-Sequence (ARS) © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

45 12/2/2018 3:14 PM USDA Database © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

46 12/2/2018 3:14 PM Source: © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

47 Food Groups Nutrient Definitions Food Items Nutrient Data Weights
12/2/2018 3:14 PM Food Groups Nutrient Definitions Food Items Nutrient Data Weights This could be implemented as a single collection with a type identifier © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

48 12/2/2018 3:14 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

49 12/2/2018 3:14 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

50 12/2/2018 3:14 PM DEMO © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

51 Got Interfaces? Table API SQL API 12/2/2018 3:14 PM
© Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

52 12/2/2018 3:14 PM Flights © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

53 12/2/2018 3:14 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

54 Got Interfaces? Table API SQL API 12/2/2018 3:14 PM
© Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

55 Link Shortener Table API SQL API 12/2/2018 3:14 PM
© Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

56 Got Interfaces? Table API SQL API 12/2/2018 3:14 PM
© Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

57 Cassandra API Public preview
12/2/2018 3:14 PM Cassandra API Public preview Details here: © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

58 In Conclusion … NoSQL: a different approach
12/2/2018 3:14 PM In Conclusion … NoSQL: a different approach Azure Cosmos DB: one engine to rule them all … but multiple APIs to bind them Scale, speed, and security – all turnkey, all serverless .NET-ready © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

59 https://blog.jeremylikness.com/ @JeremyLikness
12/2/2018 3:14 PM @JeremyLikness USDA Flights Link Shortener Link Shortener Simplified Try Cosmos DB Free: Global distribution: Consistency levels: Request Units calculator: Performance tips: © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.


Download ppt "Explore the Azure Cosmos DB with .NET Core 2.0"

Similar presentations


Ads by Google