Explore the Cosmos (DB) with .NET Core 2.0
Learn about the Azure CosmosDB database w/ DocumentDB, MongoDB, Gremlin (Graph) and Table storage APIs and .NET Core 2.0 examples.
Technology moves at such a fast pace it is often difficult to keep up with the latest innovations. I was happy to learn that many of the attendees did not have much exposure to CosmosDB and therefore had the opportunity to learn something new. The audience was kind enough to participate in a group 360° photo.
The presentation was fun, especially due to some technical challenges I faced when trying to run Docker containers. I’m not sure why my Docker host was resisting, but fortunately I prepare for all contingencies and had the Docker images available in a repository and running in an Azure Container Instance to demo.
Despite the challenges, feedback was positive.
Great presentation on CosmosDB by @jeremylikness tonight at the Atlanta .Net Meetup.— Doug Ware (@DougWare) August 29, 2017
I received a lot of great questions, and promised to follow-up with answers:
- Does CosmosDB support sharding? Short answer is yes, that concept is supported. Here is more information about how to partition and scale a CosmosDB.
- Strong consistency and eventual consistency were well-understood, but there were a lot of questions about the other consistency levels available. You can learn more about those in this article about tuning data consistency levels.
- How does CosmosDB integrate with Azure’s serverless “functions” offering? Read about CosmosDB Azure Functions bindings.
- Can you use the MongoDB driver if you choose the DocumentDB API? No, not in the current implementation. You must specify MongoDB as the API in order to use the MongoDB driver.
- How do you migrate data into CosmosDB? Use the data migration tool.
- Is it possible to test CosmosDB applications locally? Yes, there is a local emulator.
If you have other questions, take a look at the CosmosDB FAQ and if that doesn’t answer them, reach out to me!
I also had a question about understanding document databases from the perspective of a relational developer. I recently published a blog post to address those concerns directly:
Learn how to leverage the MongoDB driver for .NET Core 2.0 apps to query document databases with ease and support for both strong and dynamic types.
I also published a public GitHub repository with .NET Core 2.0 code that:
- Imports data from the USDA nutrient database into a CosmosDB instance
- Exposes a Web API to query the data
- Provides a simple single page web application to browse the data
Finally, here is the full deck from my presentation.
- .NET Rocks: Migrating to .NET Core 2.0 (.NET Core)
- After Your Talk 🗣: The Power 💪 of Leverage (Presentation)
- Build a 💣 Bomb-Diggity Technical Presentation (🎤 Mic Drop Optional) (Presentation)
- Expanding Azure Functions to the Cosmos (Cosmosdb)
- How to Choose Where to Give Your Technical Presentation (Presentation)