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 2 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 nine 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. Welcome to our Cloud Academy demo for this course on Cosmos DB in Azure. And now for this demo section, there'll be multiple videos and we're going to put together a backend application using Azure Event Hubs as your functions and as your Cosmos DB.
So for this first video, we're gonna start by creating an Event Hub. Now what you see here on the screen, this is my personal account. There's some test infrastructure here. That's pretty recent. And we're gonna run through how to create this piece, the Event Hub.
Now, if we just click Event Hubs, we'll see here it takes us first to this section, which these are namespaces. You have to first create a namespace for your Event Hub. So if you click on it here, we have this Bethune namespace. This is my last name. And then there is a bethune Event Hub, and we can create click plus to create an additional Event Hub within that. But let's start from scratch.
Let's say we don't have any namespace at all. We can go through the, create a resource menu here. And if you want, you can actually just type Event Hubs if you can't find it and you can click create, and it'll take you to the wizard and it will tell you first to create a namespace.
Now there's some information you fill out here. We'll stick with pay as you go, resource group, we have an existing one, but let's say we wanna create a new one. We'll call it, let's create a new one and we'll call it bethune2 and so we have a new resource group that will be for this namespace. And then the namespace name we'll also just call that bethune2.
We wanna pick a region for the data center. I think East US is fine. We'll stick with the standard pricing tier we can go with, let's say one consumer group is enough for us and throughput units one is fine for a test. And then we can just go to review and create.
Now after you click review and create, it's not actually gonna create it right away, it's gonna just do validation. So don't navigate away, it's just done the validation piece. So we know that this configuration is okay, and then we have to click create. And now it's actually deploying the infrastructure for our Event Hub namespace. That doesn't take very long, but we have to, we'll give it a minute and we'll refresh. Okay.
So eventually your deployment for the Event Hub namespace will complete. It'll get to this point and we can just click on, go to resource and we can see here at bethune2 Event Hub namespace, and we can navigate there from the home menu as well.
If we click on Event Hubs and we'll see there's the additional namespace right there, it's still in status activating, but that'll be done very soon. So at this point, we don't have an actual Event Hub yet. We just have a namespace. So to create an Event Hub, we click on the namespace bethune2 that we created and we want to do we wanna add an Event Hub we do plus Event Hub. And this is pretty simple as well. We just have to give it a name. We'll call this as well bethune2 partition count of two is fine. Just for test purposes. We don't need to worry about message retention or capture at this point.
So we'll just click create and that'll trigger the validation. And it'll take a second, but eventually, we'll see spin up right there bethune2. Down there, we can see the Event Hub. These create very, very quickly, but after you've done that, congrats, you're done. You have your ready-to-use Event Hub right here. No messages or traffic yet, but we'll get to that soon enough.
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.