Introduction to Cosmos DB
Introduction to Using Cosmos DB
Introduction to Creating an App with Cosmos DB
The course is part of these learning pathsSee 3 more
Cosmos DB is one of many database solutions in a crowded market. From DynamoDB to Cassandra to CockroachDB, the questions one would naturally ask when examining Cosmos DB are, “what makes it special and how can I get started with it?”
This course answers both of those questions as thoroughly and concisely as possible. This course is for anyone with an interest in database technologies or creating software using Microsoft Azure. Whether you are a DevOps engineer, a database admin, a product manager, or a sales expert, this course will help you learn how to power your technology with one of Azure's most innovative data solutions.
From this course, you will learn how to make use of Cosmos DB's incredible flexibility and performance. This course is made up of 9 comprehensive lectures to guide you from the basics to how to create your own app using Cosmos DB.
- Learn the basic components of Cosmos DB
- Learn how to use Cosmos DB via the web portal, libraries, and CLI tools
- Learn how to create an application with Cosmos DB as the data backend
- People looking to build applications using Microsoft Azure
- People interested in database technologies
- General knowledge of IT architecture
- General knowledge of databases
Okay, so we're gonna get started on our demo to actually create an app backend using Cosmos DB, Azure functions, and Event Hubs. So, the first part, probably the quickest and easiest, is just creating an event hub, which will be the front door for our data. So the way to do that here in the dashboard, we're looking at the All Services screen. To create an event hub, the first thing we'll do is click on Create a Resource, and what you're gonna do, is go to Internet of Things, and go to Event Hubs.
And, from there, it'll take you through creating a namespace. Now, for our namespace, I'm just gonna put my last name, which is bethune, and the default pricing here, well, we'll put basic, just to keep it really simple. It's possible to do this with free accounts as well, but for me, I'm just gonna do a pay-as-you-go. We'll do a Create a New. So, for our resource group, we can create a new one, or we can use an existing one. I already have a resource group called bethune, but you can create your own. And then, decide on a location. For our purposes, we'll do Central US, why not? Throughput units, if you're gonna do a lot, you know, you could increase how much throughput you need. I'm gonna leave it at one, I'm not even gonna enable the auto-inflate.
But this is the basics for our namespace. Once we have that, we just click Create. It'll take a second to deploy, it'll say, "submitting deployment." Just give it a minute. Okay, great! We see it there, there's our Event Hubs namespace, so we can just click on that, and from there, we could actually create the Event Hub, 'cause this is just a namespace, we need to actually create the Event Hub resource. So, for that, you can just click on Event Hub, and we'll give it a name, we'll just call it the same thing, bethune. We can leave it at two partitions. We don't need to worry about any of this default config for right now. If you're really trying to create something that's performant, I would suggest reading the documentation for all of this stuff, but the default, low-level settings are totally fine, so just click Create, and that's basically it. This will also take a second to complete, but once it's done, you'll have all of your Event Hub resources ready to go, and that's basically it.
About the Author
Jonathan Bethune is a senior technical consultant working with several companies including TopTal, BCG, and Instaclustr. He is an experienced devops specialist, data engineer, and software developer. Jonathan has spent years mastering the art of system automation with a variety of different cloud providers and tools. Before he became an engineer, Jonathan was a musician and teacher in New York City. Jonathan is based in Tokyo where he continues to work in technology and write for various publications in his free time.